project QadFinancials > class BRecurringEntry > method ValRecEntryLineReversingDate

validation procedure

Description

ValRecEntryLineReversingDate


Parameters


itTargetFieldinputdateValue 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.
ilRecEntryIsReversinginputlogicalRecEntryIsReversing
itRecEntryLinePostingDateinputdateRecEntryLinePostingDate
icRecEntryCodeinputcharacterRecEntryCode
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
validation on tRecEntryLine.RecEntryLineReversingDate


program code (program4/brecurringentry.p)

/* ============================================================== */
/* The reversing date can not be situated before the posting date */
/* ============================================================== */
if itTargetField = ? and
   itTargetField < itRecEntryLinePostingDate
then do:
    assign vcMessageRE    = trim(substitute(#T-4'The reversing date (&1) cannot be before the posting date (&2).':150(3524)T-4#, string(itTargetField), string(itRecEntryLinePostingDate) )) + chr(10) +
                            trim(substitute(#T-5'Recurring entry code: &1.':255(3493)T-5#,trim(icRecEntryCode)))
           oiReturnStatus = -1.
    <M-3 run SetMessage (input  vcMessageRE (icMessage),
                     input  '':U (icArguments),
                     input  icTargetFieldName (icFieldName),
                     input  string(itTargetField) (icFieldValue),
                     input  'E':U (icType),
                     input  3 (iiSeverity),
                     input  icRowid (icRowid),
                     input  'QADFIN-972':U (icFcMsgNumber),
                     input  '' (icFcExplanation),
                     input  '' (icFcIdentification),
                     input  '' (icFcContext),
                     output viFcReturnSuper (oiReturnStatus)) in BRecurringEntry>
end.