SELECT
                `ID`,
                `IconPath`
            FROM
                `elitcar_store`.`uni_icons`
            WHERE
                `Label` = 'АНТИФРИЗ' AND
                `Language` = 'bg'
            LIMIT 1

SELECT
                `ID`,
                `IconPath`
            FROM
                `elitcar_store`.`uni_icons`
            WHERE
                `Label` = 'Греси' AND
                `Language` = 'bg'
            LIMIT 1

SELECT
                `ID`,
                `IconPath`
            FROM
                `elitcar_store`.`uni_icons`
            WHERE
                `Label` = 'ДВИГАТЕЛНО МАСЛО' AND
                `Language` = 'bg'
            LIMIT 1

SELECT
                `ID`,
                `IconPath`
            FROM
                `elitcar_store`.`uni_icons`
            WHERE
                `Label` = 'Добавки' AND
                `Language` = 'bg'
            LIMIT 1

SELECT
                `ID`,
                `IconPath`
            FROM
                `elitcar_store`.`uni_icons`
            WHERE
                `Label` = 'Каша за ръце' AND
                `Language` = 'bg'
            LIMIT 1

SELECT
                `ID`,
                `IconPath`
            FROM
                `elitcar_store`.`uni_icons`
            WHERE
                `Label` = 'Обезмаслители/Аерозоли' AND
                `Language` = 'bg'
            LIMIT 1

SELECT
                `ID`,
                `IconPath`
            FROM
                `elitcar_store`.`uni_icons`
            WHERE
                `Label` = 'Силикони' AND
                `Language` = 'bg'
            LIMIT 1

SELECT
                `ID`,
                `IconPath`
            FROM
                `elitcar_store`.`uni_icons`
            WHERE
                `Label` = 'Спирачна Течност' AND
                `Language` = 'bg'
            LIMIT 1

SELECT
                `ID`,
                `IconPath`
            FROM
                `elitcar_store`.`uni_icons`
            WHERE
                `Label` = 'Течност за чистачки' AND
                `Language` = 'bg'
            LIMIT 1

SELECT
                `ID`,
                `IconPath`
            FROM
                `elitcar_store`.`uni_icons`
            WHERE
                `Label` = 'ТРАНСМИСИОННО МАСЛО' AND
                `Language` = 'bg'
            LIMIT 1

SELECT
                `ID`,
                `IconPath`
            FROM
                `elitcar_store`.`uni_icons`
            WHERE
                `Label` = 'Фреон' AND
                `Language` = 'bg'
            LIMIT 1

SELECT
                `ID`,
                `IconPath`
            FROM
                `elitcar_store`.`uni_icons`
            WHERE
                `Label` = 'Хидравлично масло' AND
                `Language` = 'bg'
            LIMIT 1

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_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, '2024-09-27', '00'

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

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

Successfully disconnected from the database!
# [27-Sep-2024 13:15:53] /elitcar/www/bg/ajax/history/parts.html?_=1727432151090 108.61.209.243
# [27-Sep-2024 13:15:53] /elitcar/www/bg/ajax/users/bar.html?_=1727432151162 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_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_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

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


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


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

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

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'
# [27-Sep-2024 13:15:53] /elitcar/www/bg/ajax/history/parts.html?_=1727432151090 108.61.209.243

set names utf8

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

Successfully disconnected from the database!
# [27-Sep-2024 13:15:53] /elitcar/www/bg/ajax/users/bar.html?_=1727432151162 108.61.209.243

set names utf8

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

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

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

Successfully disconnected from the database!
# [27-Sep-2024 13:15:59] /elitcar/www/bg/manufacturers.html 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LSearchNumber','LSearchPart','ErrorValidNumber','LSearchCar','LManufacturer','LYear','LModel','LType') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

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

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LModelSearchPlaceholder') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC
# [27-Sep-2024 13:15:59] /elitcar/www/bg/manufacturers.html 108.61.209.243

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_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, '2024-09-27', '00'

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

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

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

Successfully disconnected from the database!
# [27-Sep-2024 13:16:01] /elitcar/www/bg/ajax/history/parts.html?_=1727432159261 108.61.209.243
# [27-Sep-2024 13:16:01] /elitcar/www/bg/ajax/users/bar.html?_=1727432159386 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_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_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, '2024-09-27', '00'
# [27-Sep-2024 13:16:01] /elitcar/www/bg/ajax/history/parts.html?_=1727432159261 108.61.209.243

set names utf8

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

Successfully disconnected from the database!

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'
# [27-Sep-2024 13:16:01] /elitcar/www/bg/ajax/users/bar.html?_=1727432159386 108.61.209.243

set names utf8

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

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

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

Successfully disconnected from the database!
# [27-Sep-2024 13:16:02] /elitcar/www/bg/groups/39849642.html 108.61.209.243

set names utf8

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

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_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, '2024-09-27', '00'

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

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

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

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

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

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

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

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

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

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

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

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

Successfully disconnected from the database!
# [27-Sep-2024 13:16:04] /elitcar/www/bg/ajax/history/parts.html?_=1727432162291 108.61.209.243
# [27-Sep-2024 13:16:04] /elitcar/www/bg/ajax/users/bar.html?_=1727432162390 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_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_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, '2024-09-27', '00'
# [27-Sep-2024 13:16:04] /elitcar/www/bg/ajax/history/parts.html?_=1727432162291 108.61.209.243

set names utf8

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

Successfully disconnected from the database!

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'
# [27-Sep-2024 13:16:04] /elitcar/www/bg/ajax/users/bar.html?_=1727432162390 108.61.209.243

set names utf8

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

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

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

Successfully disconnected from the database!
# [27-Sep-2024 13:16:05] /elitcar/www/admin/bg/ajax/groups/bar.html?_=1727432163019 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_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, '2024-09-27', '00'
# [27-Sep-2024 13:16:05] /elitcar/www/bg/groups/39850140.html 108.61.209.243

set names utf8

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

Successfully disconnected from the database!
# [27-Sep-2024 13:16:05] /elitcar/www/bg/groups/39850140.html 108.61.209.243

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_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, '2024-09-27', '00'

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

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

Successfully disconnected from the database!
# [27-Sep-2024 13:16:07] /elitcar/www/bg/ajax/history/parts.html?_=1727432165001 108.61.209.243
# [27-Sep-2024 13:16:07] /elitcar/www/bg/ajax/users/bar.html?_=1727432165106 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_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_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] => ЛЮБОМИР НАЧКОВ
)


exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'

SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)
# [27-Sep-2024 13:16:07] /elitcar/www/bg/ajax/history/parts.html?_=1727432165001 108.61.209.243

set names utf8

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

Successfully disconnected from the database!

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'
# [27-Sep-2024 13:16:07] /elitcar/www/bg/ajax/users/bar.html?_=1727432165106 108.61.209.243

set names utf8

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

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

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

Successfully disconnected from the database!
# [27-Sep-2024 13:16:07] /elitcar/www/admin/bg/ajax/groups/bar.html?_=1727432165745 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_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, '2024-09-27', '00'

Successfully disconnected from the database!
# [27-Sep-2024 13:16:18] /elitcar/www/bg/groups/39849642.html 108.61.209.243

set names utf8

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

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_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, '2024-09-27', '00'

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

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

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

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

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

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

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

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

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

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

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

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

Successfully disconnected from the database!
# [27-Sep-2024 13:16:19] /elitcar/www/bg/ajax/history/parts.html?_=1727432177594 108.61.209.243
# [27-Sep-2024 13:16:19] /elitcar/www/bg/ajax/users/bar.html?_=1727432177698 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_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_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] => ЛЮБОМИР НАЧКОВ
)


exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'

SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)
# [27-Sep-2024 13:16:20] /elitcar/www/bg/ajax/history/parts.html?_=1727432177594 108.61.209.243

set names utf8

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

Successfully disconnected from the database!

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'
# [27-Sep-2024 13:16:20] /elitcar/www/bg/ajax/users/bar.html?_=1727432177698 108.61.209.243

set names utf8

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

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

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

Successfully disconnected from the database!
# [27-Sep-2024 13:16:20] /elitcar/www/admin/bg/ajax/groups/bar.html?_=1727432178313 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_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, '2024-09-27', '00'

Successfully disconnected from the database!
# [27-Sep-2024 13:16:25] /elitcar/www/bg/groups/39849642.html 108.61.209.243

set names utf8

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

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_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, '2024-09-27', '00'

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

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

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

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

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

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

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

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

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

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

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

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

Successfully disconnected from the database!
# [27-Sep-2024 13:16:26] /elitcar/www/bg/ajax/history/parts.html?_=1727432184898 108.61.209.243
# [27-Sep-2024 13:16:27] /elitcar/www/bg/ajax/users/bar.html?_=1727432185007 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_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_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] => ЛЮБОМИР НАЧКОВ
)


exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'

SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)
# [27-Sep-2024 13:16:27] /elitcar/www/bg/ajax/history/parts.html?_=1727432184898 108.61.209.243

set names utf8

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

Successfully disconnected from the database!

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'
# [27-Sep-2024 13:16:27] /elitcar/www/bg/ajax/users/bar.html?_=1727432185007 108.61.209.243

set names utf8

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

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

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

Successfully disconnected from the database!
# [27-Sep-2024 13:16:27] /elitcar/www/admin/bg/ajax/groups/bar.html?_=1727432185671 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_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, '2024-09-27', '00'

Successfully disconnected from the database!
# [27-Sep-2024 13:16:34] /elitcar/www/bg/groups/158801.html?ids=39850140;150855;157745 108.61.209.243

set names utf8

SELECT `TecDocId` FROM `autokelly`.`catalog` WHERE `Id` = 158801

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 158801
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`
# [27-Sep-2024 13:16:34] /elitcar/www/bg/groups/158801.html?ids=39850140;150855;157745 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_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, '2024-09-27', '00'

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

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

SELECT
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
            WHERE
                `autokelly`.`catalog`.`Id` = 39850140
            LIMIT 1

SELECT
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
            WHERE
                `autokelly`.`catalog`.`Id` = 150855
            LIMIT 1

SELECT
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
            WHERE
                `autokelly`.`catalog`.`Id` = 157745
            LIMIT 1

Successfully disconnected from the database!
# [27-Sep-2024 13:16:36] /elitcar/www/bg/ajax/history/parts.html?_=1727432193985 108.61.209.243
# [27-Sep-2024 13:16:36] /elitcar/www/bg/ajax/history/insert.html?_=1727432193980 108.61.209.243
# [27-Sep-2024 13:16:36] /elitcar/www/bg/ajax/users/bar.html?_=1727432194089 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_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_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_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] => ЛЮБОМИР НАЧКОВ
)


exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'

SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)
# [27-Sep-2024 13:16:36] /elitcar/www/bg/ajax/history/insert.html?_=1727432193980 108.61.209.243

set names utf8
# [27-Sep-2024 13:16:36] /elitcar/www/bg/ajax/history/parts.html?_=1727432193985 108.61.209.243

SELECT
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
            WHERE
                `autokelly`.`catalog`.`Id` = 158801
            LIMIT 1

set names utf8

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

Successfully disconnected from the database!

SELECT
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
            WHERE
                `autokelly`.`catalog`.`Id` = 157745
            LIMIT 1

SELECT
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
            WHERE
                `autokelly`.`catalog`.`Id` = 150855
            LIMIT 1

SELECT
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
            WHERE
                `autokelly`.`catalog`.`Id` = 39850140
            LIMIT 1

SELECT * FROM `history_autokelly` LIMIT 1

SHOW COLUMNS FROM `history_autokelly`

REPLACE INTO `history_autokelly` SET `Url` = 'https://digith.ink/elitcar/www/bg/groups/158801.html?ids=39850140;150855;157745', `PostDate` = '2024-09-27 13:16:36', `MonetaUser` = 'lubo', `NodeID` = '39850140', `Auto` = 'BMW  1 (E81) [09/06-09/12] 116 i (1596ccm\\85kW\\115HP) [09/07-12/11] '

DELETE FROM history_autokelly WHERE `MonetaUser` = 'lubo' AND `ID` NOT IN
            (SELECT * FROM (SELECT `ID` FROM history_autokelly WHERE `MonetaUser` = 'lubo' ORDER BY `PostDate` DESC LIMIT 30) AS T)

Successfully disconnected from the database!

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'
# [27-Sep-2024 13:16:36] /elitcar/www/bg/ajax/users/bar.html?_=1727432194089 108.61.209.243

set names utf8

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

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

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

Successfully disconnected from the database!
# [27-Sep-2024 13:16:36] /elitcar/www/admin/bg/ajax/groups/bar.html?_=1727432194698 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_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, '2024-09-27', '00'

Successfully disconnected from the database!
# [27-Sep-2024 13:16:52] /elitcar/www/bg/groups/39850140.html 108.61.209.243

set names utf8

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

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_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, '2024-09-27', '00'

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

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

Successfully disconnected from the database!
# [27-Sep-2024 13:16:54] /elitcar/www/bg/ajax/history/parts.html?_=1727432211999 108.61.209.243
# [27-Sep-2024 13:16:54] /elitcar/www/bg/ajax/users/bar.html?_=1727432212104 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_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_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] => ЛЮБОМИР НАЧКОВ
)


exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'

SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)
# [27-Sep-2024 13:16:54] /elitcar/www/bg/ajax/history/parts.html?_=1727432211999 108.61.209.243

set names utf8

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

Successfully disconnected from the database!

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'
# [27-Sep-2024 13:16:54] /elitcar/www/bg/ajax/users/bar.html?_=1727432212104 108.61.209.243

set names utf8

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

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

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

Successfully disconnected from the database!
# [27-Sep-2024 13:16:54] /elitcar/www/admin/bg/ajax/groups/bar.html?_=1727432212762 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_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, '2024-09-27', '00'

Successfully disconnected from the database!
# [27-Sep-2024 13:17:01] /elitcar/www/bg/groups/150785.html?ids=39850140 108.61.209.243

set names utf8

SELECT `TecDocId` FROM `autokelly`.`catalog` WHERE `Id` = 150785

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 150785
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`
# [27-Sep-2024 13:17:01] /elitcar/www/bg/groups/150785.html?ids=39850140 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_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, '2024-09-27', '00'

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

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

SELECT
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
            WHERE
                `autokelly`.`catalog`.`Id` = 39850140
            LIMIT 1

Successfully disconnected from the database!
# [27-Sep-2024 13:17:02] /elitcar/www/bg/ajax/history/parts.html?_=1727432220673 108.61.209.243
# [27-Sep-2024 13:17:02] /elitcar/www/bg/ajax/users/bar.html?_=1727432220778 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_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_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] => ЛЮБОМИР НАЧКОВ
)


exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'

SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)
# [27-Sep-2024 13:17:03] /elitcar/www/bg/ajax/history/parts.html?_=1727432220673 108.61.209.243

set names utf8

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

Successfully disconnected from the database!

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'
# [27-Sep-2024 13:17:03] /elitcar/www/bg/ajax/users/bar.html?_=1727432220778 108.61.209.243

set names utf8

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

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

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

Successfully disconnected from the database!
# [27-Sep-2024 13:17:03] /elitcar/www/admin/bg/ajax/groups/bar.html?_=1727432221396 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_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, '2024-09-27', '00'

Successfully disconnected from the database!
# [27-Sep-2024 13:17:12] /elitcar/www/bg/workshop.html 108.61.209.243

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_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, '2024-09-27', '00'
# [27-Sep-2024 13:17:12] /elitcar/www/bg/workshop.html 108.61.209.243

set names utf8

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

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

Successfully disconnected from the database!
# [27-Sep-2024 13:17:13] /elitcar/www/bg/ajax/history/parts.html?_=1727432231711 108.61.209.243
# [27-Sep-2024 13:17:13] /elitcar/www/bg/ajax/users/bar.html?_=1727432231790 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_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_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 * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'
# [27-Sep-2024 13:17:14] /elitcar/www/bg/ajax/history/parts.html?_=1727432231711 108.61.209.243

set names utf8

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

Successfully disconnected from the database!
# [27-Sep-2024 13:17:14] /elitcar/www/bg/ajax/users/bar.html?_=1727432231790 108.61.209.243

set names utf8

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

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

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

Successfully disconnected from the database!
# [27-Sep-2024 13:17:17] /elitcar/www/bg/uni/battery.html 108.61.209.243

set names utf8

SELECT
                `TableName`,
                `Label`
            FROM
                `elitcar_store`.`uni_tables`
            WHERE
                `UrlLabel` = 'battery' AND
                `Language` = 'bg' AND
                `Visible` = 1
            LIMIT 1

SELECT
                *
            FROM
                `elitcar_store`.`uni_groups`
            WHERE
                `ListType` != '' AND
                `TableName` = 'N_AcumulatorItems' AND
                `Language` = 'bg'
            ORDER BY
                `ItemPosition` ASC
# [27-Sep-2024 13:17:17] /elitcar/www/bg/uni/battery.html 108.61.209.243

SELECT DISTINCT
                Purpose
            FROM
                N_AcumulatorItems
         ORDER BY Purpose

SELECT
                `ID`,
                `IconPath`
            FROM
                `elitcar_store`.`uni_icons`
            WHERE
                `Label` = 'Автомобили' AND
                `Language` = 'bg'
            LIMIT 1

SELECT
                `ID`,
                `IconPath`
            FROM
                `elitcar_store`.`uni_icons`
            WHERE
                `Label` = 'Камиони' AND
                `Language` = 'bg'
            LIMIT 1

SELECT
                `ID`,
                `IconPath`
            FROM
                `elitcar_store`.`uni_icons`
            WHERE
                `Label` = 'Мотоциклети' AND
                `Language` = 'bg'
            LIMIT 1

SELECT
                `ID`,
                `IconPath`
            FROM
                `elitcar_store`.`uni_icons`
            WHERE
                `Label` = 'Тягови' AND
                `Language` = 'bg'
            LIMIT 1

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_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, '2024-09-27', '00'

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

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

Successfully disconnected from the database!
# [27-Sep-2024 13:17:19] /elitcar/www/bg/ajax/history/parts.html?_=1727432237499 108.61.209.243
# [27-Sep-2024 13:17:19] /elitcar/www/bg/ajax/users/bar.html?_=1727432237597 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_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_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] => ЛЮБОМИР НАЧКОВ
)


exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'

SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)
# [27-Sep-2024 13:17:20] /elitcar/www/bg/ajax/history/parts.html?_=1727432237499 108.61.209.243

set names utf8

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

Successfully disconnected from the database!

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'
# [27-Sep-2024 13:17:20] /elitcar/www/bg/ajax/users/bar.html?_=1727432237597 108.61.209.243

set names utf8

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

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

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

Successfully disconnected from the database!
# [27-Sep-2024 13:17:20] /elitcar/www/bg/uni/battery.html?Purpose[]=Автомобили 108.61.209.243

set names utf8

SELECT
                `TableName`,
                `Label`
            FROM
                `elitcar_store`.`uni_tables`
            WHERE
                `UrlLabel` = 'battery' AND
                `Language` = 'bg' AND
                `Visible` = 1
            LIMIT 1

SELECT
                *
            FROM
                `elitcar_store`.`uni_groups`
            WHERE
                `ListType` != '' AND
                `TableName` = 'N_AcumulatorItems' AND
                `Language` = 'bg'
            ORDER BY
                `ItemPosition` ASC

SELECT
                `Label`
            FROM
                `elitcar_store`.`uni_tables`
            WHERE
                `UrlLabel` = 'battery' AND
                `Language` = 'bg' AND
                `Visible` = 1
            LIMIT 1
# [27-Sep-2024 13:17:20] /elitcar/www/bg/uni/battery.html?Purpose[]=Автомобили 108.61.209.243

SELECT
                N_Item.id AS MonetaId,
                N_Producer.Name AS ProducerCode,
                N_Producer._TecDocNo AS ProducerId,
                N_Item._CAD_Id AS ProductId,
                N_Item.FullSearchTecDoc_Id AS FullSearchTecDocId,
                N_Item._TecDocNo AS ArticleNo,
                N_Item.Producer_code AS Producer,
                N_Item.UnitPrice,
                N_Producer._TecDocNo AS BrandNo,
                N_Producer.WithoutQty,
                N_AcumulatorItems.*
            FROM
                N_AcumulatorItems WITH(NOLOCK)
                INNER JOIN N_Item WITH(NOLOCK) ON (N_Item.Id = N_AcumulatorItems.Item_Id)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.UnitPrice > 0
         AND LTRIM(RTRIM(N_AcumulatorItems.Purpose)) IN('Автомобили')

SELECT
                `FieldName`,
                `Label`,
                `DataType`
            FROM
                `elitcar_store`.`uni_criteria`
            WHERE
                `TableName` = 'N_AcumulatorItems' AND
                `Language` = 'bg'
            ORDER BY `ItemPosition` ASC

SELECT
                `ID`,
                `ListType`,
                `GroupField`,
                `GroupLabel`,
                `ItemPosition`
            FROM
                `elitcar_store`.`uni_groups`
            WHERE
                `TableName` = 'N_AcumulatorItems' AND
                `Language` = 'bg'
            ORDER BY `ItemPosition` ASC

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_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, '2024-09-27', '00'

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

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

Successfully disconnected from the database!
# [27-Sep-2024 13:17:22] /elitcar/www/bg/ajax/history/parts.html?_=1727432240555 108.61.209.243
# [27-Sep-2024 13:17:22] /elitcar/www/bg/ajax/moneta/sort.html?_=1727432240553 108.61.209.243
# [27-Sep-2024 13:17:22] /elitcar/www/bg/ajax/users/bar.html?_=1727432240691 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_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_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

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


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


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

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

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_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] => ЛЮБОМИР НАЧКОВ
)


exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'

SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)
# [27-Sep-2024 13:17:23] /elitcar/www/bg/ajax/history/parts.html?_=1727432240555 108.61.209.243

set names utf8

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

Successfully disconnected from the database!
# [27-Sep-2024 13:17:23] /elitcar/www/bg/ajax/moneta/sort.html?_=1727432240553 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('BOSCH 0 092 P00 000','BOSCH 0 092 P00 010','BOSCH 0 092 P00 020','BOSCH 0 092 P00 030','BOSCH 0 092 P00 040','BOSCH 0 092 P00 050','BOSCH 0 092 P00 060','BOSCH 0 092 P00 070','BOSCH 0 092 P00 080','BOSCH 0 092 P00 120','BOSCH 0 092 P00 130','BOSCH 0 092 P00 160','BOSCH 0 092 P00 170','BOSCH 0 092 P01 020','BOSCH 0 092 P01 050','BOSCH 0 092 P01 070','BOSCH 0 092 P01 130','BOSCH 0 092 PA0 050','BOSCH 0 092 PA0 080','BOSCH 0 092 PA0 110','BOSCH 0 092 PA0 130','BOSCH 0 092 PA0 150','BOSCH 0 092 PE0 050','BOSCH 0 092 PE0 070','BOSCH 0 092 PE0 080','BOSCH 0 092 PE0 100','BOSCH 0 092 PE0 110','BOSCH 0 092 PE0 130','BOSCH 0 092 PE0 410','BOSCH 0 092 PE0 420','BOSCH 0 092 PP0 010','BOSCH 0 092 PP0 020','BOSCH 0 092 PP0 040','BOSCH 0 092 PP0 050','BOSCH 0 092 PP0 060','BOSCH 0 092 PP0 070','BOSCH 0 092 PP0 080','BOSCH 0 092 PP0 090','BOSCH 0 092 PP0 100','BOSCH 0 092 PP0 110','BOSCH 0 092 PP0 130','BOSCH 0 092 PP0 150','BOSCH 0 092 PP0 180','BOSCH 0 092 PP0 190','BOSCH 0 092 PP0 200','BOSCH 0 092 PP0 210','BOSCH 0 092 PP0 220','BOSCH 0 092 PP0 230','BOSCH 0 092 PP0 240','BOSCH 0 092 PP0 250','BOSCH 0 092 PP0 260','BOSCH 0 092 PP0 270','BOSCH 0 092 PP0 280','BOSCH 0 092 PP0 290','BOSCH 0 092 PP0 300','BOSCH 0 092 S30 600','BOSCH 0 092 S4E 051','BOSCH 0 092 S4E 081','BOSCH 0 092 S4E 130','BOSCH 0 092 S4E 400','BOSCH 0 092 S4E 420','BOSCH 0 185 3A5 701','BOSCH 0 185 3A5 801','BOSCH 0 185 3E5 600','BOSCH 0 185 3E5 700','BOSCH 0 185 756 805','BOSCH 0 185 757 209','BOSCH 0 185 758 006','BOSCH 0 092 L40 340','BOSCH 0 092 S30 000','BOSCH 0 092 S30 010','BOSCH 0 092 S30 020','BOSCH 0 092 S30 030','BOSCH 0 092 S30 040','BOSCH 0 092 S30 041','BOSCH 0 092 S30 050','BOSCH 0 092 S30 060','BOSCH 0 092 S30 070','BOSCH 0 092 S30 080','BOSCH 0 092 S30 120','BOSCH 0 092 S30 130','BOSCH 0 092 S30 160','BOSCH 0 092 S30 170','BOSCH 0 092 S40 000','BOSCH 0 092 S40 001','BOSCH 0 092 S40 010','BOSCH 0 092 S40 020','BOSCH 0 092 S40 040','BOSCH 0 092 S40 050','BOSCH 0 092 S40 060','BOSCH 0 092 S40 070','BOSCH 0 092 S40 080','BOSCH 0 092 S40 090','BOSCH 0 092 S40 100','BOSCH 0 092 S40 110','BOSCH 0 092 S40 130','BOSCH 0 092 S40 180','BOSCH 0 092 S40 190','BOSCH 0 092 S40 200','BOSCH 0 092 S40 210','BOSCH 0 092 S40 220','BOSCH 0 092 S40 230','BOSCH 0 092 S40 240','BOSCH 0 092 S40 250','BOSCH 0 092 S40 260','BOSCH 0 092 S40 270','BOSCH 0 092 S40 280','BOSCH 0 092 S40 290','BOSCH 0 092 S40 300','BOSCH 0 092 S4E 050','BOSCH 0 092 S4E 070','BOSCH 0 092 S4E 080','BOSCH 0 092 S4E 100','BOSCH 0 092 S4E 110','BOSCH 0 092 S4E 111','BOSCH 0 092 S50 010','BOSCH 0 092 S50 020','BOSCH 0 092 S50 040','BOSCH 0 092 S50 050','BOSCH 0 092 S50 060','BOSCH 0 092 S50 070','BOSCH 0 092 S50 080','BOSCH 0 092 S50 100','BOSCH 0 092 S50 110','BOSCH 0 092 S50 130','BOSCH 0 092 S50 150','BOSCH 0 092 S5A 050','BOSCH 0 092 S5A 080','BOSCH 0 092 S5A 110','BOSCH 0 092 S5A 130','BOSCH 0 092 S5A 150','BOSCH 0 185 753 500','BOSCH 0 185 753 518','BOSCH 0 185 753 519','BOSCH 0 185 754 006','BOSCH 0 185 754 100','BOSCH 0 185 754 512','BOSCH 0 185 754 513','BOSCH 0 185 754 555','BOSCH 0 185 754 557','BOSCH 0 185 755 200','BOSCH 0 185 755 300','BOSCH 0 185 755 600','BOSCH 0 185 755 601','BOSCH 0 185 756 008','BOSCH 0 185 756 009','BOSCH 0 185 756 012','BOSCH 0 185 756 027','BOSCH 0 185 756 803','BOSCH 0 185 757 009','BOSCH 0 185 757 010','BOSCH 0 185 757 404','BOSCH 0 185 758 300','BOSCH 0 185 759 022','BOSCH 0 185 759 100','BOSCH 0 185 759 101','BOSCH 0 185 759 502','BOSCH 0 185 760 002','CONTINENTAL 2800012000280','CONTINENTAL 2800012001280','CONTINENTAL 2800012002280','CONTINENTAL 2800012003280','CONTINENTAL 2800012004280','CONTINENTAL 2800012005280','CONTINENTAL 2800012006280','CONTINENTAL 2800012007280','CONTINENTAL 2800012008280','CONTINENTAL 2800012018280','CONTINENTAL 2800012019280','CONTINENTAL 2800012020280','CONTINENTAL 2800012021280','CONTINENTAL 2800012022280','CONTINENTAL 2800012023280','CONTINENTAL 2800012024280','CONTINENTAL 2800012025280','CONTINENTAL 2800012026280','CONTINENTAL 2800012027280','CONTINENTAL 2800012038280','CONTINENTAL 2800012039280','CONTINENTAL 2800012040280','CONTINENTAL 2800012041280','BANNER 509 00','VARTA 510909017I312','VARTA 512014020A514','VARTA 512909020A512','VARTA 513106020G412','BANNER 514 00','BANNER 518 01','BANNER 530 30','BANNER 530 34','VARTA 530400030A514','BANNER 538 15','VARTA 5401250333132','VARTA 5401260333132','VARTA 5401270333132','VARTA 5404060343122','VARTA 5414000363122','BANNER 544 09','VARTA 5444010423132','VARTA 5444020443132','BANNER 545 59','VARTA 5450770303122','VARTA 5450790303122','VARTA 5451550333132','VARTA 5451560333132','VARTA 5451570333132','VARTA 5451580333132','VARTA 5454120403122','VARTA 5454130403122','BANNER 550 01','VARTA 5524000473132','VARTA 5524010523162','VARTA 5534010503122','VARTA 5544000533162','BANNER 555 15','BANNER 555 19','VARTA 5564000483122','VARTA 5564010483122','BANNER 560 01','BANNER 560 09','BANNER 560 10','VARTA 5601270543132','VARTA 5604080543132','VARTA 5604090543132','VARTA 5604100543132','VARTA 5604110543132','VARTA 560500064D842','VARTA 560901068D852','VARTA 5614000603162','BANNER 562 19','VARTA 5634000613162','VARTA 5634010613162','BANNER 565 11','BANNER 565 12','BANNER 565 15','BANNER 565 16','VARTA 565500065D842','VARTA 565501065D842','BANNER 570 01','BANNER 570 15','BANNER 570 44','VARTA 5701440643122','VARTA 5704090643122','VARTA 5704120633132','VARTA 5704130633132','VARTA 570500076D842','VARTA 570901076D852','VARTA 570901076J382','BANNER 572 12','BANNER 572 33','VARTA 5724090683132','VARTA 5724090687482','VARTA 572501076D842','VARTA 5740120683132','VARTA 5740130683132','VARTA 5744020753162','BANNER 575 11','BANNER 575 12','VARTA 575500073D842','VARTA 5774000783162','BANNER 580 01','BANNER 580 14','VARTA 5804000743132','VARTA 5804060743132','VARTA 580901080D852','VARTA 580901080J382','BANNER 585 11','VARTA 5852000803162','VARTA 5854000803162','VARTA 585501080D842','BANNER 588 20','VARTA 5884030743122','VARTA 5901220723122','BANNER 592 01','BANNER 595 15','BANNER 595 33','VARTA 5954020803132','VARTA 5954040833132','VARTA 5954050833132','VARTA 595901085D852','VARTA 595901085J382','VARTA 600123072A742','VARTA 6004020833162','BANNER 605 01','VARTA 605102080A742','VARTA 605901095D852','VARTA 605901095J382','VARTA 6104020923162','OPTIMA 8001-287R','OPTIMA 8003-251R','OPTIMA 8012-254Y','OPTIMA 8018-365Y','OPTIMA 8035-255R','OPTIMA 8051-187Y','OPTIMA 8052-188B','VARTA 820054080B912','VARTA 840080080C542','VARTA 930052047B912','VARTA 930060054B912','VARTA 930074068B912','VARTA 930090080B912','VARTA 930095080B912','ERA A56011','ERA A57012','ERA A59514','ERA A60515','POWER AGM.L3.70.076.A','POWER AGM.L5.95.090.A','POWER B24.45.036.E','STARLINE BA SL 100P','STARLINE BA SL 35JL','STARLINE BA SL 35JP','STARLINE BA SL 40P','STARLINE BA SL 44P','STARLINE BA SL 55L','STARLINE BA SL 55P','STARLINE BA SL 60JP','STARLINE BA SL 60P','STARLINE BA SL 66P','STARLINE BA SL 74P','STARLINE BA SL 80P','STARLINE BA SL 88P','STARLINE BA SL 95JL','STARLINE BA SL 95JP','ERA E56011','ERA E56512','ERA E57013','ERA E57514','EXIDE E60-N30-A','EXIDE E60-N30L-A','EXIDE E60-N30L-B','EXIDE EA1000','EXIDE EA1050','EXIDE EA406','EXIDE EA472','EXIDE EA530','EXIDE EA601','EXIDE EA612','EXIDE EA640','EXIDE EA654','EXIDE EA722','EXIDE EA754','EXIDE EA755','EXIDE EA770','EXIDE EA852','EXIDE EA900','EXIDE EA954','EXIDE EA955','EXIDE EB1100','EXIDE EB30L-B','EXIDE EB356','EXIDE EB454','EXIDE EB456','EXIDE EB500','EXIDE EB602','EXIDE EB604','EXIDE EB605','EXIDE EB620','EXIDE EB621','EXIDE EB704','EXIDE EB705','EXIDE EB712','EXIDE EB740','EXIDE EB741','EXIDE EB852','EXIDE EB950','EXIDE EC440','EXIDE EC550','EXIDE EC700','EXIDE EC900','EXIDE EK131','EXIDE EK620','EXIDE EK700','EXIDE EK720','EXIDE EK820','EXIDE EK950','EXIDE EK960','EXIDE EL604','EXIDE EL700','EXIDE ER550','POWER L1.44.036.A','POWER L2.55.045.A','POWER L2.60.054.A','POWER L5.95.085.A','BANNER P100 40','BANNER P110 40','BANNER P40 25','BANNER P40 26','BANNER P40 27','BANNER P42 08','BANNER P44 09','BANNER P45 23','BANNER P45 24','BANNER P50 03','BANNER P60 09','BANNER P60 68','BANNER P60 69','BANNER P62 19','BANNER P62 19 DT','BANNER P63 40','BANNER P70 24','BANNER P70 29','BANNER P72 09','BANNER P74 12','BANNER P77 40','BANNER P80 09','BANNER P80 14','BANNER P84 40','BANNER P95 04','BANNER P95 05','BANNER P95 33','BANNER RP 45','BANNER RP 60','BANNER RP 62','BANNER RP 72','ERA S53522','ERA S53523','ERA S53541','ERA S54012','ERA S54214','ERA S54410','ERA S54414','ERA S54506','ERA S54508','ERA S54515','ERA S54517','ERA S54521','ERA S54549','ERA S55211','ERA S55312','ERA S55613','ERA S56005','ERA S56014','ERA S56017','ERA S56808','ERA S56812','ERA S57001','ERA S57212','ERA S57411','ERA S57715','ERA S58012','ERA S58313','ERA S59014','ERA S59515','ERA S59517','ERA S60017')
            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!

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'
# [27-Sep-2024 13:17:23] /elitcar/www/bg/ajax/users/bar.html?_=1727432240691 108.61.209.243

set names utf8

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

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

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

Successfully disconnected from the database!
# [27-Sep-2024 13:17:23] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAwOTIgUEEwIDEzMF0.html?_=1727432241612 108.61.209.243
# [27-Sep-2024 13:17:23] /elitcar/www/bg/ajax/products/image/W00gQk9TQ0ggMCAwOTIgUEEwIDEzMF0.html?_=1727432241611 108.61.209.243
# [27-Sep-2024 13:17:23] /elitcar/www/bg/ajax/products/image/W00gQk9TQ0ggMCAwOTIgUDAwIDA4MF0.html?_=1727432241612 108.61.209.243

set names utf8

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BOSCH 0 092 PA0 130'
            LIMIT 1

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BOSCH 0 092 PA0 130' LIMIT 1
# [27-Sep-2024 13:17:23] /elitcar/www/bg/ajax/products/image/W00gQkFOTkVSIFA3NCAxMl0.html?_=1727432241613 108.61.209.243
# [27-Sep-2024 13:17:23] /elitcar/www/bg/ajax/prices/W00gQkFOTkVSIFA3NCAxMl0.html?_=1727432241614 108.61.209.243

set names utf8

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BOSCH 0 092 P00 080'
            LIMIT 1

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BOSCH 0 092 P00 080' LIMIT 1
# [27-Sep-2024 13:17:23] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAwOTIgUDAwIDA4MF0.html?_=1727432241613 108.61.209.243

set names utf8

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BANNER P74 12'
            LIMIT 1

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BANNER P74 12' LIMIT 1

SELECT
                `FolderName`,
                `Name`,
                `Suffix`
            FROM
                `autokelly`.`productfile`
                INNER JOIN `autokelly`.`file` ON `autokelly`.`file`.`Id` = `autokelly`.`productfile`.`FileId`
            WHERE
                `autokelly`.`productfile`.`ProductId` = 1415425 AND
                `autokelly`.`file`.`Image` = 1 AND
                 `autokelly`.`file`.`Suffix` = 'JPG'
            ORDER BY
                `autokelly`.`productfile`.`Order`
            LIMIT 1

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_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_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_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)
# [27-Sep-2024 13:17:23] /elitcar/www/bg/ajax/products/image/W00gQk9TQ0ggMCAwOTIgUEEwIDA4MF0.html?_=1727432241615 108.61.209.243

set names utf8

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BOSCH 0 092 PA0 080'
            LIMIT 1

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BOSCH 0 092 PA0 080' LIMIT 1

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

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'
# [27-Sep-2024 13:17:24] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAwOTIgUEEwIDA4MF0.html?_=1727432241615 108.61.209.243

SELECT * FROM  fn_EShopItemInfo_New('BOSCH 0 092 PA0 130', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT * FROM  fn_EShopItemInfo_New('BANNER P74 12', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');
# [27-Sep-2024 13:17:24] /elitcar/www/bg/ajax/products/image/W00gQk9TQ0ggMCAxODUgNzU2IDAwOV0.html?_=1727432241616 108.61.209.243

set names utf8

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BOSCH 0 185 756 009'
            LIMIT 1

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BOSCH 0 185 756 009' LIMIT 1

SELECT * FROM  fn_EShopItemInfo_New('BOSCH 0 092 P00 080', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');
# [27-Sep-2024 13:17:24] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAxODUgNzU2IDAwOV0.html?_=1727432241616 108.61.209.243

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('BOSCH 0 092 PA0 130', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('BANNER P74 12', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('BOSCH 0 092 P00 080', '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_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
                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 = 'BOSCH 0 092 PA0 130'
            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 = 'BANNER P74 12'
            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 = 'BOSCH 0 092 P00 080'
            GROUP BY fComp_Id,fItem_Id
# [27-Sep-2024 13:17:24] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAwOTIgUEEwIDEzMF0.html?_=1727432241612 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', 'BOSCH 0 092 PA0 130', 'МАРШРУТ  М2', null);
# [27-Sep-2024 13:17:24] /elitcar/www/bg/ajax/prices/W00gQkFOTkVSIFA3NCAxMl0.html?_=1727432241614 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', 'BANNER P74 12', 'МАРШРУТ  М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] => ЛЮБОМИР НАЧКОВ
)

# [27-Sep-2024 13:17:24] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAwOTIgUDAwIDA4MF0.html?_=1727432241613 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', 'BOSCH 0 092 P00 080', 'МАРШРУТ  М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_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)

Successfully disconnected from the database!

Successfully disconnected from the database!

Successfully disconnected from the database!

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] => ЛЮБОМИР НАЧКОВ
)

# [27-Sep-2024 13:17:24] /elitcar/www/bg/ajax/products/image/W00gQk9TQ0ggMCAwOTIgUFAwIDA3MF0.html?_=1727432241617 108.61.209.243

set names utf8

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BOSCH 0 092 PP0 070'
            LIMIT 1

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BOSCH 0 092 PP0 070' LIMIT 1

SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)
# [27-Sep-2024 13:17:24] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAwOTIgUFAwIDA3MF0.html?_=1727432241617 108.61.209.243

SELECT * FROM  fn_EShopItemInfo_New('BOSCH 0 092 PA0 080', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');
# [27-Sep-2024 13:17:24] /elitcar/www/bg/ajax/products/image/W00gQk9TQ0ggMCAwOTIgUFAwIDEzMF0.html?_=1727432241617 108.61.209.243

set names utf8

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BOSCH 0 092 PP0 130'
            LIMIT 1

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BOSCH 0 092 PP0 130' LIMIT 1
# [27-Sep-2024 13:17:24] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAwOTIgUFAwIDEzMF0.html?_=1727432241618 108.61.209.243

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('BOSCH 0 092 PA0 080', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT * FROM  fn_EShopItemInfo_New('BOSCH 0 185 756 009', '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 = 'BOSCH 0 092 PA0 080'
            GROUP BY fComp_Id,fItem_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_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'
# [27-Sep-2024 13:17:24] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAwOTIgUEEwIDA4MF0.html?_=1727432241615 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', 'BOSCH 0 092 PA0 080', 'МАРШРУТ  М2', null);

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('BOSCH 0 185 756 009', '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_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] => ЛЮБОМИР НАЧКОВ
)


Successfully disconnected from the database!

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 = 'BOSCH 0 185 756 009'
            GROUP BY fComp_Id,fItem_Id

SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)
# [27-Sep-2024 13:17:24] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAxODUgNzU2IDAwOV0.html?_=1727432241616 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', 'BOSCH 0 185 756 009', 'МАРШРУТ  М2', null);
# [27-Sep-2024 13:17:24] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAwOTIgUEEwIDE1MF0.html?_=1727432241619 108.61.209.243
# [27-Sep-2024 13:17:24] /elitcar/www/bg/ajax/products/image/W00gQk9TQ0ggMCAwOTIgUEEwIDE1MF0.html?_=1727432241619 108.61.209.243

set names utf8

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BOSCH 0 092 PA0 150'
            LIMIT 1

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BOSCH 0 092 PA0 150' LIMIT 1

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

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'

Successfully disconnected from the database!

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'

SELECT * FROM  fn_EShopItemInfo_New('BOSCH 0 092 PP0 070', '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_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_EShopItemInfo_New('BOSCH 0 092 PP0 130', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('BOSCH 0 092 PP0 070', 'EE1D040DB23B48A6B8712B899CBA8660', '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 AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('BOSCH 0 092 PP0 130', '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 = 'BOSCH 0 092 PP0 070'
            GROUP BY fComp_Id,fItem_Id

SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)
# [27-Sep-2024 13:17:25] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAwOTIgUFAwIDA3MF0.html?_=1727432241617 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', 'BOSCH 0 092 PP0 070', 'МАРШРУТ  М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 = 'BOSCH 0 092 PP0 130'
            GROUP BY fComp_Id,fItem_Id
# [27-Sep-2024 13:17:25] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAwOTIgUFAwIDEzMF0.html?_=1727432241618 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', 'BOSCH 0 092 PP0 130', 'МАРШРУТ  М2', null);

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'

Successfully disconnected from the database!

Successfully disconnected from the database!

SELECT * FROM  fn_EShopItemInfo_New('BOSCH 0 092 PA0 150', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('BOSCH 0 092 PA0 150', '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 = 'BOSCH 0 092 PA0 150'
            GROUP BY fComp_Id,fItem_Id
# [27-Sep-2024 13:17:25] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAwOTIgUEEwIDE1MF0.html?_=1727432241619 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', 'BOSCH 0 092 PA0 150', 'МАРШРУТ  М2', null);

Successfully disconnected from the database!
# [27-Sep-2024 13:17:26] /elitcar/www/bg/ajax/products/image/W00gQk9TQ0ggMCAwOTIgUFAwIDA4MF0.html?_=1727432244250 108.61.209.243
# [27-Sep-2024 13:17:26] /elitcar/www/bg/ajax/products/image/W00gQk9TQ0ggMCAwOTIgUFAwIDI4MF0.html?_=1727432244252 108.61.209.243
# [27-Sep-2024 13:17:26] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAwOTIgUFAwIDI4MF0.html?_=1727432244252 108.61.209.243
# [27-Sep-2024 13:17:26] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAwOTIgUFAwIDA4MF0.html?_=1727432244251 108.61.209.243

set names utf8

set names utf8

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BOSCH 0 092 PP0 080'
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BOSCH 0 092 PP0 280'
            LIMIT 1

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BOSCH 0 092 PP0 080' LIMIT 1

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BOSCH 0 092 PP0 280' LIMIT 1

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_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_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

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


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


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

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

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'

SELECT * FROM  fn_EShopItemInfo_New('BOSCH 0 092 PP0 280', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT * FROM  fn_EShopItemInfo_New('BOSCH 0 092 PP0 080', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('BOSCH 0 092 PP0 280', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('BOSCH 0 092 PP0 080', '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 = 'BOSCH 0 092 PP0 280'
            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 = 'BOSCH 0 092 PP0 080'
            GROUP BY fComp_Id,fItem_Id
# [27-Sep-2024 13:17:26] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAwOTIgUFAwIDI4MF0.html?_=1727432244252 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', 'BOSCH 0 092 PP0 280', 'МАРШРУТ  М2', null);
# [27-Sep-2024 13:17:27] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAwOTIgUFAwIDA4MF0.html?_=1727432244251 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', 'BOSCH 0 092 PP0 080', 'МАРШРУТ  М2', null);

Successfully disconnected from the database!

Successfully disconnected from the database!
# [27-Sep-2024 13:17:27] /elitcar/www/bg/ajax/products/image/W00gQkFOTkVSIFJQIDcyXQ.html?_=1727432245587 108.61.209.243

set names utf8

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BANNER RP 72'
            LIMIT 1

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BANNER RP 72' LIMIT 1
# [27-Sep-2024 13:17:27] /elitcar/www/bg/ajax/prices/W00gQkFOTkVSIFJQIDcyXQ.html?_=1727432245587 108.61.209.243
# [27-Sep-2024 13:17:27] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAwOTIgUEEwIDExMF0.html?_=1727432245588 108.61.209.243
# [27-Sep-2024 13:17:27] /elitcar/www/bg/ajax/products/image/W00gQk9TQ0ggMCAwOTIgUEEwIDExMF0.html?_=1727432245587 108.61.209.243
# [27-Sep-2024 13:17:27] /elitcar/www/bg/ajax/products/image/W00gQk9TQ0ggMCAwOTIgUDAwIDA0MF0.html?_=1727432245588 108.61.209.243

set names utf8

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BOSCH 0 092 PA0 110'
            LIMIT 1

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BOSCH 0 092 PA0 110' LIMIT 1

set names utf8

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BOSCH 0 092 P00 040'
            LIMIT 1

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BOSCH 0 092 P00 040' LIMIT 1
# [27-Sep-2024 13:17:27] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAwOTIgUDAwIDA0MF0.html?_=1727432245588 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_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_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_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, '2024-09-27', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-27', '00'

SELECT * FROM  fn_EShopItemInfo_New('BOSCH 0 092 PA0 110', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT * FROM  fn_EShopItemInfo_New('BOSCH 0 092 P00 040', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT * FROM  fn_EShopItemInfo_New('BANNER RP 72', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('BOSCH 0 092 PA0 110', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('BOSCH 0 092 P00 040', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('BANNER RP 72', '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 = 'BOSCH 0 092 PA0 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 = 'BOSCH 0 092 P00 040'
            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 = 'BANNER RP 72'
            GROUP BY fComp_Id,fItem_Id
# [27-Sep-2024 13:17:28] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAwOTIgUEEwIDExMF0.html?_=1727432245588 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', 'BOSCH 0 092 PA0 110', 'МАРШРУТ  М2', null);
# [27-Sep-2024 13:17:28] /elitcar/www/bg/ajax/prices/W00gQkFOTkVSIFJQIDcyXQ.html?_=1727432245587 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', 'BANNER RP 72', 'МАРШРУТ  М2', null);
# [27-Sep-2024 13:17:28] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAwOTIgUDAwIDA0MF0.html?_=1727432245588 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', 'BOSCH 0 092 P00 040', 'МАРШРУТ  М2', null);

Successfully disconnected from the database!

Successfully disconnected from the database!

Successfully disconnected from the database!
# [27-Sep-2024 13:17:29] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAxODUgNzU3IDQwNF0.html?_=1727432247273 108.61.209.243
# [27-Sep-2024 13:17:29] /elitcar/www/bg/ajax/products/image/W00gQk9TQ0ggMCAxODUgNzU3IDQwNF0.html?_=1727432247271 108.61.209.243
# [27-Sep-2024 13:17:29] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAwOTIgUFAwIDE1MF0.html?_=1727432247275 108.61.209.243
# [27-Sep-2024 13:17:29] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAxODUgNzU5IDEwMF0.html?_=1727432247277 108.61.209.243

set names utf8

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BOSCH 0 185 757 404'
            LIMIT 1

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BOSCH 0 185 757 404' LIMIT 1
# [27-Sep-2024 13:17:29] /elitcar/www/bg/ajax/products/image/W00gQk9TQ0ggMCAxODUgNzU5IDEwMF0.html?_=1727432247276 108.61.209.243

set names utf8

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BOSCH 0 185 759 100'
            LIMIT 1

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BOSCH 0 185 759 100' LIMIT 1
# [27-Sep-2024 13:17:29] /elitcar/www/bg/ajax/products/image/W00gQk9TQ0ggMCAwOTIgUFAwIDE1MF0.html?_=1727432247274 108.61.209.243

set names utf8

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BOSCH 0 092 PP0 150'
            LIMIT 1

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BOSCH 0 092 PP0 150' LIMIT 1

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_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_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_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'
# [27-Sep-2024 13:17:29] /elitcar/www/bg/ajax/products/image/W00gQk9TQ0ggMCAwOTIgUFAwIDE4MF0.html?_=1727432247279 108.61.209.243

set names utf8

