OpenPetra
Free Administration Software for Non-Profits
Ict.Petra.Server.MFinance.Common.TGLPosting Class Reference

provides methods for posting a batch More...

Classes

class  TAmount
 Helper class for storing the amounts of a batch at posting level for account/costcentre combinations. More...
 

Public Member Functions

delegate Int32 PrintReportOnClient (String ReportName, String ParamStr)
 

Static Public Member Functions

static Int32 CreateGLMYear (ref GLPostingTDS AMainDS, Int32 ALedgerNumber, int AYear, string AAccountCode, string ACostCentreCode)
 creates the rows for the specified year in AGeneralLedgerMaster and AGeneralLedgerMasterPeriod for an Account/CostCentre combination More...
 
static GLBatchTDS LoadGLBatchData (Int32 ALedgerNumber, Int32 ABatchNumber, out TVerificationResultCollection AVerifications, TDataBase ADataBase=null)
 load the batch and all associated tables into the typed dataset More...
 
static GLBatchTDS LoadGLBatchData (Int32 ALedgerNumber, Int32 ABatchNumber, ref TDBTransaction ATransaction, ref TVerificationResultCollection AVerifications)
 load the batch and all associated tables into the typed dataset More...
 
static bool ReverseBatch (Int32 ALedgerNumber, Int32 ABatchNumberToReverse, DateTime ADateForReversal, out Int32 AReversalBatchNumber, out TVerificationResultCollection AVerifications, bool AAutoPostReverseBatch)
 reverse gl batch More...
 
static bool PostGLBatch (Int32 ALedgerNumber, Int32 ABatchNumber, out TVerificationResultCollection AVerifications, TDataBase ADataBase=null)
 post a GL Batch More...
 
static bool PostGLBatches (Int32 ALedgerNumber, List< Int32 >ABatchNumbers, out TVerificationResultCollection AVerifications, TDataBase ADataBase=null)
 post several GL Batches at once Returns true if it seems to be OK. More...
 
static bool TestPostGLBatch (Int32 ALedgerNumber, Int32 ABatchNumber, TDBTransaction ATransaction, out TVerificationResultCollection AVerifications, out GLPostingTDS APostingDS, ref Int32 ABatchPeriod)
 Only used for precalculating the new balances before the user actually posts the batch More...
 
static GLPostingTDS PrepareGLBatchForPosting (out GLBatchTDS AMainDS, Int32 ALedgerNumber, Int32 ABatchNumber, ref TDBTransaction ATransaction, out TVerificationResultCollection AVerifications, SortedList< string, TAmount >APostingLevel, ref Int32 ABatchPeriod)
 Prepare posting a GL Batch, without saving to database yet. This is called by the actual PostGLBatch routine, and also by the routine for testing what would happen to the balances. More...
 
static bool GLBatchCanBeCancelled (out GLBatchTDS AMainDS, Int32 ALedgerNumber, Int32 ABatchNumber, out TVerificationResultCollection AVerifications, TDataBase ADataBase=null)
 Tell me whether this Batch can be cancelled More...
 
static bool CancelGLBatch (Int32 ALedgerNumber, Int32 ABatchNumber, out TVerificationResultCollection AVerifications)
 Cancel this batch More...
 
static bool DeleteGLBatch (Int32 ALedgerNumber, Int32 ABatchNumber, out TVerificationResultCollection AVerifications, TDataBase ADataBase)
 If a Batch has been created then found to be not required, it can be deleted here. (This was added for ICH and Stewardship calculations, which can otherwise leave empty batches in the ledger.) More...
 
static GLBatchTDS CreateABatch (Int32 ALedgerNumber, TDataBase ADataBase, Boolean AWithGLJournal=false)
 create a new batch. it is already stored to the database, to avoid problems with LastBatchNumber More...
 
static GLBatchTDS CreateABatch (Int32 ALedgerNumber, string ABatchDescription, decimal ABatchControlTotal, DateTime ADateEffective, TDataBase ADataBase=null)
 create a new batch. it is already stored to the database, to avoid problems with LastBatchNumber More...
 
static GLBatchTDS CreateARecurringBatch (Int32 ALedgerNumber)
 create a new recurring batch. it is already stored to the database, to avoid problems with LastBatchNumber More...
 
static bool CreateAJournal (GLBatchTDS AMainDS, Int32 ALedgerNumber, Int32 ABatchNumber, Int32 ALastJournalNumber, string AJournalDescription, string ACurrency, decimal AXRateToBase, DateTime ADateEffective, Int32 APeriodNumber, out Int32 AJournalNumber)
 Create a new journal as per gl1120.i More...
 
static bool CreateATransaction (GLBatchTDS AMainDS, Int32 ALedgerNumber, Int32 ABatchNumber, Int32 AJournalNumber, string ANarrative, string AAccountCode, string ACostCentreCode, decimal ATransAmount, DateTime ATransDate, bool ADebCredIndicator, string AReference, bool ASystemGenerated, decimal ABaseAmount, out int ATransactionNumber)
 create a record for a_transaction More...
 

Detailed Description

provides methods for posting a batch

Member Function Documentation

◆ CancelGLBatch()

static bool Ict.Petra.Server.MFinance.Common.TGLPosting.CancelGLBatch ( Int32  ALedgerNumber,
Int32  ABatchNumber,
out TVerificationResultCollection  AVerifications 
)
inlinestatic

Cancel this batch

Parameters
ALedgerNumber
ABatchNumber
AVerifications

◆ CreateABatch() [1/2]

static GLBatchTDS Ict.Petra.Server.MFinance.Common.TGLPosting.CreateABatch ( Int32  ALedgerNumber,
string  ABatchDescription,
decimal  ABatchControlTotal,
DateTime  ADateEffective,
TDataBase  ADataBase = null 
)
inlinestatic

create a new batch. it is already stored to the database, to avoid problems with LastBatchNumber

Returns

◆ CreateABatch() [2/2]

static GLBatchTDS Ict.Petra.Server.MFinance.Common.TGLPosting.CreateABatch ( Int32  ALedgerNumber,
TDataBase  ADataBase,
Boolean  AWithGLJournal = false 
)
inlinestatic

create a new batch. it is already stored to the database, to avoid problems with LastBatchNumber

◆ CreateAJournal()

static bool Ict.Petra.Server.MFinance.Common.TGLPosting.CreateAJournal ( GLBatchTDS  AMainDS,
Int32  ALedgerNumber,
Int32  ABatchNumber,
Int32  ALastJournalNumber,
string  AJournalDescription,
string  ACurrency,
decimal  AXRateToBase,
DateTime  ADateEffective,
Int32  APeriodNumber,
out Int32  AJournalNumber 
)
inlinestatic

Create a new journal as per gl1120.i

◆ CreateARecurringBatch()

static GLBatchTDS Ict.Petra.Server.MFinance.Common.TGLPosting.CreateARecurringBatch ( Int32  ALedgerNumber)
inlinestatic

create a new recurring batch. it is already stored to the database, to avoid problems with LastBatchNumber

◆ CreateATransaction()

static bool Ict.Petra.Server.MFinance.Common.TGLPosting.CreateATransaction ( GLBatchTDS  AMainDS,
Int32  ALedgerNumber,
Int32  ABatchNumber,
Int32  AJournalNumber,
string  ANarrative,
string  AAccountCode,
string  ACostCentreCode,
decimal  ATransAmount,
DateTime  ATransDate,
bool  ADebCredIndicator,
string  AReference,
bool  ASystemGenerated,
decimal  ABaseAmount,
out int  ATransactionNumber 
)
inlinestatic

create a record for a_transaction

◆ CreateGLMYear()

static Int32 Ict.Petra.Server.MFinance.Common.TGLPosting.CreateGLMYear ( ref GLPostingTDS  AMainDS,
Int32  ALedgerNumber,
int  AYear,
string  AAccountCode,
string  ACostCentreCode 
)
inlinestatic

creates the rows for the specified year in AGeneralLedgerMaster and AGeneralLedgerMasterPeriod for an Account/CostCentre combination

Parameters
AMainDS
ALedgerNumber
AYear
AAccountCode
ACostCentreCode
Returns
The GLM Sequence

◆ DeleteGLBatch()

static bool Ict.Petra.Server.MFinance.Common.TGLPosting.DeleteGLBatch ( Int32  ALedgerNumber,
Int32  ABatchNumber,
out TVerificationResultCollection  AVerifications,
TDataBase  ADataBase 
)
inlinestatic

If a Batch has been created then found to be not required, it can be deleted here. (This was added for ICH and Stewardship calculations, which can otherwise leave empty batches in the ledger.)

Returns

◆ GLBatchCanBeCancelled()

static bool Ict.Petra.Server.MFinance.Common.TGLPosting.GLBatchCanBeCancelled ( out GLBatchTDS  AMainDS,
Int32  ALedgerNumber,
Int32  ABatchNumber,
out TVerificationResultCollection  AVerifications,
TDataBase  ADataBase = null 
)
inlinestatic

Tell me whether this Batch can be cancelled

◆ LoadGLBatchData() [1/2]

static GLBatchTDS Ict.Petra.Server.MFinance.Common.TGLPosting.LoadGLBatchData ( Int32  ALedgerNumber,
Int32  ABatchNumber,
out TVerificationResultCollection  AVerifications,
TDataBase  ADataBase = null 
)
inlinestatic

load the batch and all associated tables into the typed dataset

◆ LoadGLBatchData() [2/2]

static GLBatchTDS Ict.Petra.Server.MFinance.Common.TGLPosting.LoadGLBatchData ( Int32  ALedgerNumber,
Int32  ABatchNumber,
ref TDBTransaction  ATransaction,
ref TVerificationResultCollection  AVerifications 
)
inlinestatic

load the batch and all associated tables into the typed dataset

Parameters
ALedgerNumber
ABatchNumber
ATransaction
AVerifications
Returns
CANNOT return a Null dataset. Instead throws an error!

◆ PostGLBatch()

static bool Ict.Petra.Server.MFinance.Common.TGLPosting.PostGLBatch ( Int32  ALedgerNumber,
Int32  ABatchNumber,
out TVerificationResultCollection  AVerifications,
TDataBase  ADataBase = null 
)
inlinestatic

post a GL Batch

◆ PostGLBatches()

static bool Ict.Petra.Server.MFinance.Common.TGLPosting.PostGLBatches ( Int32  ALedgerNumber,
List< Int32 >  ABatchNumbers,
out TVerificationResultCollection  AVerifications,
TDataBase  ADataBase = null 
)
inlinestatic

post several GL Batches at once Returns true if it seems to be OK.

◆ PrepareGLBatchForPosting()

static GLPostingTDS Ict.Petra.Server.MFinance.Common.TGLPosting.PrepareGLBatchForPosting ( out GLBatchTDS  AMainDS,
Int32  ALedgerNumber,
Int32  ABatchNumber,
ref TDBTransaction  ATransaction,
out TVerificationResultCollection  AVerifications,
SortedList< string, TAmount APostingLevel,
ref Int32  ABatchPeriod 
)
inlinestatic

Prepare posting a GL Batch, without saving to database yet. This is called by the actual PostGLBatch routine, and also by the routine for testing what would happen to the balances.

Parameters
AMainDS
ALedgerNumber
ABatchNumber
ATransaction
AVerifications
APostingLevel
ABatchPeriod
Returns

◆ PrintReportOnClient()

delegate Int32 Ict.Petra.Server.MFinance.Common.TGLPosting.PrintReportOnClient ( String  ReportName,
String  ParamStr 
)

◆ ReverseBatch()

static bool Ict.Petra.Server.MFinance.Common.TGLPosting.ReverseBatch ( Int32  ALedgerNumber,
Int32  ABatchNumberToReverse,
DateTime  ADateForReversal,
out Int32  AReversalBatchNumber,
out TVerificationResultCollection  AVerifications,
bool  AAutoPostReverseBatch 
)
inlinestatic

reverse gl batch

Parameters
ALedgerNumber
ABatchNumberToReverse
ADateForReversal
AReversalBatchNumber
AVerifications
AAutoPostReverseBatch
Returns

◆ TestPostGLBatch()

static bool Ict.Petra.Server.MFinance.Common.TGLPosting.TestPostGLBatch ( Int32  ALedgerNumber,
Int32  ABatchNumber,
TDBTransaction  ATransaction,
out TVerificationResultCollection  AVerifications,
out GLPostingTDS  APostingDS,
ref Int32  ABatchPeriod 
)
inlinestatic

Only used for precalculating the new balances before the user actually posts the batch

Parameters
ALedgerNumber
ABatchNumber
ATransaction
AVerifications
APostingDS
ABatchPeriod
Returns

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