validation procedure
Description
ValRecEntryLineAmountLC
Parameters
idTargetField | input | decimal | Value of the business field to validate. |
icTargetFieldName | input | character | Name of the business field to validate. |
icRowid | input | character | Contents of field tc_Rowid, if the target field is a field of a component temp-table. |
ilRecEntryIsAmountApply | input | logical | RecEntryIsAmountApply |
icRecEntryCode | input | character | Recurring Entry Code |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
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*/