OpenPetra
Free Administration Software for Non-Profits
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Pages
Ict.Petra.Server.MFinance.Common.TCommonAccountingTool Class Reference

This Tool creates a batch enables to add a journal and to add transactions to a journal All internal "pointers" and control data are set internal and the structure is "read to post". More...

Public Member Functions

 TCommonAccountingTool (int ALedgerNumber, string ABatchDescription, TDataBase ADataBase=null)
 The constructor creates a base batch and defines the batch parameters. There is only one batch to account. Use a new object to post another batch. More...
 
 TCommonAccountingTool (TLedgerInfo ALedgerInfo, string ABatchDescription, TDataBase ADataBase=null)
 A TLedgerInfo-Oject is used internally. If you already have one, use this constructor to reduce the number of database requests. More...
 
void AddForeignCurrencyJournal (TCurrencyInfo ATCurrencyInfo, decimal AExchangeRateToBase)
 Here you can add a Foreign currency Journal More...
 
void AddForeignCurrencyJournal (string ACurrencyCode, decimal AExchangeRateToBase)
 Here you can add a Foreign currency Journal More...
 
void AddBaseCurrencyJournal ()
 A standard-base currency journal does not need any more information More...
 
ATransactionRow AddBaseCurrencyTransaction (string AAccount, string ACostCenter, string ANarrativeMessage, string AReferenceMessage, bool AIsDebit, decimal AAmountBaseCurrency)
 A Transaction is added to the current batch and journal. More...
 
ATransactionRow AddForeignCurrencyTransaction (string AAccount, string ACostCenter, string ANarrativeMessage, string AReferenceMessage, bool AIsDebit, decimal AAmountBaseCurrency, decimal AAmountForeignCurrency)
 Add a foreign currency transaction ... More...
 
Boolean CloseSaveAndPost (TVerificationResultCollection AVerifications=null, TDataBase ADataBase=null)
 Here you can close save and post the batch, the included journal(s) and the transaction(s). More...
 

Properties

Int32 BatchNumber [get]
 
DateTime DateEffective [set]
 The default parameter for the date is the "effective date" of the accounting interval and the value is set in the constructor. Here you can change the value, if you need an other day ... More...
 
string JournalDescription [set]
 The journal description text is copied form the batch description text. Here you can change it on the last added journal. More...
 
CommonAccountingTransactionTypesEnum TransactionTypeCode [set]
 Change the TransactionTypeCode from it's default value ... More...
 
CommonAccountingSubSystemsEnum SubSystemCode [set]
 Change the SubSystemCode from it's default value ... More...
 

Detailed Description

This Tool creates a batch enables to add a journal and to add transactions to a journal All internal "pointers" and control data are set internal and the structure is "read to post".

Constructor & Destructor Documentation

◆ TCommonAccountingTool() [1/2]

Ict.Petra.Server.MFinance.Common.TCommonAccountingTool.TCommonAccountingTool ( int  ALedgerNumber,
string  ABatchDescription,
TDataBase  ADataBase = null 
)
inline

The constructor creates a base batch and defines the batch parameters. There is only one batch to account. Use a new object to post another batch.

Parameters
ALedgerNumberthe ledger number
ABatchDescriptiona batch description text
ADataBase

◆ TCommonAccountingTool() [2/2]

Ict.Petra.Server.MFinance.Common.TCommonAccountingTool.TCommonAccountingTool ( TLedgerInfo  ALedgerInfo,
string  ABatchDescription,
TDataBase  ADataBase = null 
)
inline

A TLedgerInfo-Oject is used internally. If you already have one, use this constructor to reduce the number of database requests.

Parameters
ALedgerInfoThe ledger-info object
ABatchDescriptionthe description text ...
ADataBase

Member Function Documentation

◆ AddBaseCurrencyJournal()

void Ict.Petra.Server.MFinance.Common.TCommonAccountingTool.AddBaseCurrencyJournal ( )
inline

A standard-base currency journal does not need any more information

◆ AddBaseCurrencyTransaction()

ATransactionRow Ict.Petra.Server.MFinance.Common.TCommonAccountingTool.AddBaseCurrencyTransaction ( string  AAccount,
string  ACostCenter,
string  ANarrativeMessage,
string  AReferenceMessage,
bool  AIsDebit,
decimal  AAmountBaseCurrency 
)
inline

A Transaction is added to the current batch and journal.

Parameters
AAccount
ACostCenter
ANarrativeMessage
AReferenceMessage
AIsDebit
AAmountBaseCurrency

◆ AddForeignCurrencyJournal() [1/2]

void Ict.Petra.Server.MFinance.Common.TCommonAccountingTool.AddForeignCurrencyJournal ( string  ACurrencyCode,
decimal  AExchangeRateToBase 
)
inline

Here you can add a Foreign currency Journal

Parameters
ACurrencyCodeThe currency code is defined by a string and the TCurrencyInfo object is created internally
AExchangeRateToBase

◆ AddForeignCurrencyJournal() [2/2]

void Ict.Petra.Server.MFinance.Common.TCommonAccountingTool.AddForeignCurrencyJournal ( TCurrencyInfo  ATCurrencyInfo,
decimal  AExchangeRateToBase 
)
inline

Here you can add a Foreign currency Journal

Parameters
ATCurrencyInfoA TCurrencyInfo is created extern and can be included as a parameter
AExchangeRateToBase

◆ AddForeignCurrencyTransaction()

ATransactionRow Ict.Petra.Server.MFinance.Common.TCommonAccountingTool.AddForeignCurrencyTransaction ( string  AAccount,
string  ACostCenter,
string  ANarrativeMessage,
string  AReferenceMessage,
bool  AIsDebit,
decimal  AAmountBaseCurrency,
decimal  AAmountForeignCurrency 
)
inline

Add a foreign currency transaction ...

Parameters
AAccount
ACostCenter
ANarrativeMessage
AReferenceMessage
AIsDebit
AAmountBaseCurrency
AAmountForeignCurrency

◆ CloseSaveAndPost()

Boolean Ict.Petra.Server.MFinance.Common.TCommonAccountingTool.CloseSaveAndPost ( TVerificationResultCollection  AVerifications = null,
TDataBase  ADataBase = null 
)
inline

Here you can close save and post the batch, the included journal(s) and the transaction(s).

Parameters
AVerificationsA TVerificationResultCollection can defined to accept the error messages and warnings - if necessary.
ADataBase
Returns
True if it seemed to work

Property Documentation

◆ BatchNumber

Int32 Ict.Petra.Server.MFinance.Common.TCommonAccountingTool.BatchNumber
get

◆ DateEffective

DateTime Ict.Petra.Server.MFinance.Common.TCommonAccountingTool.DateEffective
set

The default parameter for the date is the "effective date" of the accounting interval and the value is set in the constructor. Here you can change the value, if you need an other day ...

◆ JournalDescription

string Ict.Petra.Server.MFinance.Common.TCommonAccountingTool.JournalDescription
set

The journal description text is copied form the batch description text. Here you can change it on the last added journal.

◆ SubSystemCode

CommonAccountingSubSystemsEnum Ict.Petra.Server.MFinance.Common.TCommonAccountingTool.SubSystemCode
set

Change the SubSystemCode from it's default value ...

◆ TransactionTypeCode

CommonAccountingTransactionTypesEnum Ict.Petra.Server.MFinance.Common.TCommonAccountingTool.TransactionTypeCode
set

Change the TransactionTypeCode from it's default value ...


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