project QadFinancials > class BRecurringEntry > method ValRecEntryJournal

validation procedure

Description

Extra validation on Journal Type (only type Journal Entry)


Parameters


icTargetFieldinputcharacterValue 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.
icJournalTypeCodeinputcharacterDaybook Type Code
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
validation on relation JOURNALINRECENTRY


program code (program4/brecurringentry.p)

/* ============================================================== */
/* Journal Type Code should be 'Journal Entry'                    */
/* ============================================================== */
if icJournalTypeCode      <> {&JOURNALTYPE-JOURNALENTRY}
then do:
    assign vcMessageRE    = trim(substitute(#T-2'The daybook (&1) must be of daybook type &2.':150(3491)T-2#, trim(icTargetField), trim({&JOURNALTYPE-JOURNALENTRY-TR}) ))
           oiReturnStatus = -1.
    <M-1 run SetMessage (input  vcMessageRE (icMessage),
                     input  '':U (icArguments),
                     input  icTargetFieldName (icFieldName),
                     input  icTargetField (icFieldValue),
                     input  'E':U (icType),
                     input  3 (iiSeverity),
                     input  icRowid (icRowid),
                     input  'QADFIN-1343':U (icFcMsgNumber),
                     input  '' (icFcExplanation),
                     input  '' (icFcIdentification),
                     input  '' (icFcContext),
                     output viFcReturnSuper (oiReturnStatus)) in BRecurringEntry>
end.