project QadFinancials > class BBankEntry > method CalculateBankStateMovement

Description

Used by UI. This method will calculate the movement based on the closing and opening balance


Parameters


idBankStateClosingBalanceinputdecimalClosing Balance of Bank State
idBankStateOpeningBalanceinputdecimalOpening Balance of Bank State
odBankStateMovementoutputdecimalMovement of Bank State
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


unused


program code (program3/bbankentry.p)

/* ====================== */
    /* replace unknown values */
    /* ====================== */
    if idBankStateClosingBalance = ? then assign idBankStateClosingBalance = 0.
    if idBankStateOpeningBalance = ? then assign idBankStateOpeningBalance = 0.

    /* ==================================== */
    /* movement is always closing - opening */
    /* ==================================== */
    assign odBankStateMovement = idBankStateClosingBalance - idBankStateOpeningBalance.