project QadFinancials > class BOpenItemAdjustment > method OIAdjJournalEntryBalance

Description

OIAdjJournalEntryBalance


Parameters


odPostingAmountCreditLCoutputdecimalPostingAmountCreditLC
odPostingAmountDebitLCoutputdecimalPostingAmountDebitLC
odPostingAmountCreditTCoutputdecimalPostingAmountCreditTC
odPostingAmountDebitTCoutputdecimalPostingAmountDebitTC
odPostingAmountCreditCCoutputdecimalPostingAmountCreditCC
odPostingAmountDebitCCoutputdecimalPostingAmountDebitCC
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


unused


program code (program6/bopenitemadjustment.p)

/* ========================================================== */
    /* Open BJournalEntry, run the method and Close BJournalEntry */
    /* ========================================================== */
    if viBJournalEntryID = 0 or 
       viBJournalEntryID = ?
    then do :
        assign oiReturnStatus = -3
               vcMsgOIAdj     = trim(#T-6'System error: unable to retrieve the posting of the balance because the component has not yet been started.':255(2942)T-6#). 
        <M-2 run SetMessage (input  vcMsgOIAdj (icMessage),
                     input  '':U (icArguments),
                     input  '':U (icFieldName),
                     input  '':U (icFieldValue),
                     input  'S':U (icType),
                     input  1 (iiSeverity),
                     input  '':U (icRowid),
                     input  'QADFIN-751':U (icFcMsgNumber),
                     input  '' (icFcExplanation),
                     input  '' (icFcIdentification),
                     input  '' (icFcContext),
                     output viFcReturnSuper (oiReturnStatus)) in BOpenItemAdjustment>
        RETURN.
    end. /* if viBJournalEntryID = 0 or */
    <I-1 {bFcOpenInstance
            &CLASS           = "BJournalEntry"}>
    <M-3 run GetPostingAmount
       (input  viMainPostingID (iiPostingId), 
        output odPostingAmountDebitLC (odPostingAmountDebitLC), 
        output odPostingAmountCreditLC (odPostingAmountCreditLC), 
        output odPostingAmountCreditTC (odPostingAmountCreditTC), 
        output odPostingAmountCreditCC (odPostingAmountCreditCC), 
        output odPostingAmountDebitTC (odPostingAmountDebitTC), 
        output odPostingAmountDebitCC (odPostingAmountDebitCC), 
        output vcDummy (ocCurrencyCode), 
        output viBJournalEntryError (oiReturnStatus)) in BJournalEntry>
    <I-4 {bFcCloseInstance
            &CLASS           = "BJournalEntry"}>
    if viBJournalEntryError <> 0 
    then assign oiReturnStatus = viBJournalEntryError.
    if oiReturnStatus < 0 
    then do :
        assign vcMsgOIAdj = trim(substitute(#T-7'An error occurred when retrieving the posting balance (error number: &1).':255(2943)t-7#,viBJournalEntryError)). 
        <M-5 run SetMessage (input  vcMsgOIAdj (icMessage),
                     input  '':U (icArguments),
                     input  '':U (icFieldName),
                     input  '':U (icFieldValue),
                     input  'E':U (icType),
                     input  3 (iiSeverity),
                     input  '':U (icRowid),
                     input  'QADFIN-752':U (icFcMsgNumber),
                     input  '' (icFcExplanation),
                     input  '' (icFcIdentification),
                     input  '' (icFcContext),
                     output viFcReturnSuper (oiReturnStatus)) in BOpenItemAdjustment>
        Return.
    end. /* if oiReturnStatus < 0 */