project QadFinancials > class BCInvoice > method GetPostingInfoOfInstance
Description
GetPostingInfoOfInstance
Parameters
ocPostingIDs | output | character | PostingIDs; List with the IDs of the postings linked to all new cinvoices |
ocPostingLineIDs | output | character | PostingLineIDs; List with the IDs of the posting-lines linked to all new cinvoicemovements |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program9/bcinvoice.p)
/* ==================================================================== */
/* Return a list containing all posting-ID and posting-line-ID linked */
/* to the newly created cinvoice and cinvoicemovement records */
/* ==================================================================== */
for each tCInvoicePosting where
tCInvoicePosting.tc_Status = "N":U
no-lock :
assign ocPostingIDs = ocPostingIDs + ",":U + string(tCInvoicePosting.Posting_ID).
if tCInvoicePosting.CIRECPostingLine_ID <> 0 and
tCInvoicePosting.CIRECPostingLine_ID <> ?
then assign ocPostingLineIDs = ocPostingLineIDs + ",":U + string(tCInvoicePosting.CIRECPostingLine_ID).
end. /* for each tCInvoicePosting where */
for each tCInvoiceMovement where
tCInvoiceMovement.tc_Status = "N":U
no-lock :
assign ocPostingLineIDs = ocPostingLineIDs + ",":U + string(tCInvoiceMovement.PostingLine_ID).
/* roll back the wht posting lines */
if tCInvoiceMovement.tcWHTPostingLineIDs <> "":U and
tCInvoiceMovement.tcWHTPostingLineIDs <> ?
then assign ocPostingLineIDs = ocPostingLineIDs + ",":U + tCInvoiceMovement.tcWHTPostingLineIDs.
end. /* for each tCInvoicePosting where */
if ocPostingIDs <> "":U and length(ocPostingIDs,"CHARACTER":U) > 1
then assign ocPostingIDs = substring(ocPostingIDs,2,-1,"CHARACTER":U).
if ocPostingLineIDs <> "":U and length(ocPostingLineIDs,"CHARACTER":U) > 1
then assign ocPostingLineIDs = substring(ocPostingLineIDs,2,-1,"CHARACTER":U).