
[dbo].[ARCUpdateCustomerCreditLimit_XLedger]
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