
[dbo].[spAPPG_RunApplyGridForAccountingSystem]
CREATE PROCEDURE [dbo].[spAPPG_RunApplyGridForAccountingSystem]
@SDPriKey int,
@SDDPriKey int,
@inCustomerNumber varchar(15) = null,
@inVendorNumber varchar(15) = null,
@inOrderCustomerNumber varchar(15) = null,
@AccountingSystemType varchar(2) = null
as
set nocount on
if( isnull( @AccountingSystemType, '' ) = '' )
begin
set @AccountingSystemType = dbo.GetAccountingSystemType()
end
if( @AccountingSystemType = 'XL' )
begin
exec spAPPG_XLRunApplyGrid
@SDPriKey = @SDPriKey,
@SDDPriKey = @SDDPriKey,
@inCustomerNumber = @inCustomerNumber,
@inVendorNumber = @inVendorNumber,
@inOrderCustomerNumber = @inOrderCustomerNumber
end
else if( @AccountingSystemType = 'GP' )
begin
exec spAPPG_GPRunApplyGrid
@SDPriKey = @SDPriKey,
@SDDPriKey = @SDDPriKey,
@inCustomerNumber = @inCustomerNumber,
@inVendorNumber = @inVendorNumber,
@inOrderCustomerNumber = @inOrderCustomerNumber
end
else
begin
exec spAPPG_RunApplyGrid
@SDPriKey = @SDPriKey,
@SDDPriKey = @SDDPriKey,
@inCustomerNumber = @inCustomerNumber,
@inVendorNumber = @inVendorNumber,
@inOrderCustomerNumber = @inOrderCustomerNumber
end
GO
GRANT EXECUTE ON [dbo].[spAPPG_RunApplyGridForAccountingSystem] TO [MssExec]
GO