project QadFinancials > class BEmployee > method ApiLoadEmployeeCalcCreditorCode
function returns character
Description
This method is used to load creditor code by creditor_id.
Parameters
iiCreditorId | input | integer | Creditor ID. |
Internal usage
QadFinancials
program code (program9/bemployee.p)
define variable oiReturnStatus as integer no-undo.
if iiCreditorId = ? or
iiCreditorId = 0
then return "":U.
<Q-2 run CreditorPrim (all) (Read) (NoCache)
(input viCompanyId, (CompanyId)
input iiCreditorId, (CreditorId)
input ?, (CreditorCode)
output dataset tqCreditorPrim) in BCreditor >
find first tqCreditorPrim where
tqCreditorPrim.tiCreditor_ID = iiCreditorId
no-error.
return if available tqCreditorPrim
then tqCreditorPrim.tcCreditorCode
else "":U.