# [19-Sep-2024 16:20:42] /elitcar/www/ 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-19', '00'
# [19-Sep-2024 16:20:42] /elitcar/www/ 108.61.209.243

set names utf8

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

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

Successfully disconnected from the database!
# [19-Sep-2024 16:20:43] /elitcar/www/bg/ajax/history/parts.html?_=1726752043414 108.61.209.243
# [19-Sep-2024 16:20:43] /elitcar/www/bg/ajax/banners/pos_0.html?_=1726752043412 108.61.209.243
# [19-Sep-2024 16:20:43] /elitcar/www/bg/ajax/promo.html?_=1726752043413 108.61.209.243
# [19-Sep-2024 16:20:43] /elitcar/www/bg/ajax/banners/pos_2.html?_=1726752043413 108.61.209.243
# [19-Sep-2024 16:20:43] /elitcar/www/bg/ajax/banners/pos_1.html?_=1726752043413 108.61.209.243
# [19-Sep-2024 16:20:43] /elitcar/www/bg/ajax/promo.html?_=1726752043413 108.61.209.243
# [19-Sep-2024 16:20:43] /elitcar/www/bg/ajax/users/bar.html?_=1726752043465 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
                                [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
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


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


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


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

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

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

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

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

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

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

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

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

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

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

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-19', '00'
# [19-Sep-2024 16:20:44] /elitcar/www/bg/ajax/banners/pos_2.html?_=1726752043413 108.61.209.243

set names utf8

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

Successfully disconnected from the database!
# [19-Sep-2024 16:20:44] /elitcar/www/bg/ajax/history/parts.html?_=1726752043414 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!
# [19-Sep-2024 16:20:44] /elitcar/www/bg/ajax/banners/pos_0.html?_=1726752043412 108.61.209.243

set names utf8

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

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

Successfully disconnected from the database!

SELECT TOP 5
                Item_Id
            FROM
                N_SalesPrice
            WHERE
                Comp_id = '001' AND
                _promotype = 1 AND
                (StartingDate <= GETDATE() OR StartingDate IS NULL) AND
                (EndingDate >= GETDATE() OR EndingDate IS NULL)
            ORDER BY NEWID()
# [19-Sep-2024 16:20:44] /elitcar/www/bg/ajax/banners/pos_1.html?_=1726752043413 108.61.209.243

set names utf8

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

Successfully disconnected from the database!
# [19-Sep-2024 16:20:44] /elitcar/www/bg/ajax/users/bar.html?_=1726752043465 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!

set names utf8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'STARLINE 99.40.542'

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

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `ProductId` = 10599892
            LIMIT 1

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

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'STARLINE 99.40.541'

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

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `ProductId` = 10599891
            LIMIT 1

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

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'STARLINE 99.40.554'

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

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `ProductId` = 12344334
            LIMIT 1

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

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

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

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

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

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

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BGS 3245-1'

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

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

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'BGS 3245-1'
            ORDER BY N_Item.Id
# [19-Sep-2024 16:20:47] /elitcar/www/bg/tecdoc/30/WzMwXVswIDA5MiBQUDAgMjYwXVtNIEJPU0NIIDAgMDkyIFBQMCAyNjBd.html?sn=0 092 PP0 260 108.61.209.243

set names utf8

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

SELECT
                `elitcar_store`.`moneta`.`ProductId`
            FROM
                `elitcar_store`.`moneta`
                INNER JOIN `autokelly`.`recommended` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`recommended`.`ProductId`
            WHERE
                `elitcar_store`.`moneta`.`MonetaId` = 'BOSCH 0 092 PP0 260'
            LIMIT 1

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

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

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

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

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = '0092pp0260' AND `ProducerId` = 30

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'cb704' AND `ProducerId` = 376

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'db704' AND `ProducerId` = 434

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 's56819' AND `ProducerId` = 234

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

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

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

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

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

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'eb704' AND `ProducerId` = 24

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

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

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

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

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

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'fb704' AND `ProducerId` = 241

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = '18010010' AND `ProducerId` = 6923

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'sb704' AND `ProducerId` = 375

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'tb704' AND `ProducerId` = 212

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

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

SELECT
                    *
                FROM
                    `elitcar_store`.`moneta`
                WHERE
                    `ReusableGroupId` = 'D6C1BA7758384610BF49E9720BE3600E' AND
                    `MonetaId` NOT IN ('BOSCH 0 092 PP0 260','ERA S56819','EXIDE EB704') AND
                    `QtyAll` > 0
                ORDER BY
                    `Sales`  DESC,
                    `Qty`  DESC,
                    `QtyAll`  DESC

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

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

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'VARTA 572501076D842'
            LIMIT 1

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

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

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `ProductId` = 11935073
            LIMIT 1

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

SELECT
                `autokelly`.`product`.`Id` AS ProductId,
                `autokelly`.`productcriterium`.*,
                `autokelly`.`codeprimary`.`CodeValue` AS Code,
                `autokelly`.`criteriumtext`.`Name` AS CriteriumName,
                `autokelly`.`criteriumunittext`.`Code` AS CriteriumUnitText,
                CASE `autokelly`.`productcriterium`.`CriteriumType`
                    WHEN 1
                    THEN (SELECT
                            `autokelly`.`criteriumvaluetext`.Value
                        FROM
                            `autokelly`.`criteriumvalue`
                            INNER JOIN `autokelly`.`criteriumvaluetext` ON
                                `autokelly`.`criteriumvaluetext`.`CriteriumValueId` = `autokelly`.`criteriumvalue`.`Id` AND
                                `autokelly`.`criteriumvaluetext`.`CountryType` = 'BG'
                        WHERE
                            `autokelly`.`criteriumvalue`.`CriteriumId` = `autokelly`.`criterium`.`Id` AND
                            `autokelly`.`criteriumvalue`.`ValueId` = `autokelly`.`productcriterium`.`Value`
                        LIMIT 1)
                    ELSE `autokelly`.`productcriterium`.Value
                END AS `Value`,
                `autokelly`.`criterium`.`Order`
            FROM
                `autokelly`.`codeprimary`
                INNER JOIN `autokelly`.`product` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`productcriterium` ON  `autokelly`.`productcriterium`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`criterium` ON `autokelly`.`criterium`.`Id` = `autokelly`.`productcriterium`.CriteriumId
                INNER JOIN `autokelly`.`criteriumtext` ON `autokelly`.`criteriumtext`.`CriteriumId` = `autokelly`.`productcriterium`.`CriteriumId` AND `autokelly`.`criteriumtext`.`CountryType` = 'BG'
                LEFT JOIN `autokelly`.`criteriumunit` ON `autokelly`.`criteriumunit`.`Id` = `autokelly`.`criterium`.`CriteriumUnitId`
                LEFT JOIN `autokelly`.`criteriumunittext` ON `autokelly`.`criteriumunittext`.`CriteriumUnitId` = `autokelly`.`criterium`.`CriteriumUnitId` AND `autokelly`.`criteriumunittext`.`CountryType` = 'BG'
            WHERE
                `autokelly`.`codeprimary`.`ProductId` = 11935073 AND
                `autokelly`.`criterium`.`Order` = 100
            ORDER BY
                /* `autokelly`.`product`.`Id`, ??? */
                `autokelly`.`productcriterium`.`Group`,
                `autokelly`.`productcriterium`.`Order`
         LIMIT 5

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

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

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `ProductId` = 12840768
            LIMIT 1

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

SELECT
                `autokelly`.`product`.`Id` AS ProductId,
                `autokelly`.`productcriterium`.*,
                `autokelly`.`codeprimary`.`CodeValue` AS Code,
                `autokelly`.`criteriumtext`.`Name` AS CriteriumName,
                `autokelly`.`criteriumunittext`.`Code` AS CriteriumUnitText,
                CASE `autokelly`.`productcriterium`.`CriteriumType`
                    WHEN 1
                    THEN (SELECT
                            `autokelly`.`criteriumvaluetext`.Value
                        FROM
                            `autokelly`.`criteriumvalue`
                            INNER JOIN `autokelly`.`criteriumvaluetext` ON
                                `autokelly`.`criteriumvaluetext`.`CriteriumValueId` = `autokelly`.`criteriumvalue`.`Id` AND
                                `autokelly`.`criteriumvaluetext`.`CountryType` = 'BG'
                        WHERE
                            `autokelly`.`criteriumvalue`.`CriteriumId` = `autokelly`.`criterium`.`Id` AND
                            `autokelly`.`criteriumvalue`.`ValueId` = `autokelly`.`productcriterium`.`Value`
                        LIMIT 1)
                    ELSE `autokelly`.`productcriterium`.Value
                END AS `Value`,
                `autokelly`.`criterium`.`Order`
            FROM
                `autokelly`.`codeprimary`
                INNER JOIN `autokelly`.`product` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`productcriterium` ON  `autokelly`.`productcriterium`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`criterium` ON `autokelly`.`criterium`.`Id` = `autokelly`.`productcriterium`.CriteriumId
                INNER JOIN `autokelly`.`criteriumtext` ON `autokelly`.`criteriumtext`.`CriteriumId` = `autokelly`.`productcriterium`.`CriteriumId` AND `autokelly`.`criteriumtext`.`CountryType` = 'BG'
                LEFT JOIN `autokelly`.`criteriumunit` ON `autokelly`.`criteriumunit`.`Id` = `autokelly`.`criterium`.`CriteriumUnitId`
                LEFT JOIN `autokelly`.`criteriumunittext` ON `autokelly`.`criteriumunittext`.`CriteriumUnitId` = `autokelly`.`criterium`.`CriteriumUnitId` AND `autokelly`.`criteriumunittext`.`CountryType` = 'BG'
            WHERE
                `autokelly`.`codeprimary`.`ProductId` = 12840768 AND
                `autokelly`.`criterium`.`Order` = 100
            ORDER BY
                /* `autokelly`.`product`.`Id`, ??? */
                `autokelly`.`productcriterium`.`Group`,
                `autokelly`.`productcriterium`.`Order`
         LIMIT 5

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

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `ProductId` = 1415424
            LIMIT 1

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

SELECT
                `autokelly`.`product`.`Id` AS ProductId,
                `autokelly`.`productcriterium`.*,
                `autokelly`.`codeprimary`.`CodeValue` AS Code,
                `autokelly`.`criteriumtext`.`Name` AS CriteriumName,
                `autokelly`.`criteriumunittext`.`Code` AS CriteriumUnitText,
                CASE `autokelly`.`productcriterium`.`CriteriumType`
                    WHEN 1
                    THEN (SELECT
                            `autokelly`.`criteriumvaluetext`.Value
                        FROM
                            `autokelly`.`criteriumvalue`
                            INNER JOIN `autokelly`.`criteriumvaluetext` ON
                                `autokelly`.`criteriumvaluetext`.`CriteriumValueId` = `autokelly`.`criteriumvalue`.`Id` AND
                                `autokelly`.`criteriumvaluetext`.`CountryType` = 'BG'
                        WHERE
                            `autokelly`.`criteriumvalue`.`CriteriumId` = `autokelly`.`criterium`.`Id` AND
                            `autokelly`.`criteriumvalue`.`ValueId` = `autokelly`.`productcriterium`.`Value`
                        LIMIT 1)
                    ELSE `autokelly`.`productcriterium`.Value
                END AS `Value`,
                `autokelly`.`criterium`.`Order`
            FROM
                `autokelly`.`codeprimary`
                INNER JOIN `autokelly`.`product` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`productcriterium` ON  `autokelly`.`productcriterium`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`criterium` ON `autokelly`.`criterium`.`Id` = `autokelly`.`productcriterium`.CriteriumId
                INNER JOIN `autokelly`.`criteriumtext` ON `autokelly`.`criteriumtext`.`CriteriumId` = `autokelly`.`productcriterium`.`CriteriumId` AND `autokelly`.`criteriumtext`.`CountryType` = 'BG'
                LEFT JOIN `autokelly`.`criteriumunit` ON `autokelly`.`criteriumunit`.`Id` = `autokelly`.`criterium`.`CriteriumUnitId`
                LEFT JOIN `autokelly`.`criteriumunittext` ON `autokelly`.`criteriumunittext`.`CriteriumUnitId` = `autokelly`.`criterium`.`CriteriumUnitId` AND `autokelly`.`criteriumunittext`.`CountryType` = 'BG'
            WHERE
                `autokelly`.`codeprimary`.`ProductId` = 1415424 AND
                `autokelly`.`criterium`.`Order` = 100
            ORDER BY
                /* `autokelly`.`product`.`Id`, ??? */
                `autokelly`.`productcriterium`.`Group`,
                `autokelly`.`productcriterium`.`Order`
         LIMIT 5

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

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `ProductId` = 12840769
            LIMIT 1

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

SELECT
                `autokelly`.`product`.`Id` AS ProductId,
                `autokelly`.`productcriterium`.*,
                `autokelly`.`codeprimary`.`CodeValue` AS Code,
                `autokelly`.`criteriumtext`.`Name` AS CriteriumName,
                `autokelly`.`criteriumunittext`.`Code` AS CriteriumUnitText,
                CASE `autokelly`.`productcriterium`.`CriteriumType`
                    WHEN 1
                    THEN (SELECT
                            `autokelly`.`criteriumvaluetext`.Value
                        FROM
                            `autokelly`.`criteriumvalue`
                            INNER JOIN `autokelly`.`criteriumvaluetext` ON
                                `autokelly`.`criteriumvaluetext`.`CriteriumValueId` = `autokelly`.`criteriumvalue`.`Id` AND
                                `autokelly`.`criteriumvaluetext`.`CountryType` = 'BG'
                        WHERE
                            `autokelly`.`criteriumvalue`.`CriteriumId` = `autokelly`.`criterium`.`Id` AND
                            `autokelly`.`criteriumvalue`.`ValueId` = `autokelly`.`productcriterium`.`Value`
                        LIMIT 1)
                    ELSE `autokelly`.`productcriterium`.Value
                END AS `Value`,
                `autokelly`.`criterium`.`Order`
            FROM
                `autokelly`.`codeprimary`
                INNER JOIN `autokelly`.`product` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`productcriterium` ON  `autokelly`.`productcriterium`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`criterium` ON `autokelly`.`criterium`.`Id` = `autokelly`.`productcriterium`.CriteriumId
                INNER JOIN `autokelly`.`criteriumtext` ON `autokelly`.`criteriumtext`.`CriteriumId` = `autokelly`.`productcriterium`.`CriteriumId` AND `autokelly`.`criteriumtext`.`CountryType` = 'BG'
                LEFT JOIN `autokelly`.`criteriumunit` ON `autokelly`.`criteriumunit`.`Id` = `autokelly`.`criterium`.`CriteriumUnitId`
                LEFT JOIN `autokelly`.`criteriumunittext` ON `autokelly`.`criteriumunittext`.`CriteriumUnitId` = `autokelly`.`criterium`.`CriteriumUnitId` AND `autokelly`.`criteriumunittext`.`CountryType` = 'BG'
            WHERE
                `autokelly`.`codeprimary`.`ProductId` = 12840769 AND
                `autokelly`.`criterium`.`Order` = 100
            ORDER BY
                /* `autokelly`.`product`.`Id`, ??? */
                `autokelly`.`productcriterium`.`Group`,
                `autokelly`.`productcriterium`.`Order`
         LIMIT 5

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

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

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

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

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

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

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

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

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

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

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'BOSCH F 026 C00 467'
            ORDER BY N_Item.Id
# [19-Sep-2024 16:20:48] /elitcar/www/bg/tecdoc/30/WzMwXVswIDA5MiBQUDAgMjYwXVtNIEJPU0NIIDAgMDkyIFBQMCAyNjBd.html?sn=0 092 PP0 260 108.61.209.243

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'ZF PARTS 7852 974 823'

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

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'ZF PARTS 7852 974 823'
            LIMIT 1

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

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BOSCH 0 684 400 253'

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

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BOSCH 0 684 400 253'
            LIMIT 1

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

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

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

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

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

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

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

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-19', '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!
# [19-Sep-2024 16:20:50] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAwOTIgUFAwIDI2MF0.html?_=1726752049829 108.61.209.243
# [19-Sep-2024 16:20:50] /elitcar/www/bg/ajax/history/insert.html?_=1726752049825 108.61.209.243
# [19-Sep-2024 16:20:50] /elitcar/www/bg/ajax/moneta/sort.html?_=1726752049830 108.61.209.243
# [19-Sep-2024 16:20:50] /elitcar/www/bg/ajax/history/parts.html?_=1726752049830 108.61.209.243
# [19-Sep-2024 16:20:50] /elitcar/www/bg/ajax/users/bar.html?_=1726752049875 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
                                [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
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


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


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

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

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

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

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

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

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

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

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-19', '00'
# [19-Sep-2024 16:20:50] /elitcar/www/bg/ajax/moneta/sort.html?_=1726752049830 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('ERA S56819','EXIDE EB704','VARTA 5704120633132','VARTA 572501076D842','BOSCH 0 092 S40 260','BANNER P80 09','BANNER 570 15','TAB POLAR 70 JIS','BANNER P70 29','TAB POLAR 75 JIS','BOSCH 0 092 S4E 410','BOSCH 0 092 PE0 410')
            ORDER BY
                `elitcar_store`.`availabilities`.`Qty` DESC,
                `elitcar_store`.`moneta`.`Qty` DESC,
                `elitcar_store`.`moneta`.`QtyAll` DESC,
                `elitcar_store`.`moneta`.`Sales` DESC

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

Successfully disconnected from the database!

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-19', '00'
# [19-Sep-2024 16:20:50] /elitcar/www/bg/ajax/history/parts.html?_=1726752049830 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!
# [19-Sep-2024 16:20:50] /elitcar/www/bg/ajax/prices/W00gQkFOTkVSIDU3MCAxNV0.html?_=1726752050358 108.61.209.243
# [19-Sep-2024 16:20:50] /elitcar/www/bg/ajax/prices/W00gVkFSVEEgNTcwNDEyMDYzMzEzMl0.html?_=1726752050359 108.61.209.243
# [19-Sep-2024 16:20:50] /elitcar/www/bg/ajax/users/bar.html?_=1726752049875 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!
# [19-Sep-2024 16:20:50] /elitcar/www/bg/ajax/prices/W00gVkFSVEEgNTcyNTAxMDc2RDg0Ml0.html?_=1726752050360 108.61.209.243

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('BOSCH 0 092 PP0 260', 'EE1D040DB23B48A6B8712B899CBA8660', '00')
# [19-Sep-2024 16:20:50] /elitcar/www/bg/ajax/prices/W00gRVhJREUgRUI3MDRd.html?_=1726752050360 108.61.209.243

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'BOSCH 0 092 PP0 260'
            GROUP BY fComp_Id,fItem_Id
# [19-Sep-2024 16:20:50] /elitcar/www/bg/ajax/history/insert.html?_=1726752049825 108.61.209.243

set names utf8

SELECT * FROM `history_parts` LIMIT 1

SHOW COLUMNS FROM `history_parts`

REPLACE INTO `history_parts` SET `Url` = 'https://digith.ink/elitcar/www/bg/tecdoc/30/WzMwXVswIDA5MiBQUDAgMjYwXVtNIEJPU0NIIDAgMDkyIFBQMCAyNjBd.html?sn=0 092 PP0 260', `PostDate` = '2024-09-19 16:20:50', `MonetaUser` = 'lubo', `Language` = 'bg', `Brand` = 'BOSCH', `SearchNumber` = '0 092 PP0 260', `PartName` = 'стартов акумулатор'

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

SELECT * FROM `ul_parts` LIMIT 1

SHOW COLUMNS FROM `ul_parts`

INSERT INTO `ul_parts` SET `Url` = 'https://digith.ink/elitcar/www/bg/tecdoc/30/WzMwXVswIDA5MiBQUDAgMjYwXVtNIEJPU0NIIDAgMDkyIFBQMCAyNjBd.html?sn=0 092 PP0 260', `PostDate` = '2024-09-19 16:20:50', `MonetaUser` = 'lubo', `Brand` = 'BOSCH', `SearchNumber` = '0 092 PP0 260', `PartName` = 'стартов акумулатор', `IP` = '108.61.209.243', `MonetaName` = 'ЛЮБОМИР НАЧКОВ', `MonetaObject` = '00'

SELECT * FROM (
                SELECT
                    IP,
                    COUNT(*) AS NumRows,
                    TIME_TO_SEC(TIMEDIFF(MAX(PostDate), MIN(PostDate))) / COUNT(IP) AS SecPerRow,
                    MonetaUser,
                    MonetaName,
                    MonetaObject
                FROM
                    `elitcar_store`.`ul_parts`
                WHERE
                    MonetaUser = 'lubo' AND
                    DATE(`PostDate`) = DATE(CURDATE())
                GROUP BY IP, MonetaUser
                ORDER BY NumRows DESC
            ) AS T
            WHERE
                NumRows > 100 AND
                SecPerRow < 180

SELECT * FROM (
                SELECT
                    IP,
                    COUNT(IP) AS NumRows,
                    COUNT(DISTINCT SearchNumber) AS NumSearchNumbers,
                    TIME_TO_SEC(TIMEDIFF(MAX(PostDate), MIN(PostDate))) / COUNT(IP) AS SecPerRow,
                    Brand,
                    MonetaUser,
                    MonetaName,
                    MonetaObject
                FROM
                    `elitcar_store`.`ul_parts`
                WHERE
                    MonetaUser = 'lubo' AND
                    DATE(`PostDate`) = DATE(CURDATE())
                GROUP BY IP, Brand, MonetaUser
            ) AS T
            WHERE
                NumRows > 30 AND
                SecPerRow < 600

Successfully disconnected from the database!
# [19-Sep-2024 16:20:50] /elitcar/www/bg/ajax/prices/W00gQk9TQ0ggMCAwOTIgUFAwIDI2MF0.html?_=1726752049829 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 260', 'МАРШРУТ  М2', null);
# [19-Sep-2024 16:20:50] /elitcar/www/bg/ajax/prices/W00gVEFCIFBPTEFSIDcwIEpJU10.html?_=1726752050361 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'

Successfully disconnected from the database!

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_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] => ЛЮБОМИР НАЧКОВ
)

# [19-Sep-2024 16:20:50] /elitcar/www/bg/ajax/prices/W00gQkFOTkVSIFA3MCAyOV0.html?_=1726752050362 108.61.209.243

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


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

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

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

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

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

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

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-19', '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
                                [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'

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

SELECT * FROM  fn_EShopItemInfo_New('BANNER 570 15', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT * FROM  fn_EShopItemInfo_New('VARTA 572501076D842', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT * FROM  fn_EShopItemInfo_New('VARTA 5704120633132', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

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

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('BANNER 570 15', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('VARTA 5704120633132', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('VARTA 572501076D842', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

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

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

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('EXIDE EB704', '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 = 'BANNER 570 15'
            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 = 'VARTA 5704120633132'
            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 = 'VARTA 572501076D842'
            GROUP BY fComp_Id,fItem_Id

SELECT * FROM  fn_EShopItemInfo_New('TAB POLAR 70 JIS', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001',0, '2024-09-19', '00'
# [19-Sep-2024 16:20:51] /elitcar/www/bg/ajax/prices/W00gQkFOTkVSIDU3MCAxNV0.html?_=1726752050358 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 570 15', 'МАРШРУТ  М2', null);
# [19-Sep-2024 16:20:51] /elitcar/www/bg/ajax/prices/W00gVkFSVEEgNTcwNDEyMDYzMzEzMl0.html?_=1726752050359 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', 'VARTA 5704120633132', 'МАРШРУТ  М2', null);
# [19-Sep-2024 16:20:51] /elitcar/www/bg/ajax/prices/W00gVkFSVEEgNTcyNTAxMDc2RDg0Ml0.html?_=1726752050360 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', 'VARTA 572501076D842', 'МАРШРУТ  М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 = 'EXIDE EB704'
            GROUP BY fComp_Id,fItem_Id

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('TAB POLAR 70 JIS', 'EE1D040DB23B48A6B8712B899CBA8660', '00')
# [19-Sep-2024 16:20:51] /elitcar/www/bg/ajax/prices/W00gRVhJREUgRUI3MDRd.html?_=1726752050360 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', 'EXIDE EB704', 'МАРШРУТ  М2', null);

SELECT * FROM  fn_EShopItemInfo_New('BANNER P70 29', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

Successfully disconnected from the database!

Successfully disconnected from the database!

Successfully disconnected from the database!

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

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('BANNER P70 29', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

Successfully disconnected from the database!
# [19-Sep-2024 16:20:51] /elitcar/www/bg/ajax/prices/W00gVEFCIFBPTEFSIDcwIEpJU10.html?_=1726752050361 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', 'TAB POLAR 70 JIS', 'МАРШРУТ  М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 = 'BANNER P70 29'
            GROUP BY fComp_Id,fItem_Id
# [19-Sep-2024 16:20:51] /elitcar/www/admin/bg/ajax/products/bar/W00gQk9TQ0ggMCAwOTIgUFAwIDI2MF0.html?_=1726752051212 108.61.209.243

Successfully disconnected from the database!
# [19-Sep-2024 16:20:51] /elitcar/www/bg/ajax/prices/W00gQkFOTkVSIFA3MCAyOV0.html?_=1726752050362 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 P70 29', 'МАРШРУТ  М2', null);

Successfully disconnected from the database!

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_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-19', '00'
# [19-Sep-2024 16:20:51] /elitcar/www/admin/bg/ajax/products/bar/W00gQk9TQ0ggMCAwOTIgUFAwIDI2MF0.html?_=1726752051212 108.61.209.243

set names utf8

SELECT
                COUNT(`MonetaID`)
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BOSCH 0 092 PP0 260'
            LIMIT 1

Successfully disconnected from the database!
