project QadFinancials > class BJournalEntry > method GetPostingApproveStatusCalc
function returns character
Parameters
Internal usage
QadFinancials
program code (program1/bjournalentry.p)
/* Default output value */
assign vcStatus = "":U.
/* Cache document statuses for better performance */
if vcPostingApproveStatusAll = ? or
vcPostingApproveStatusAll = ""
then assign vcPostingApproveStatusAll = {&APPROVESTATUSTRANSS}.
/* Get correct translation of document status */
do viA = num-entries(vcPostingApproveStatusAll, chr(2)) to 1 by -2:
if entry(viA, vcPostingApproveStatusAll, chr(2)) = icStatus
then do:
assign vcStatus = entry(viA - 1, vcPostingApproveStatusAll, chr(2)).
leave.
end.
end.
/* Return value */
return vcStatus.