Stored Procedures [dbo].[RevenueGetThirdPartyVendor1099Flag_XLedger]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)Direction
@inVendorIDvarchar(15)15
@inBranchIDint4
@out1099Flagbit1Out
Permissions
TypeActionOwning Principal
GrantExecuteMssExec
SQL Script
/*
*    Creates a stored proc for getting the 1099 flag for a vendor by vendor ID and branch.
*    The stored proc does an index seek no matter which vendor data source is used.
*    The RevenueGetThirdPartyVendor1099Flag_Synonym will be set to use the appropriate stored proc for the current
*    system, based upon if they have XLedger, GP, QuickBooks or no accounting system.
*
*/

create procedure [dbo].[RevenueGetThirdPartyVendor1099Flag_XLedger]
    @inVendorID varchar(15),
    @inBranchID int,
    @out1099Flag bit output
as

select
    @out1099Flag = AccountingVendor.Ten99Type
from AccountingVendor
where AccountingVendor.VendorNumber = @inVendorID
GO
GRANT EXECUTE ON  [dbo].[RevenueGetThirdPartyVendor1099Flag_XLedger] TO [MssExec]
GO
Uses