project QadFinancials > class BEmployee > method ValRegCurrency

Description

Validates Registration Currency in case the creditor is linked to the employee.


Parameters


oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BEmployee.ValGeneral


program code (program1/bemployee.p)

/* In case the Creditor is linked to the employee the Registration Currency has to be filled in */
if t_sEmployee.Currency_ID = ? or
   t_sEmployee.Currency_ID = 0
then do:
    assign vcMessage = trim(substitute(#T-2'If a supplier is linked to the employee, you must enter the payment currency (employee: &1).':200(1838)T-2#, trim(t_sEmployee.EmployeeCode))).
    <M-1 run SetMessage (input  vcMessage (icMessage),
                     input  '':U (icArguments),
                     input  'tEmployee.tcCurrencyCode':U (icFieldName),
                     input  t_sEmployee.tcCurrencyCode (icFieldValue),
                     input  'E':U (icType),
                     input  3 (iiSeverity),
                     input  t_sEmployee.tc_Rowid (icRowid),
                     input  'QADFIN-1603':U (icFcMsgNumber),
                     input  '' (icFcExplanation),
                     input  '' (icFcIdentification),
                     input  '' (icFcContext),
                     output viFcReturnSuper (oiReturnStatus)) in BEmployee>
    assign oiReturnStatus = min(-1, viFcReturnSuper).
end.