project QadFinancials > class BPosting > method AdditionalUpdatesLegDoc
Description
Update the Legal Document Number.
Parameters
| oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program5/bposting.p)
/*Copy the LegalDocument Number to Cross Company PostingLine records.
The PostingLines for one posting have the same PostingLineLegalDocNbr value*/
define buffer bftPostingLine for tPostingLine.
for each bftPostingLine where bftPostingLine.CrossCompanyPostingline_ID > 0 and bftPostingLine.tc_Status = "N":U:
<Q-45 run PostingLineByPostingLnId (first) (Read) (NoCache)
(input ?, (CompanyId)
input bftPostingLine.CrossCompanyPostingLine_ID, (PostingLine_ID)
output dataset tqPostingLineByPostingLnId) in BPosting>
for first tqPostingLineByPostingLnId:
for each tPostingLine where tPostingLine.Posting_ID = bftPostingLine.Posting_ID:
if tPostingLine.PostingLineLegalDocNbr = "":U or tPostingLine.PostingLineLegalDocNbr = ? then
tPostingLine.PostingLineLegalDocNbr = tqPostingLineByPostingLnId.tcPostingLineLegalDocNbr.
end.
end.
end.