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

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

Static Public Member Functions

static ALedgerTable GetLedgerInfo (Int32 ALedgerNumber)
 Retrieve all the information for the current Ledger More...
 
static AccountsPayableTDS LoadAApSupplier (Int32 ALedgerNumber, Int64 APartnerKey, TDataBase ADataBase=null)
 Loads Supplier and Partner. More...
 
static AccountsPayableTDS LoadAApDocument (Int32 ALedgerNumber, Int32 AApDocumentId, TDataBase ADataBase=null)
 Loads ApDocument row, and also Supplier, DocumentDetail, and AnalAttrib. More...
 
static AccountsPayableTDS CreateAApDocument (Int32 ALedgerNumber, Int64 APartnerKey, bool ACreditNoteOrInvoice, TDataBase ADataBase=null)
 Create a new AP document (invoice or credit note) and fill with default values from the supplier More...
 
static TSubmitChangesResult SaveAApDocument (ref AccountsPayableTDS AInspectDS, out TVerificationResultCollection AVerificationResult, TDataBase ADataBase=null)
 Store the AP Documents (and matching document details and analattribs). More...
 
static AccountsPayableTDS CreateAApDocumentDetail (Int32 ALedgerNumber, Int32 AApDocumentId, string AApSupplier_DefaultExpAccount, string AApSupplier_DefaultCostCentre, decimal AAmount, Int32 ALastDetailNumber)
 create a new AP document detail for an existing AP document; attention: need to modify the LastDetailNumber on the client side! More...
 
static String CheckAccountsAndCostCentres (Int32 ALedgerNumber, List< String >AccountCodesCostCentres)
 Check that the Account codes for an invoice can be used with the cost centres referenced. More...
 
static bool ApproveAPDocuments (Int32 ALedgerNumber, List< Int32 >AApproveTheseDocs, out TVerificationResultCollection AVerificationResult)
 Approve documents that have an OPEN status This is called by a client More...
 
static void CancelAPDocuments (Int32 ALedgerNumber, List< Int32 >ACancelTheseDocs, bool ADeleteCancelledRows, TDataBase ADataBase=null)
 Documents can only be deleted if they're not posted yet. More...
 
static bool PostAPDocuments (Int32 ALedgerNumber, List< Int32 >AAPDocumentIds, DateTime APostingDate, Boolean Reversal, out Int32 AglBatchNumber, out TVerificationResultCollection AVerificationResult, TDataBase ADataBase=null)
 creates GL transactions for the selected AP documents, and posts those GL transactions, and marks the AP documents as Posted Also used to "un-post" posted documents. More...
 
static bool CreatePaymentTableEntries (ref AccountsPayableTDS ADataset, Int32 ALedgerNumber, List< Int32 >ADocumentsToPay)
 
static bool PostAPPayments (ref AccountsPayableTDS AMainDS, DateTime APostingDate, out Int32 AglBatchNumber, out AccountsPayableTDSAApPaymentTable ANewPayments, out TVerificationResultCollection AVerificationResult, TDataBase ADataBase=null)
 Store payments in the database, and post the payment to GL More...
 
static AccountsPayableTDS LoadAPPayment (Int32 ALedgerNumber, Int32 APaymentNumber, TDataBase ADataBase=null)
 Load this payment, together with the supplier and all the related documents. More...
 
static bool WasThisPaymentReversed (Int32 ALedgerNumber, Int32 APaymentNumber)
 
static bool ReversePayment (Int32 ALedgerNumber, Int32 APaymentNumber, DateTime APostingDate, out List< Int32 >AglBatchNumbers, out TVerificationResultCollection AVerifications, TDataBase ADataBase=null)
 Create "balancing" documents that undo the effect of all the documents in this payment, then "pay" those documents, create new ones (duplicates of the originals), and post them. More...
 

Detailed Description

This connector provides data for the finance Accounts Payable screens /summary>

Member Function Documentation

◆ ApproveAPDocuments()

static bool Ict.Petra.Server.MFinance.AP.WebConnectors.TAPTransactionWebConnector.ApproveAPDocuments ( Int32  ALedgerNumber,
List< Int32 >  AApproveTheseDocs,
out TVerificationResultCollection  AVerificationResult 
)
inlinestatic

Approve documents that have an OPEN status This is called by a client

Parameters
ALedgerNumber
AApproveTheseDocs
AVerificationResult

◆ CancelAPDocuments()

static void Ict.Petra.Server.MFinance.AP.WebConnectors.TAPTransactionWebConnector.CancelAPDocuments ( Int32  ALedgerNumber,
List< Int32 >  ACancelTheseDocs,
bool  ADeleteCancelledRows,
TDataBase  ADataBase = null 
)
inlinestatic

Documents can only be deleted if they're not posted yet.

Parameters
ALedgerNumberLedger
ACancelTheseDocsList of documents
ADeleteCancelledRowsIf true the documents are removed from the database. The standard AP behaviour is to set the status to Cancelled. The Delete option should only be set to true in special circumstances (for example when running a test and the desire is to clean the database of added test rows).
ADataBase

◆ CheckAccountsAndCostCentres()

static String Ict.Petra.Server.MFinance.AP.WebConnectors.TAPTransactionWebConnector.CheckAccountsAndCostCentres ( Int32  ALedgerNumber,
List< String >  AccountCodesCostCentres 
)
inlinestatic

Check that the Account codes for an invoice can be used with the cost centres referenced.

Parameters
ALedgerNumber
AccountCodesCostCentreslist {Account"|"Cost Centre}
Returns
Empty string if there's no problems

◆ CreateAApDocument()

static AccountsPayableTDS Ict.Petra.Server.MFinance.AP.WebConnectors.TAPTransactionWebConnector.CreateAApDocument ( Int32  ALedgerNumber,
Int64  APartnerKey,
bool  ACreditNoteOrInvoice,
TDataBase  ADataBase = null 
)
inlinestatic

Create a new AP document (invoice or credit note) and fill with default values from the supplier

Parameters
ALedgerNumber
APartnerKeythe supplier
ACreditNoteOrInvoicetrue: credit note; false: invoice
ADataBase
Returns

◆ CreateAApDocumentDetail()

static AccountsPayableTDS Ict.Petra.Server.MFinance.AP.WebConnectors.TAPTransactionWebConnector.CreateAApDocumentDetail ( Int32  ALedgerNumber,
Int32  AApDocumentId,
string  AApSupplier_DefaultExpAccount,
string  AApSupplier_DefaultCostCentre,
decimal  AAmount,
Int32  ALastDetailNumber 
)
inlinestatic

create a new AP document detail for an existing AP document; attention: need to modify the LastDetailNumber on the client side!

Parameters
ALedgerNumber
AApDocumentId
AApSupplier_DefaultExpAccount
AApSupplier_DefaultCostCentre
AAmountthe amount that is still missing from the total amount of the invoice
ALastDetailNumberAApDocument.LastDetailNumber
Returns
the new AApDocumentDetail row

◆ CreatePaymentTableEntries()

static bool Ict.Petra.Server.MFinance.AP.WebConnectors.TAPTransactionWebConnector.CreatePaymentTableEntries ( ref AccountsPayableTDS  ADataset,
Int32  ALedgerNumber,
List< Int32 >  ADocumentsToPay 
)
inlinestatic

Parameters
ADataset
ALedgerNumber
ADocumentsToPay
Returns
There's really nothing to return, but generateGlue doesn't cope properly with <void> methods...</void>

◆ GetLedgerInfo()

static ALedgerTable Ict.Petra.Server.MFinance.AP.WebConnectors.TAPTransactionWebConnector.GetLedgerInfo ( Int32  ALedgerNumber)
inlinestatic

Retrieve all the information for the current Ledger

Parameters
ALedgerNumber
Returns
ALedgerTable

◆ LoadAApDocument()

static AccountsPayableTDS Ict.Petra.Server.MFinance.AP.WebConnectors.TAPTransactionWebConnector.LoadAApDocument ( Int32  ALedgerNumber,
Int32  AApDocumentId,
TDataBase  ADataBase = null 
)
inlinestatic

Loads ApDocument row, and also Supplier, DocumentDetail, and AnalAttrib.

Parameters
ALedgerNumber
AApDocumentId
ADataBase
Returns
TDS with tables loaded

◆ LoadAApSupplier()

static AccountsPayableTDS Ict.Petra.Server.MFinance.AP.WebConnectors.TAPTransactionWebConnector.LoadAApSupplier ( Int32  ALedgerNumber,
Int64  APartnerKey,
TDataBase  ADataBase = null 
)
inlinestatic

Loads Supplier and Partner.

Parameters
ALedgerNumber
APartnerKey
ADataBase
Returns
TDS with tables loaded

◆ LoadAPPayment()

static AccountsPayableTDS Ict.Petra.Server.MFinance.AP.WebConnectors.TAPTransactionWebConnector.LoadAPPayment ( Int32  ALedgerNumber,
Int32  APaymentNumber,
TDataBase  ADataBase = null 
)
inlinestatic

Load this payment, together with the supplier and all the related documents.

Returns
Fully loaded TDS

◆ PostAPDocuments()

static bool Ict.Petra.Server.MFinance.AP.WebConnectors.TAPTransactionWebConnector.PostAPDocuments ( Int32  ALedgerNumber,
List< Int32 >  AAPDocumentIds,
DateTime  APostingDate,
Boolean  Reversal,
out Int32  AglBatchNumber,
out TVerificationResultCollection  AVerificationResult,
TDataBase  ADataBase = null 
)
inlinestatic

creates GL transactions for the selected AP documents, and posts those GL transactions, and marks the AP documents as Posted Also used to "un-post" posted documents.

Parameters
ALedgerNumber
AAPDocumentIds
APostingDate
Reversal
AglBatchNumberIf a GL batch was posted, this is the Batch Number.
AVerificationResult
ADataBase
Returns

◆ PostAPPayments()

static bool Ict.Petra.Server.MFinance.AP.WebConnectors.TAPTransactionWebConnector.PostAPPayments ( ref AccountsPayableTDS  AMainDS,
DateTime  APostingDate,
out Int32  AglBatchNumber,
out AccountsPayableTDSAApPaymentTable  ANewPayments,
out TVerificationResultCollection  AVerificationResult,
TDataBase  ADataBase = null 
)
inlinestatic

Store payments in the database, and post the payment to GL

Returns
true if it seemed to work OK

◆ ReversePayment()

static bool Ict.Petra.Server.MFinance.AP.WebConnectors.TAPTransactionWebConnector.ReversePayment ( Int32  ALedgerNumber,
Int32  APaymentNumber,
DateTime  APostingDate,
out List< Int32 >  AglBatchNumbers,
out TVerificationResultCollection  AVerifications,
TDataBase  ADataBase = null 
)
inlinestatic

Create "balancing" documents that undo the effect of all the documents in this payment, then "pay" those documents, create new ones (duplicates of the originals), and post them.

Parameters
ALedgerNumber
APaymentNumber
APostingDate
AglBatchNumbersIf GL Batches were generated, these are the Batch Numbers.
AVerifications
ADataBase
Returns

◆ SaveAApDocument()

static TSubmitChangesResult Ict.Petra.Server.MFinance.AP.WebConnectors.TAPTransactionWebConnector.SaveAApDocument ( ref AccountsPayableTDS  AInspectDS,
out TVerificationResultCollection  AVerificationResult,
TDataBase  ADataBase = null 
)
inlinestatic

Store the AP Documents (and matching document details and analattribs).

All DataTables contained in the Typed DataSet are inspected for added, changed or deleted rows by submitting them to the DataStore.

Parameters
AInspectDSTyped DataSet that needs to contain known DataTables
AVerificationResultEmpty if all verifications are OK and all DB calls succeded, otherwise filled with 1..n TVerificationResult objects (can also contain DB call exceptions)
ADataBase
Returns
true if all verifications are OK and all DB calls succeeded, false if any verification or DB call failed

◆ WasThisPaymentReversed()

static bool Ict.Petra.Server.MFinance.AP.WebConnectors.TAPTransactionWebConnector.WasThisPaymentReversed ( Int32  ALedgerNumber,
Int32  APaymentNumber 
)
inlinestatic

Parameters
ALedgerNumber
APaymentNumber
Returns
true if a matching payment reversal can be found

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