project QadFinancials > class BPaymentSelection > method InitInstance

Description

This method can be extended with code to execute when an instance of a business class is started.

PreCondition

This method is executed when a new instance of the business class is started, or when a draft instance is opened (in that case a new instance is started which is a copy of the draft instance).


Parameters


oiReturnStatusoutputintegerReturn status of the method.


Internal usage


unused


program code (program/bpaymentselection.p)

    
<ANCESTOR-CODE>
    
    /* Initialise some inst-dependant flags */
    assign vlBCCollIsStartedFromPaySel  = false
           vlBCDocIsStartedFromPaySel   = false
           vlBCInvIsStartedFromPaySel   = false
           vlBDInvIsStartedFromPaySel   = false
           vlBPrepayIsStartedFromPaySel = false.
           
    /* Hold translated values of CREDIT/DEBIT in the class data item (for performance) */
    /* Note this data-item is defined as instance-depenadant so we fill it once in InitInstance and then re-use it throughout the whole class. */
    /* Defining it as not-instance-dependant will result in having the value in an incorrect langauge from time to time. */
    assign vcDebitTR  = {&CREDITDEBITABBREVIATION-DEBIT-TR}
           vcCreditTR = {&CREDITDEBITABBREVIATION-CREDIT-TR}.