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.
<IHsvJournalsEx>.GetVariance lSingleParent, lSingleEntity, varalParent, varalEntity, varalAccount, lValue, varanDebitCreditUnit, varabstrAmount, pbstrTotalDebits, pbstrTotalCredits, pbstrAmount
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