project QadFinancials > class BRecurringEntry > method ValRecEntryLineAmountLC

validation procedure

Description

ValRecEntryLineAmountLC


Parameters


idTargetFieldinputdecimalValue of the business field to validate.
icTargetFieldNameinputcharacterName of the business field to validate.
icRowidinputcharacterContents of field tc_Rowid, if the target field is a field of a component temp-table.
ilRecEntryIsAmountApplyinputlogicalRecEntryIsAmountApply
icRecEntryCodeinputcharacterRecurring Entry Code
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BRecurringEntry.GenerateCalendar
validation on tRecEntryLine.RecEntryLineAmountLC


program code (program4/brecurringentry.p)

/* CA665026*
 * The whole method is commented out due to the design issue
 * when BC Amount (RecEntryAmountLC) = 0 / RecEntryIsAmountApply = false
 * and user modified posting amount RecEntryLineAmountLC <>0.


/* ======================================================== */
/* The amount on the Recurring Entry Line must be filled in */
/* when the RecEntryIsAmountApply is true.                  */
/* ======================================================== */
if ilRecEntryIsAmountApply = true and
   idTargetField           = 0
then do:
    assign vcMessageRE    = trim(#T-3'The recurring entry amount cannot be zero when the amount is applied in the posting.':150(3492)T-3#) + chr(10) +
                            trim(substitute(#T-4'Recurring entry code: &1.':255(3493)T-4#,trim(icRecEntryCode)))
           oiReturnStatus = -1.
    <M-1 run SetMessage (input  vcMessageRE (icMessage),
                     input  '':U (icArguments),
                     input  icTargetFieldName (icFieldName),
                     input  string(idTargetField) (icFieldValue),
                     input  'E':U (icType),
                     input  3 (iiSeverity),
                     input  icRowid (icRowid),
                     input  'QADFIN-970':U (icFcMsgNumber),
                     input  '' (icFcExplanation),
                     input  '' (icFcIdentification),
                     input  '' (icFcContext),
                     output viFcReturnSuper (oiReturnStatus)) in BRecurringEntry>
end.

/* ======================================================== */
/* The amount on the Recurring Entry Line must be filled in */
/* when the RecEntryIsAmountApply is true.                  */
/* ======================================================== */
if ilRecEntryIsAmountApply = false and
   idTargetField          <> 0
then do:
    assign vcMessageRE    = trim(substitute(#T-5'The recurring entry amount (&1) must be zero when the amount is not applied in the posting.':150(3494)t-5#, string(idTargetField))) + chr(10) +
                            trim(substitute(#T-6'Recurring entry code: &1.':255(3493)T-6#,trim(icRecEntryCode)))
           oiReturnStatus = -1.
    <M-2 run SetMessage (input  vcMessageRE (icMessage),
                     input  '':U (icArguments),
                     input  icTargetFieldName (icFieldName),
                     input  string(idTargetField) (icFieldValue),
                     input  'E':U (icType),
                     input  3 (iiSeverity),
                     input  icRowid (icRowid),
                     input  'QADFIN-971':U (icFcMsgNumber),
                     input  '' (icFcExplanation),
                     input  '' (icFcIdentification),
                     input  '' (icFcContext),
                     output viFcReturnSuper (oiReturnStatus)) in BRecurringEntry>
end.
 * CA665026*/