UFN_PDACCOUNTCODEMAPPING_GETOFFICE_2
Returns office guid for transaction being generated.
Return
Return Type |
---|
uniqueidentifier |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@REVENUEID | uniqueidentifier | IN | |
@REVENUESPLITID | uniqueidentifier | IN | |
@INFORMATIONSOURCECODE | tinyint | IN | |
@REVENUETRANSACTIONTYPECODE | tinyint | IN | |
@REVENUESPLITTYPECODE | tinyint | IN | |
@APPLICATIONCODE | tinyint | IN | |
@PAYMENTMETHODCODE | tinyint | IN | |
@DESIGNATIONID | uniqueidentifier | IN | |
@OFFICENUMBER | int | IN | |
@CURRENTAPPUSERID | uniqueidentifier | IN |
Definition
Copy
CREATE function dbo.UFN_PDACCOUNTCODEMAPPING_GETOFFICE_2
(
@REVENUEID uniqueidentifier,
@REVENUESPLITID uniqueidentifier,
@INFORMATIONSOURCECODE tinyint, -- 0 revenue tables, 1 revenue batch tables
@REVENUETRANSACTIONTYPECODE tinyint,
@REVENUESPLITTYPECODE tinyint,
@APPLICATIONCODE tinyint,
@PAYMENTMETHODCODE tinyint,
@DESIGNATIONID uniqueidentifier,
@OFFICENUMBER integer,
@CURRENTAPPUSERID uniqueidentifier = null
)
returns uniqueidentifier
with execute as caller
as begin
declare @OfficeID uniqueidentifier;
set @OfficeID = '1A692E94-3214-44B8-A658-F2927230BC25'; --ID from dbo.PDACCOUNTCODEMAPOFFICE where officeid = 3 : Development - Payments
if @OfficeNumber = 1
set @OfficeID = '71F4373E-C817-448B-853C-9E48CE6B6F56'; --ID from dbo.PDACCOUNTCODEMAPOFFICE where officeid = 1 : Ticketing - Orders
else if @OfficeNumber = 2
set @OfficeID = '081380FF-9639-42B2-A804-6307BF487AFB'; --ID from dbo.PDACCOUNTCODEMAPOFFICE where officeid = 2 : Ticketing - Payments
else if @OfficeNumber = 3
set @OfficeID = '1A692E94-3214-44B8-A658-F2927230BC25'; --ID from dbo.PDACCOUNTCODEMAPOFFICE where officeid = 3 : Development - Payments
else if @OfficeNumber = 4
set @OfficeID = '4C565937-8A30-42D0-A0FC-64D269DBC898'; --ID from dbo.PDACCOUNTCODEMAPOFFICE where officeid = 4 : Development - Pledges
else if @OfficeNumber = 5
set @OfficeID = '31E50EE1-4029-40E4-999D-499375B2AB99'; --ID from dbo.PDACCOUNTCODEMAPOFFICE where officeid = 5 : Development - Benefits
else if @OfficeNumber = 6
set @OfficeID = '40797EBA-446F-4C83-9907-D65FC38410E0'; --ID from dbo.PDACCOUNTCODEMAPOFFICE where officeid = 6 : Development - Planned Gifts
else if @OfficeNumber = 7
set @OfficeID = 'CE11F6CF-AE6F-4263-84C4-D268C938FCEB'; --ID from dbo.PDACCOUNTCODEMAPOFFICE where officeid = 7 : Treasury-Miscellaneous payments
else if @OfficeNumber = 8
set @OfficeID = '0074260A-6756-44c2-8570-D44778956B1D'; --ID from dbo.PDACCOUNTCODEMAPOFFICE where officeid = 8 : Treasury-Adjustments
else if @OfficeNumber = 9
set @OfficeID = '7FDFF48B-4A32-439F-805A-8981AF064A6E'; --ID from dbo.PDACCOUNTCODEMAPOFFICE where officeid = 9 : Fixed Assets
else if @OfficeNumber = 11
set @OfficeID = '1E5CE175-CF60-4FED-985C-46F0F5D4D909'; --ID from dbo.PDACCOUNTCODEMAPOFFICE where officeid = 11 : Development - Grant Awards
else if @OfficeNumber = 12
set @OfficeID = '46920386-2344-42c9-9572-192FBBF06E91'; --ID from dbo.PDACCOUNTCODEMAPOFFICE where officeid = 12 : Development - Gift Aid
else if @OfficeNumber = 13
set @OfficeID = 'EA277BDE-867E-4198-A38E-6FB2F972FD32'; --ID from dbo.PDACCOUNTCODEMAPOFFICE where officeid = 13 : Development - Auction Donations
else if @OfficeNumber = 14
set @OfficeID = 'C4021214-DBB2-4FED-9CB0-6286C0A2DCAC'; --ID from dbo.PDACCOUNTCODEMAPOFFICE where officeid = 13 : Development - Auction Purchase Gain\Loss
else if @OfficeNumber = 15
set @OfficeID = '2DBCE41F-9A2C-4FED-9513-BC09CDE4496C'; --ID from dbo.PDACCOUNTCODEMAPOFFICE where officeid = 13 : Development - Gift Fees
else if @OfficeNumber = 17
set @OfficeID = 'C256C03B-8FD7-4D16-B6C3-5C2C05D7FA92'; --ID from dbo.PDACCOUNTCODEMAPOFFICE where officeid = 17 : Development - Currency
else if @OfficeNumber = 19
set @OfficeID = 'D38E0F1D-845F-42CD-837E-8030F538A32B'; --ID from dbo.PDACCOUNTCODEMAPOFFICE where officeid = 19 : Development - Membership Installment
return @OfficeID;
end