Stored Procedures [dbo].[ARCUpdateCustomerCreditLimit_XLedger]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@inCustomerNumbervarchar(15)15
@inAccountingCustomerIdint4
@inAccountingCustomerCreditLimitTypeIdint4
@inCreditLimitAmountmoney8
Permissions
TypeActionOwning Principal
GrantExecuteMssExec
SQL Script
/**
*
*    Updates the credit limit information for a specific XLedger customer.  This is used by the
*    AR Credit and Collections module.  This info is not passed back to XLedger since XLedger
*    does not have this type of information but is stored in MoversSuite.
*
*    Do NOT call this SP directly.  Instead, call ARCUpdateCustomerCreditLimit_Synonym and then that
*    synonym knows to call this SP or another one based upon that system's active accounting
*    system type.
*/


create procedure [dbo].[ARCUpdateCustomerCreditLimit_XLedger]
    @inCustomerNumber varchar(15),
    @inAccountingCustomerId int,
    @inAccountingCustomerCreditLimitTypeId int,
    @inCreditLimitAmount money
as
begin
    set nocount on

    update AccountingCustomer set
        AccountingCustomerCreditLimitTypeFid = @inAccountingCustomerCreditLimitTypeId
    where AccountingCustomer.AccountingCustomerId = @inAccountingCustomerId

    update GPCustomer set
        AccountingCustomerCreditLimitTypeFid = @inAccountingCustomerCreditLimitTypeId,
        CreditLimitType = AccountingCustomerCreditLimitType.TypeName
    from GPCustomer
    inner join AccountingCustomerCreditLimitType on AccountingCustomerCreditLimitType.AccountingCustomerCreditLimitTypeId = @inAccountingCustomerCreditLimitTypeId
    where GPCustomer.CustomerNumber = @inCustomerNumber
end
GO
GRANT EXECUTE ON  [dbo].[ARCUpdateCustomerCreditLimit_XLedger] TO [MssExec]
GO
Uses