project QadFinancials > class BDebtor > method ApiLoadDebtorCalcEmployeeCode

function returns character


Parameters


iiEmployeeIDinputinteger


Internal usage


QadFinancials
method BDebtor.ApiLoadDebtor


program code (program1/bdebtor.p)

define variable oiReturnStatus as integer no-undo.

if iiEmployeeID = ? or
   iiEmployeeID = 0
then return "":U.

<Q-53 run EmployeePrim (all) (Read) (Cache)
   (input iiEmployeeID, (EmployeeId)
    input ?, (EmployeeCode)
    input ?, (CompanyId)
    output dataset tqEmployeePrim) in BEmployee>

find first tqEmployeePrim where
           tqEmployeePrim.tiEmployee_ID = iiEmployeeID
           no-error.

return if available tqEmployeePrim
       then tqEmployeePrim.tcEmployeeCode
       else "":U.