GetVariance

Returns a journal’s total debit and credit amounts and the difference between these amounts.

You do not pass a journal ID to GetVariance. Instead, you pass journal information returned by GetJournal or GetTextJournal as shown in the example.

Syntax

<IHsvJournalsEx>.GetVariance lSingleParent, lSingleEntity, varalParent, varalEntity, varalAccount, lValue, varanDebitCreditUnit, varabstrAmount, pbstrTotalDebits, pbstrTotalCredits, pbstrAmount

Argument

Description

lSingleParent

Long (ByVal). Pass the value returned by the plSingleParent argument of GetJournal or GetTextJournal.

lSingleEntity

Long (ByVal). Pass the value returned by the plSingleEntity argument of GetJournal or GetTextJournal.

varalParent

Variant (ByVal). Pass the array of parent entity member IDs returned by the pvararlParent argument of GetJournal or GetTextJournal.

varalEntity

Variant (ByVal). Pass the array of entity member IDs returned by the pvararlEntity argument of GetJournal or GetTextJournal.

varalAccount

Variant (ByVal). Pass the array of account member IDs returned by the pvararlAccount argument of GetJournal or GetTextJournal.

lValue

Long (ByVal). Pass the Value dimension member ID returned by the plValue argument of GetJournal or GetTextJournal.

varanDebitCreditUnit

Variant (ByVal). Pass the array flagging line items as debits or credits that is returned by the pvararnDebitCreditUnit argument of GetJournal or GetTextJournal.

varabstrAmount

Variant (ByVal). Pass the array of line item amounts that is returned by the pvarabstrAmount argument of GetTextJournal or the pvaradAmount argument of GetJournal.

Caution!

The GetJournal array would need to be converted to a String subtype.

pbstrTotalDebits

String. Returns the total debit amount.

pbstrTotalCredits

String. Returns the total credit amount.

pbstrAmount

String. Returns the difference between the pbstrTotalDebits and pbstrTotalCredits arguments’ amounts.

Example

The following example uses GetVariance to place the difference between a journal’s debits and credits in a text box control named txtVariance. Note how GetVariance’s ByVal arguments are passed with information that is returned by GetTextJournal.

m_cIHsvJournalEx.GetTextJournal lScen, lYear, lJnlID, lPer, _ 
lVal, iType, iStatus, iAttr, sLabel, sDesc, sGroup, _ 
lSingEnt, lSingPar, lSec, vaIds, vaDebCred, vaAmounts, _ 
vaDescs, vaEnts, vaPars, vaAccts, vaICPs, vaCust1, _ 
vaCust2, vaCust3, vaCust4
m_cIHsvJournalEx.GetVariance lSingEnt, lSingPar, vaPars, _ 
vaEnts, vaAccts, lVal, vaDebCred, vaAmounts, sTotDebs, _ 
sTotCreds, sVariance
txtVariance.Text = sVariance