OpenPetra
Free Administration Software for Non-Profits
Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector Class Reference

This connector provides data for the finance Gift screens /summary> More...

Static Public Member Functions

static GiftBatchTDS CreateAGiftBatch (Int32 ALedgerNumber)
 create a new batch with a consecutive batch number in the ledger, and immediately store the batch and the new number in the database More...
 
static GiftBatchTDS CreateAGiftBatch (Int32 ALedgerNumber, DateTime ADateEffective, string ABatchDescription, TDataBase ADataBase=null)
 
static GiftBatchTDS CreateARecurringGiftBatch (Int32 ALedgerNumber, TDataBase ADataBase=null)
 create a new recurring batch with a consecutive batch number in the ledger, and immediately store the batch and the new number in the database More...
 
static bool SubmitRecurringGiftBatch (Int32 ALedgerNumber, Int32 ARecurringBatchNumber, DateTime AEffectiveDate, string AReference, Decimal AExchangeRateToBase, Decimal AExchangeRateIntlToBase, out int ANewGiftBatchNo)
 create a gift batch from a recurring gift batch including gift and gift detail More...
 
static DataTable GetAvailableGiftYears (Int32 ALedgerNumber, out String ADisplayMember, out String AValueMember)
 Loads all available years with gift data into a table To be used by a combobox to select the financial year More...
 
static GiftBatchTDS LoadALedgerTable (Int32 ALedgerNumber)
 returns ledger table for specified ledger More...
 
static GiftBatchTDS LoadAGiftBatchForYearPeriod (Int32 ALedgerNumber, Int32 AYear, Int32 APeriod, String ABatchStatus, out String ACurrencyCode)
 loads a list of batches for the given ledger also get the ledger for the base currency etc More...
 
static GiftBatchTDS LoadAGiftBatch (Int32 ALedgerNumber, Int32 ABatchNumber, out String ACurrencyCode)
 loads a specific gift batch More...
 
static GiftBatchTDS LoadAGiftBatchesForCurrentYear (Int32 ALedgerNumber)
 loads a list of batches for the given ledger's current year More...
 
static GiftBatchTDS LoadAGiftBatchesForCurrentYearPeriod (Int32 ALedgerNumber)
 loads a list of batches for the given ledger's current year and current plus forwarding periods More...
 
static GiftBatchTDS LoadAGiftSingle (Int32 ALedgerNumber, Int32 ABatchNumber, Int32 AGiftTransactionNumber)
 loads a GiftBatchTDS for a whole transaction (i.e. all details in the specified gift) More...
 
static GiftBatchTDSAGiftDetailTable LoadDonorLastPostedGift (Int64 ADonorPartnerKey, Int32 ALedgerNumber, DateTime ALatestUnpostedGiftDateEntered)
 Loads a donor's last gift (if it exists) and returns the associated gift details. More...
 
static Boolean DonorHasGiven (Int32 ALedgerNumber, Int64 ADonorPartnerKey)
 Returns True if this person is a Gift Donor. More...
 
static GiftBatchTDS LoadAGiftBatchSingle (Int32 ALedgerNumber, Int32 ABatchNumber, out Boolean ABatchIsUnposted, out string ACurrencyCode)
 loads a specific gift batch, without gift transactions nor details More...
 
static GiftBatchTDS LoadARecurringGiftBatch (Int32 ALedgerNumber)
 loads a list of recurring batches for the given ledger also get the ledger for the base currency etc TODO: limit to period, limit to batch status, etc More...
 
static GiftBatchTDS LoadARecurringGiftBatchSingle (Int32 ALedgerNumber, Int32 ABatchNumber)
 loads a list of recurring batches for the given ledger also get the ledger for the base currency etc TODO: limit to period, limit to batch status, etc More...
 
static string RetrieveCostCentreCodeForRecipient (Int32 ALedgerNumber, Int64 ARecipientPartnerKey, Int64 ARecipientLedgerNumber, DateTime ADateGiftEntered, String AMotivationGroupCode, String AMotivationDetailCode, out bool APartnerIsMissingLink)
 Retrieve the cost centre code for the recipient More...
 
static bool IsRecipientLedgerNumberSetupForILT (Int32 ALedgerNumber, Int64 ARecipientPartnerKey, Int64 ARecipientLedgerNumber, out TVerificationResultCollection AVerificationResults)
 Check that the chosen recipient ledger is set up for ILT - or that the recipient has a separate cost centre More...
 
static bool LoadGiftTransactionsForBatch (Int32 ALedgerNumber, Int32 ABatchNumber, out Boolean ABatchIsUnposted, out String ACurrencyCode, out GiftBatchTDS AMainDS, out TVerificationResultCollection AVerificationResult)
 loads a list of gift transactions and details for the given ledger and batch More...
 
static bool LoadGiftTransactionAndDetails (Int32 ALedgerNumber, Int32 ABatchNumber, Int32 AGiftTransactionNumber, out Boolean ABatchIsUnposted, out String ACurrencyCode, out GiftBatchTDS AMainDS, out TVerificationResultCollection AVerificationResult)
 loads the specified gift transaction and its details More...
 
static bool LoadGiftTransactionAndDetail (Int32 ALedgerNumber, Int32 ABatchNumber, Int32 AGiftTransactionNumber, Int32 ADetailNumber, out Boolean ABatchIsUnposted, out String ACurrencyCode, out GiftBatchTDS AMainDS, out TVerificationResultCollection AVerificationResult)
 loads the specified gift transaction and the specified gift detail More...
 
static GiftBatchTDS LoadBankingDetailsOfPartner (Int64 APartnerKey)
 loads a list of banking details for the given partner More...
 
static GiftBatchTDS LoadRecurringGiftTransactionsForBatch (Int32 ALedgerNumber, Int32 ABatchNumber)
 loads a list of recurring gift transactions and details for the given ledger and recurring batch More...
 
static GiftBatchTDS LoadDonorRecipientHistory (Hashtable requestParams, out TVerificationResultCollection AMessages)
 loads a list of gift transactions and details for the given ledger and batch More...
 
static TSubmitChangesResult SaveGiftBatchTDS (ref GiftBatchTDS AInspectDS, out TVerificationResultCollection AVerificationResult, TDataBase ADataBase=null)
 this will store all new and modified batches, gift transactions and details More...
 
static bool CancelBatch (Int32 ALedgerNumber, Int32 ABatchNumber, out TVerificationResultCollection AVerificationResult)
 cancel a Gift Batch More...
 
static bool PreviewGiftBatch (Int32 ALedgerNumber, Int32 ABatchNumber, out string ResultingTotals)
 return a string that shows the totals for each Motivation Detail More...
 
static bool MaintainBatches (string action, Int32 ALedgerNumber, Int32 ABatchNumber, string ABatchDescription, DateTime AGlEffectiveDate, string ABankAccountCode, string ABankCostCentre, out TVerificationResultCollection AVerificationResult)
 this will save and delete a batch More...
 
static bool MaintainRecurringBatches (string action, Int32 ALedgerNumber, Int32 ABatchNumber, string ABatchDescription, string ABankAccountCode, string ABankCostCentre, out TVerificationResultCollection AVerificationResult)
 this will save and delete a recurring gift batch More...
 
static bool MaintainGifts (string action, Int32 ALedgerNumber, Int32 ABatchNumber, Int32 AGiftTransactionNumber, DateTime ADateEntered, Int64 ADonorKey, string AReference, out TVerificationResultCollection AVerificationResult)
 this will create, save and delete a gift transaction More...
 
static bool MaintainRecurringGifts (string action, Int32 ALedgerNumber, Int32 ABatchNumber, Int32 AGiftTransactionNumber, Int64 ADonorKey, string AReference, Int32 ABankingDetailsKey, string ASepaMandateReference, DateTime? ASepaMandateGiven, out TVerificationResultCollection AVerificationResult)
 this will create, save and delete a recurring gift transaction More...
 
static bool MaintainGiftDetails (string action, Int32 ALedgerNumber, Int32 ABatchNumber, Int32 AGiftTransactionNumber, Int32 ADetailNumber, Decimal AGiftTransactionAmount, string AGiftCommentOne, string AMotivationGroupCode, string AMotivationDetailCode, Int64 ARecipientKey, out TVerificationResultCollection AVerificationResult)
 this will create, save and delete a gift detail More...
 
static bool MaintainRecurringGiftDetails (string action, Int32 ALedgerNumber, Int32 ABatchNumber, Int32 AGiftTransactionNumber, Int32 ADetailNumber, Decimal AGiftAmount, string AGiftCommentOne, string AMotivationGroupCode, string AMotivationDetailCode, Int64 ARecipientKey, DateTime AStartDonations, DateTime? AEndDonations, out TVerificationResultCollection AVerificationResult)
 this will create, save and delete a recurring gift detail More...
 
static DataTable FindGiftRecipientExWorker (DataTable AGiftDetailsToCheck, int ANotInBatchNumber=-1)
 Returns a table of gifts with Ex-Worker recipients More...
 
static void LoadGiftDonorRelatedData (GiftBatchTDS AGiftDS, bool ARecurring, Int32 ALedgerNumber, Int32 ABatchNumber, TDBTransaction ATransaction)
 load the donor names and tax settings and bank accounts for a given batch More...
 
static bool CheckCostCentreLinkForRecipient (Int32 ALedgerNumber, Int64 APartnerKey, out string ACostCentreCode)
 Check if an entry exists in ValidLedgerNumber for the specified ledger number and partner key More...
 
static Int64 GetRecipientGiftDestination (Int64 APartnerKey, DateTime ? AGiftDate)
 Get gift destination for recipient More...
 
static bool CheckCostCentreDestinationForRecipient (Int32 ALedgerNumber, Int64 APartnerKey, out string ACostCentreCode, TDataBase ADataBase=null)
 Check if an entry exists in ValidLedgerNumber for the specified ledger number and partner key More...
 
static GiftBatchTDS LoadAGiftBatchAndRelatedData (Int32 ALedgerNumber, Int32 ABatchNumber, bool AExcludeBatchRow=false)
 Create GiftBatchTDS with the gift batch to post, and all gift transactions and details, and motivation details More...
 
static GiftBatchTDS LoadAGiftBatchAndRelatedData (Int32 ALedgerNumber, Int32 ABatchNumber, TDBTransaction ATransaction, out bool AChangesToCommit, bool AExcludeBatchRow=false)
 Create GiftBatchTDS with the gift batch to post, and all gift transactions and details, and motivation details. Public for tests More...
 
static GiftBatchTDS LoadARecurringGiftBatchAndRelatedData (Int32 ALedgerNumber, Int32 ABatchNumber, bool AExcludeBatchRow=false)
 Create GiftBatchTDS with the gift batch to post, and all gift transactions and details, and motivation details More...
 
static decimal CalculateAdminFee (GiftBatchTDS AMainDS, Int32 ALedgerNumber, string AFeeCode, decimal AGiftAmount, out TVerificationResultCollection AVerificationResult)
 calculate the admin fee for a given amount. public so that it can be tested by NUnit tests. More...
 
static void AddToFeeTotals (Int32 ALedgerNumber, GiftBatchTDS AMainDS, AGiftDetailRow AGiftDetailRow, string AFeeCode, decimal AFeeAmount, int APostingPeriod)
 Public for tests More...
 
static GiftBatchTDS PrepareGiftBatchForPosting (Int32 ALedgerNumber, Int32 ABatchNumber, ref TDBTransaction ATransaction, out TVerificationResultCollection AVerifications)
 Prepares the gift batch for posting. Public for test. More...
 
static bool PostGiftBatch (Int32 ALedgerNumber, Int32 AGiftBatchNumber, out Int32 AGeneratedGlBatchNumber, out TVerificationResultCollection AVerifications, TDataBase ADataBase=null)
 post a Gift Batch More...
 
static bool PostGiftBatches (Int32 ALedgerNumber, List< Int32 >AGiftBatchNumbers, List< Int32 >AGeneratedGLBatchNumbers, out TVerificationResultCollection AVerifications, TDataBase ADataBase=null)
 post several gift batches at once More...
 
static Int32 ExportAllGiftBatchData (Int32 ALedgerNumber, Int32 ABatchNumberStart, Int32 ABatchNumberEnd, DateTime? ABatchDateFrom, DateTime? ABatchDateTo, string ADateFormatString, bool ASummary, bool AUseBaseCurrency, DateTime? ADateForSummary, string ANumberFormat, bool ATransactionsOnly, bool AExtraColumns, Int64 ARecipientNumber, Int64 AFieldNumber, bool AIncludeUnposted, out String AExportExcel, out TVerificationResultCollection AMessages)
 export all the Data of the batches matching the parameters to a String More...
 
static Boolean ExportRecurringGiftBatch (Int32 ALedgerNumber, Int32 ARecurringBatchNumber, DateTime ACollectionDate, out String ASEPAFileContent, out TVerificationResultCollection AMessages)
 export a recurring gift batch to a SEPA Direct Debit file More...
 
static bool ImportGiftBatches (Hashtable requestParams, String importString, out GiftBatchTDSAGiftDetailTable ANeedRecipientLedgerNumber, out bool AClientRefreshRequired, out TVerificationResultCollection AMessages)
 Import Gift batch data The data file contents from the client is sent as a string, imported in the database and committed immediately More...
 
static bool ImportGiftTransactions (Hashtable requestParams, String importString, Int32 AGiftBatchNumber, out GiftBatchTDSAGiftDetailTable ANeedRecipientLedgerNumber, out bool AClientRefreshRequired, out TVerificationResultCollection AMessages)
 Import Gift batch transactions only into an existing batch The data file contents from the client is sent as a string, imported in the database and committed immediately More...
 
static DataTable GetEsrDefaults ()
 Return the ESR defaults table (creating if necessary) for use in importing, or for client side editing. More...
 
static Boolean CommitEsrDefaults (DataTable AEsrDefaults)
 Commit the ESR defaults table after client side editing. More...
 
static bool VerifyPartnerKey (Int64 APartnerKey)
 Check if the partner key is valid More...
 
static PPartnerTable LoadPartnerData (long APartnerKey)
 Load Partner Data More...
 
static PPartnerTable LoadAllPartnerDataForBatch (Int32 ALedgerNumber, Int32 ABatchNumber)
 Load Partner Data More...
 
static PBankingDetailsTable GetDonorBankingDetails (long APartnerKey, int ABankingDetailsKey=0)
 Load Donor Banking Details More...
 
static PPartnerTaxDeductiblePctTable LoadPartnerTaxDeductiblePct (long APartnerKey)
 Load Partner Tax Deductible Pct More...
 
static PPartnerTaxDeductiblePctTable LoadPartnerTaxDeductiblePct (long APartnerKey, DateTime ADateValidFrom)
 Load the most recent Partner Tax Deductible Pct More...
 
static PTaxTable LoadPartnerPtax (long APartnerKey)
 Load any Tax record for this partner More...
 
static string IdentifyPartnerCostCentre (Int32 ALedgerNumber, Int64 AFieldNumber)
 Find the cost centre associated with the partner More...
 
static Int64 GetRecipientFundNumber (Int64 APartnerKey, DateTime? AGiftDate=null)
 get the recipient ledger partner for a unit or the gift destination for a family More...
 
static Boolean KeyMinistryExists (Int64 APartnerKey, out Boolean AIsActive)
 Check if Key Ministry exists More...
 
static Boolean KeyMinistryIsActive (Int64 AKeyMinPartnerKey)
 Check if Key Ministry exists More...
 
static PUnitTable LoadKeyMinistry (Int64 APartnerKey, out Int64 AFieldNumber, bool AActiveOnly=true)
 Load key Ministry More...
 
static bool InactiveKeyMinistriesFoundInBatch (Int32 ALedgerNumber, Int32 ABatchNumber, out DataTable AInactiveKMsTable, bool ARecurringGift=false)
 Load Inactive Key Ministries Found In Batch More...
 

Detailed Description

This connector provides data for the finance Gift screens /summary>

Member Function Documentation

◆ AddToFeeTotals()

static void Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.AddToFeeTotals ( Int32  ALedgerNumber,
GiftBatchTDS  AMainDS,
AGiftDetailRow  AGiftDetailRow,
string  AFeeCode,
decimal  AFeeAmount,
int  APostingPeriod 
)
inlinestatic

Public for tests

◆ CalculateAdminFee()

static decimal Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.CalculateAdminFee ( GiftBatchTDS  AMainDS,
Int32  ALedgerNumber,
string  AFeeCode,
decimal  AGiftAmount,
out TVerificationResultCollection  AVerificationResult 
)
inlinestatic

calculate the admin fee for a given amount. public so that it can be tested by NUnit tests.

Parameters
AMainDS
ALedgerNumber
AFeeCode
AGiftAmount
AVerificationResult
Returns

◆ CancelBatch()

static bool Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.CancelBatch ( Int32  ALedgerNumber,
Int32  ABatchNumber,
out TVerificationResultCollection  AVerificationResult 
)
inlinestatic

cancel a Gift Batch

◆ CheckCostCentreDestinationForRecipient()

static bool Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.CheckCostCentreDestinationForRecipient ( Int32  ALedgerNumber,
Int64  APartnerKey,
out string  ACostCentreCode,
TDataBase  ADataBase = null 
)
inlinestatic

Check if an entry exists in ValidLedgerNumber for the specified ledger number and partner key

Parameters
ALedgerNumber
APartnerKey
ACostCentreCode
ADataBase
Returns

◆ CheckCostCentreLinkForRecipient()

static bool Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.CheckCostCentreLinkForRecipient ( Int32  ALedgerNumber,
Int64  APartnerKey,
out string  ACostCentreCode 
)
inlinestatic

Check if an entry exists in ValidLedgerNumber for the specified ledger number and partner key

Parameters
ALedgerNumber
APartnerKey
ACostCentreCode
Returns

◆ CommitEsrDefaults()

static Boolean Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.CommitEsrDefaults ( DataTable  AEsrDefaults)
inlinestatic

Commit the ESR defaults table after client side editing.

Parameters
AEsrDefaults
Returns

◆ CreateAGiftBatch() [1/2]

static GiftBatchTDS Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.CreateAGiftBatch ( Int32  ALedgerNumber)
inlinestatic

create a new batch with a consecutive batch number in the ledger, and immediately store the batch and the new number in the database

Parameters
ALedgerNumber
Returns

◆ CreateAGiftBatch() [2/2]

static GiftBatchTDS Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.CreateAGiftBatch ( Int32  ALedgerNumber,
DateTime  ADateEffective,
string  ABatchDescription,
TDataBase  ADataBase = null 
)
inlinestatic

Parameters
ALedgerNumber
ADateEffective
ABatchDescription
ADataBase
Returns

◆ CreateARecurringGiftBatch()

static GiftBatchTDS Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.CreateARecurringGiftBatch ( Int32  ALedgerNumber,
TDataBase  ADataBase = null 
)
inlinestatic

create a new recurring batch with a consecutive batch number in the ledger, and immediately store the batch and the new number in the database

Parameters
ALedgerNumber
ADataBase
Returns

◆ DonorHasGiven()

static Boolean Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.DonorHasGiven ( Int32  ALedgerNumber,
Int64  ADonorPartnerKey 
)
inlinestatic

Returns True if this person is a Gift Donor.

Parameters
ALedgerNumber
ADonorPartnerKey
Returns

◆ ExportAllGiftBatchData()

static Int32 Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.ExportAllGiftBatchData ( Int32  ALedgerNumber,
Int32  ABatchNumberStart,
Int32  ABatchNumberEnd,
DateTime?  ABatchDateFrom,
DateTime?  ABatchDateTo,
string  ADateFormatString,
bool  ASummary,
bool  AUseBaseCurrency,
DateTime?  ADateForSummary,
string  ANumberFormat,
bool  ATransactionsOnly,
bool  AExtraColumns,
Int64  ARecipientNumber,
Int64  AFieldNumber,
bool  AIncludeUnposted,
out String  AExportExcel,
out TVerificationResultCollection  AMessages 
)
inlinestatic

export all the Data of the batches matching the parameters to a String

Parameters
ALedgerNumber
ABatchNumberStart
ABatchNumberEnd
ABatchDateFrom
ABatchDateTo
ADateFormatString
ASummary
AUseBaseCurrency
ADateForSummary
ANumberFormatAmerican or European
ATransactionsOnly
AExtraColumns
ARecipientNumber
AFieldNumber
AIncludeUnposted
AExportExcelthe export file as Excel file
AMessagesAdditional messages to display in a messagebox
Returns
number of exported batches

◆ ExportRecurringGiftBatch()

static Boolean Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.ExportRecurringGiftBatch ( Int32  ALedgerNumber,
Int32  ARecurringBatchNumber,
DateTime  ACollectionDate,
out String  ASEPAFileContent,
out TVerificationResultCollection  AMessages 
)
inlinestatic

export a recurring gift batch to a SEPA Direct Debit file

Parameters
ALedgerNumberThe current Ledger
ARecurringBatchNumberThe batch number of the recurring gift batch
ACollectionDateThe date when the direct debit will be collected
ASEPAFileContentThe content of the SEPA file
AMessagesAdditional messages to display in a messagebox
Returns
true on success

◆ FindGiftRecipientExWorker()

static DataTable Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.FindGiftRecipientExWorker ( DataTable  AGiftDetailsToCheck,
int  ANotInBatchNumber = -1 
)
inlinestatic

Returns a table of gifts with Ex-Worker recipients

Parameters
AGiftDetailsToCheckGiftDetails to check for ExWorker recipients
ANotInBatchNumberUsed to exclude gift from a particular batch
Returns

◆ GetAvailableGiftYears()

static DataTable Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.GetAvailableGiftYears ( Int32  ALedgerNumber,
out String  ADisplayMember,
out String  AValueMember 
)
inlinestatic

Loads all available years with gift data into a table To be used by a combobox to select the financial year

Returns
DataTable

◆ GetDonorBankingDetails()

static PBankingDetailsTable Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.GetDonorBankingDetails ( long  APartnerKey,
int  ABankingDetailsKey = 0 
)
inlinestatic

Load Donor Banking Details

Parameters
APartnerKeyPartner Key
ABankingDetailsKeyBanking Details Key Key
Returns
Partnertable for the partner Key

◆ GetEsrDefaults()

static DataTable Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.GetEsrDefaults ( )
inlinestatic

Return the ESR defaults table (creating if necessary) for use in importing, or for client side editing.

Returns

◆ GetRecipientFundNumber()

static Int64 Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.GetRecipientFundNumber ( Int64  APartnerKey,
DateTime?  AGiftDate = null 
)
inlinestatic

get the recipient ledger partner for a unit or the gift destination for a family

Parameters
APartnerKey
AGiftDateGift Date (needed for getting a family's Gift Destination)
Returns

◆ GetRecipientGiftDestination()

static Int64 Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.GetRecipientGiftDestination ( Int64  APartnerKey,
DateTime ?  AGiftDate 
)
inlinestatic

Get gift destination for recipient

Parameters
APartnerKey
AGiftDate
Returns

◆ IdentifyPartnerCostCentre()

static string Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.IdentifyPartnerCostCentre ( Int32  ALedgerNumber,
Int64  AFieldNumber 
)
inlinestatic

Find the cost centre associated with the partner

Returns
Cost Centre code

◆ ImportGiftBatches()

static bool Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.ImportGiftBatches ( Hashtable  requestParams,
String  importString,
out GiftBatchTDSAGiftDetailTable  ANeedRecipientLedgerNumber,
out bool  AClientRefreshRequired,
out TVerificationResultCollection  AMessages 
)
inlinestatic

Import Gift batch data The data file contents from the client is sent as a string, imported in the database and committed immediately

Parameters
requestParamsHashtable containing the given params
importStringThe import file as a simple String
ANeedRecipientLedgerNumberGifts in this table are responsible for failing the import becuase their Family recipients do not have an active Gift Destination
AClientRefreshRequiredWill be set to true if the client should refresh its data after importing. Normally this will be obvious (because the import was successful) but some handled Exceptions imply that the data has changed behind the client's back!
AMessagesAdditional messages to display in a messagebox
Returns
false if error

◆ ImportGiftTransactions()

static bool Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.ImportGiftTransactions ( Hashtable  requestParams,
String  importString,
Int32  AGiftBatchNumber,
out GiftBatchTDSAGiftDetailTable  ANeedRecipientLedgerNumber,
out bool  AClientRefreshRequired,
out TVerificationResultCollection  AMessages 
)
inlinestatic

Import Gift batch transactions only into an existing batch The data file contents from the client is sent as a string, imported in the database and committed immediately

Parameters
requestParamsHashtable containing the given params
importStringThe import file as a simple String
AGiftBatchNumberThe gift batch number into which the transactions will be imported
ANeedRecipientLedgerNumberGifts in this table are responsible for failing the import becuase their Family recipients do not have an active Gift Destination
AClientRefreshRequiredWill be true if the client should update the GUI due to missing or updated information
AMessagesAdditional messages to display in a messagebox
Returns
false if error

◆ InactiveKeyMinistriesFoundInBatch()

static bool Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.InactiveKeyMinistriesFoundInBatch ( Int32  ALedgerNumber,
Int32  ABatchNumber,
out DataTable  AInactiveKMsTable,
bool  ARecurringGift = false 
)
inlinestatic

Load Inactive Key Ministries Found In Batch

Parameters
ALedgerNumber
ABatchNumber
AInactiveKMsTable
ARecurringGift
Returns
Return true if inactive ones found

◆ IsRecipientLedgerNumberSetupForILT()

static bool Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.IsRecipientLedgerNumberSetupForILT ( Int32  ALedgerNumber,
Int64  ARecipientPartnerKey,
Int64  ARecipientLedgerNumber,
out TVerificationResultCollection  AVerificationResults 
)
inlinestatic

Check that the chosen recipient ledger is set up for ILT - or that the recipient has a separate cost centre

Parameters
ALedgerNumber
ARecipientPartnerKey
ARecipientLedgerNumber
AVerificationResults
Returns

◆ KeyMinistryExists()

static Boolean Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.KeyMinistryExists ( Int64  APartnerKey,
out Boolean  AIsActive 
)
inlinestatic

Check if Key Ministry exists

Parameters
APartnerKeyPartner Key
AIsActivereturn true if Key Ministry is active
Returns
return true if APartnerKey identifies a Key Ministry

◆ KeyMinistryIsActive()

static Boolean Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.KeyMinistryIsActive ( Int64  AKeyMinPartnerKey)
inlinestatic

Check if Key Ministry exists

Parameters
AKeyMinPartnerKeyPartner Key
Returns
return true if AKeyMinPartnerKey identifies an active Key Ministry

◆ LoadAGiftBatch()

static GiftBatchTDS Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadAGiftBatch ( Int32  ALedgerNumber,
Int32  ABatchNumber,
out String  ACurrencyCode 
)
inlinestatic

loads a specific gift batch

Parameters
ALedgerNumber
ABatchNumberThe gift batch to be loaded
ACurrencyCode
Returns

◆ LoadAGiftBatchAndRelatedData() [1/2]

static GiftBatchTDS Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadAGiftBatchAndRelatedData ( Int32  ALedgerNumber,
Int32  ABatchNumber,
bool  AExcludeBatchRow = false 
)
inlinestatic

Create GiftBatchTDS with the gift batch to post, and all gift transactions and details, and motivation details

Parameters
ALedgerNumber
ABatchNumber
AExcludeBatchRow
Returns

◆ LoadAGiftBatchAndRelatedData() [2/2]

static GiftBatchTDS Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadAGiftBatchAndRelatedData ( Int32  ALedgerNumber,
Int32  ABatchNumber,
TDBTransaction  ATransaction,
out bool  AChangesToCommit,
bool  AExcludeBatchRow = false 
)
inlinestatic

Create GiftBatchTDS with the gift batch to post, and all gift transactions and details, and motivation details. Public for tests

◆ LoadAGiftBatchesForCurrentYear()

static GiftBatchTDS Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadAGiftBatchesForCurrentYear ( Int32  ALedgerNumber)
inlinestatic

loads a list of batches for the given ledger's current year

Parameters
ALedgerNumber
Returns

◆ LoadAGiftBatchesForCurrentYearPeriod()

static GiftBatchTDS Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadAGiftBatchesForCurrentYearPeriod ( Int32  ALedgerNumber)
inlinestatic

loads a list of batches for the given ledger's current year and current plus forwarding periods

Parameters
ALedgerNumber
Returns

◆ LoadAGiftBatchForYearPeriod()

static GiftBatchTDS Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadAGiftBatchForYearPeriod ( Int32  ALedgerNumber,
Int32  AYear,
Int32  APeriod,
String  ABatchStatus,
out String  ACurrencyCode 
)
inlinestatic

loads a list of batches for the given ledger also get the ledger for the base currency etc

Parameters
ALedgerNumber
AYearif -1, the year will be ignored
APeriodif AYear is -1 or period is -1, the period will be ignored. if APeriod is 0 and the current year is selected, then the current and the forwarding periods are used. Period = -2 means all periods in current year
ABatchStatus
ACurrencyCode
Returns

◆ LoadAGiftBatchSingle()

static GiftBatchTDS Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadAGiftBatchSingle ( Int32  ALedgerNumber,
Int32  ABatchNumber,
out Boolean  ABatchIsUnposted,
out string  ACurrencyCode 
)
inlinestatic

loads a specific gift batch, without gift transactions nor details

◆ LoadAGiftSingle()

static GiftBatchTDS Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadAGiftSingle ( Int32  ALedgerNumber,
Int32  ABatchNumber,
Int32  AGiftTransactionNumber 
)
inlinestatic

loads a GiftBatchTDS for a whole transaction (i.e. all details in the specified gift)

Parameters
ALedgerNumber
ABatchNumber
AGiftTransactionNumber
Returns
DataSet containing the transation's data

◆ LoadALedgerTable()

static GiftBatchTDS Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadALedgerTable ( Int32  ALedgerNumber)
inlinestatic

returns ledger table for specified ledger

Parameters
ALedgerNumber
Returns

◆ LoadAllPartnerDataForBatch()

static PPartnerTable Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadAllPartnerDataForBatch ( Int32  ALedgerNumber,
Int32  ABatchNumber 
)
inlinestatic

Load Partner Data

Parameters
ALedgerNumberLedger number
ABatchNumberBatch number
Returns
Partnertable for the partner Key

◆ LoadARecurringGiftBatch()

static GiftBatchTDS Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadARecurringGiftBatch ( Int32  ALedgerNumber)
inlinestatic

loads a list of recurring batches for the given ledger also get the ledger for the base currency etc TODO: limit to period, limit to batch status, etc

Parameters
ALedgerNumber
Returns

◆ LoadARecurringGiftBatchAndRelatedData()

static GiftBatchTDS Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadARecurringGiftBatchAndRelatedData ( Int32  ALedgerNumber,
Int32  ABatchNumber,
bool  AExcludeBatchRow = false 
)
inlinestatic

Create GiftBatchTDS with the gift batch to post, and all gift transactions and details, and motivation details

Parameters
ALedgerNumber
ABatchNumber
AExcludeBatchRow
Returns

◆ LoadARecurringGiftBatchSingle()

static GiftBatchTDS Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadARecurringGiftBatchSingle ( Int32  ALedgerNumber,
Int32  ABatchNumber 
)
inlinestatic

loads a list of recurring batches for the given ledger also get the ledger for the base currency etc TODO: limit to period, limit to batch status, etc

Parameters
ALedgerNumber
ABatchNumber
Returns

◆ LoadBankingDetailsOfPartner()

static GiftBatchTDS Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadBankingDetailsOfPartner ( Int64  APartnerKey)
inlinestatic

loads a list of banking details for the given partner

Parameters
APartnerKey
Returns

◆ LoadDonorLastPostedGift()

static GiftBatchTDSAGiftDetailTable Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadDonorLastPostedGift ( Int64  ADonorPartnerKey,
Int32  ALedgerNumber,
DateTime  ALatestUnpostedGiftDateEntered 
)
inlinestatic

Loads a donor's last gift (if it exists) and returns the associated gift details.

Parameters
ADonorPartnerKey
ALedgerNumber
ALatestUnpostedGiftDateEntered
Returns

◆ LoadDonorRecipientHistory()

static GiftBatchTDS Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadDonorRecipientHistory ( Hashtable  requestParams,
out TVerificationResultCollection  AMessages 
)
inlinestatic

loads a list of gift transactions and details for the given ledger and batch

Parameters
requestParams
AMessages
Returns

◆ LoadGiftDonorRelatedData()

static void Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadGiftDonorRelatedData ( GiftBatchTDS  AGiftDS,
bool  ARecurring,
Int32  ALedgerNumber,
Int32  ABatchNumber,
TDBTransaction  ATransaction 
)
inlinestatic

load the donor names and tax settings and bank accounts for a given batch

◆ LoadGiftTransactionAndDetail()

static bool Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadGiftTransactionAndDetail ( Int32  ALedgerNumber,
Int32  ABatchNumber,
Int32  AGiftTransactionNumber,
Int32  ADetailNumber,
out Boolean  ABatchIsUnposted,
out String  ACurrencyCode,
out GiftBatchTDS  AMainDS,
out TVerificationResultCollection  AVerificationResult 
)
inlinestatic

loads the specified gift transaction and the specified gift detail

◆ LoadGiftTransactionAndDetails()

static bool Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadGiftTransactionAndDetails ( Int32  ALedgerNumber,
Int32  ABatchNumber,
Int32  AGiftTransactionNumber,
out Boolean  ABatchIsUnposted,
out String  ACurrencyCode,
out GiftBatchTDS  AMainDS,
out TVerificationResultCollection  AVerificationResult 
)
inlinestatic

loads the specified gift transaction and its details

◆ LoadGiftTransactionsForBatch()

static bool Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadGiftTransactionsForBatch ( Int32  ALedgerNumber,
Int32  ABatchNumber,
out Boolean  ABatchIsUnposted,
out String  ACurrencyCode,
out GiftBatchTDS  AMainDS,
out TVerificationResultCollection  AVerificationResult 
)
inlinestatic

loads a list of gift transactions and details for the given ledger and batch

◆ LoadKeyMinistry()

static PUnitTable Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadKeyMinistry ( Int64  APartnerKey,
out Int64  AFieldNumber,
bool  AActiveOnly = true 
)
inlinestatic

Load key Ministry

Parameters
APartnerKeyPartner Key
AFieldNumberField Number
AActiveOnlyField Number
Returns
ArrayList for loading the key ministry combobox

◆ LoadPartnerData()

static PPartnerTable Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadPartnerData ( long  APartnerKey)
inlinestatic

Load Partner Data

Parameters
APartnerKeyPartner Key
Returns
Partnertable for the partner Key

◆ LoadPartnerPtax()

static PTaxTable Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadPartnerPtax ( long  APartnerKey)
inlinestatic

Load any Tax record for this partner

Parameters
APartnerKey
Returns

◆ LoadPartnerTaxDeductiblePct() [1/2]

static PPartnerTaxDeductiblePctTable Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadPartnerTaxDeductiblePct ( long  APartnerKey)
inlinestatic

Load Partner Tax Deductible Pct

Parameters
APartnerKeyPartner Key
Returns
PPartnerTaxDeductiblePctTable for the partner Key

◆ LoadPartnerTaxDeductiblePct() [2/2]

static PPartnerTaxDeductiblePctTable Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadPartnerTaxDeductiblePct ( long  APartnerKey,
DateTime  ADateValidFrom 
)
inlinestatic

Load the most recent Partner Tax Deductible Pct

Parameters
APartnerKeyPartner Key
ADateValidFromTo match nearest date valid from
Returns
PPartnerTaxDeductiblePctTable for the partner Key

◆ LoadRecurringGiftTransactionsForBatch()

static GiftBatchTDS Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.LoadRecurringGiftTransactionsForBatch ( Int32  ALedgerNumber,
Int32  ABatchNumber 
)
inlinestatic

loads a list of recurring gift transactions and details for the given ledger and recurring batch

Parameters
ALedgerNumber
ABatchNumber
Returns

◆ MaintainBatches()

static bool Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.MaintainBatches ( string  action,
Int32  ALedgerNumber,
Int32  ABatchNumber,
string  ABatchDescription,
DateTime  AGlEffectiveDate,
string  ABankAccountCode,
string  ABankCostCentre,
out TVerificationResultCollection  AVerificationResult 
)
inlinestatic

this will save and delete a batch

◆ MaintainGiftDetails()

static bool Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.MaintainGiftDetails ( string  action,
Int32  ALedgerNumber,
Int32  ABatchNumber,
Int32  AGiftTransactionNumber,
Int32  ADetailNumber,
Decimal  AGiftTransactionAmount,
string  AGiftCommentOne,
string  AMotivationGroupCode,
string  AMotivationDetailCode,
Int64  ARecipientKey,
out TVerificationResultCollection  AVerificationResult 
)
inlinestatic

this will create, save and delete a gift detail

◆ MaintainGifts()

static bool Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.MaintainGifts ( string  action,
Int32  ALedgerNumber,
Int32  ABatchNumber,
Int32  AGiftTransactionNumber,
DateTime  ADateEntered,
Int64  ADonorKey,
string  AReference,
out TVerificationResultCollection  AVerificationResult 
)
inlinestatic

this will create, save and delete a gift transaction

◆ MaintainRecurringBatches()

static bool Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.MaintainRecurringBatches ( string  action,
Int32  ALedgerNumber,
Int32  ABatchNumber,
string  ABatchDescription,
string  ABankAccountCode,
string  ABankCostCentre,
out TVerificationResultCollection  AVerificationResult 
)
inlinestatic

this will save and delete a recurring gift batch

◆ MaintainRecurringGiftDetails()

static bool Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.MaintainRecurringGiftDetails ( string  action,
Int32  ALedgerNumber,
Int32  ABatchNumber,
Int32  AGiftTransactionNumber,
Int32  ADetailNumber,
Decimal  AGiftAmount,
string  AGiftCommentOne,
string  AMotivationGroupCode,
string  AMotivationDetailCode,
Int64  ARecipientKey,
DateTime  AStartDonations,
DateTime?  AEndDonations,
out TVerificationResultCollection  AVerificationResult 
)
inlinestatic

this will create, save and delete a recurring gift detail

◆ MaintainRecurringGifts()

static bool Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.MaintainRecurringGifts ( string  action,
Int32  ALedgerNumber,
Int32  ABatchNumber,
Int32  AGiftTransactionNumber,
Int64  ADonorKey,
string  AReference,
Int32  ABankingDetailsKey,
string  ASepaMandateReference,
DateTime?  ASepaMandateGiven,
out TVerificationResultCollection  AVerificationResult 
)
inlinestatic

this will create, save and delete a recurring gift transaction

◆ PostGiftBatch()

static bool Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.PostGiftBatch ( Int32  ALedgerNumber,
Int32  AGiftBatchNumber,
out Int32  AGeneratedGlBatchNumber,
out TVerificationResultCollection  AVerifications,
TDataBase  ADataBase = null 
)
inlinestatic

post a Gift Batch

Parameters
ALedgerNumber
AGiftBatchNumber
AGeneratedGlBatchNumberIf posting succeeds, this is the GL Batch
AVerifications
ADataBase
Returns
True if the batch posting went ahead

◆ PostGiftBatches()

static bool Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.PostGiftBatches ( Int32  ALedgerNumber,
List< Int32 >  AGiftBatchNumbers,
List< Int32 >  AGeneratedGLBatchNumbers,
out TVerificationResultCollection  AVerifications,
TDataBase  ADataBase = null 
)
inlinestatic

post several gift batches at once

Returns
True if the batch posting went ahead

◆ PrepareGiftBatchForPosting()

static GiftBatchTDS Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.PrepareGiftBatchForPosting ( Int32  ALedgerNumber,
Int32  ABatchNumber,
ref TDBTransaction  ATransaction,
out TVerificationResultCollection  AVerifications 
)
inlinestatic

Prepares the gift batch for posting. Public for test.

◆ PreviewGiftBatch()

static bool Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.PreviewGiftBatch ( Int32  ALedgerNumber,
Int32  ABatchNumber,
out string  ResultingTotals 
)
inlinestatic

return a string that shows the totals for each Motivation Detail

◆ RetrieveCostCentreCodeForRecipient()

static string Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.RetrieveCostCentreCodeForRecipient ( Int32  ALedgerNumber,
Int64  ARecipientPartnerKey,
Int64  ARecipientLedgerNumber,
DateTime  ADateGiftEntered,
String  AMotivationGroupCode,
String  AMotivationDetailCode,
out bool  APartnerIsMissingLink 
)
inlinestatic

Retrieve the cost centre code for the recipient

Parameters
ALedgerNumber
ARecipientPartnerKey
ARecipientLedgerNumber
ADateGiftEntered
AMotivationGroupCode
AMotivationDetailCode
APartnerIsMissingLink
Returns

◆ SaveGiftBatchTDS()

static TSubmitChangesResult Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.SaveGiftBatchTDS ( ref GiftBatchTDS  AInspectDS,
out TVerificationResultCollection  AVerificationResult,
TDataBase  ADataBase = null 
)
inlinestatic

this will store all new and modified batches, gift transactions and details

Parameters
AInspectDS
AVerificationResult
ADataBase
Returns

◆ SubmitRecurringGiftBatch()

static bool Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.SubmitRecurringGiftBatch ( Int32  ALedgerNumber,
Int32  ARecurringBatchNumber,
DateTime  AEffectiveDate,
string  AReference,
Decimal  AExchangeRateToBase,
Decimal  AExchangeRateIntlToBase,
out int  ANewGiftBatchNo 
)
inlinestatic

create a gift batch from a recurring gift batch including gift and gift detail

Parameters
ALedgerNumberThe current Ledger
ARecurringBatchNumberThe batch number of the recurring gift batch
AEffectiveDateThe date effective for the new gift batch
AReferenceThe reference for the gifts. If empty the reference from the recurring gift will be used.
AExchangeRateToBaseExchange rate to base currency
AExchangeRateIntlToBaseExchange rate to international currency
ANewGiftBatchNoThe new gift batch number

◆ VerifyPartnerKey()

static bool Ict.Petra.Server.MFinance.Gift.WebConnectors.TGiftTransactionWebConnector.VerifyPartnerKey ( Int64  APartnerKey)
inlinestatic

Check if the partner key is valid

Returns
If exists

The documentation for this class was generated from the following files: