project QadFinancials > class BDebtor > method ApiLoadDebtorCalcBLWIGroupCode

function returns character


Parameters


iiBLWIGroupIdinputinteger


Internal usage


QadFinancials
method BDebtor.ApiLoadDebtor


program code (program9/bdebtor.p)

define variable oiReturnStatus as integer no-undo.

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

<Q-1 run BLWIGroupPrim (all) (Read) (Cache)
   (input iiBLWIGroupId, (BLWIGroupId)
    input ?, (BLWIGroupCode)
    output dataset tqBLWIGroupPrim) in BBLWIGroup >

find first tqBLWIGroupPrim where
           tqBLWIGroupPrim.tiBLWIGroup_ID = iiBLWIGroupId
           no-error.

return if available tqBLWIGroupPrim
       then tqBLWIGroupPrim.tcBLWIGroupCode
       else "":U.