project QadFinancials > class BJournalEntry > method GrossIncomeAccountingPosting
Description
This method will return the posting_id for the Gross Income Accounting posting. It will be retrieved based on the postinginvoicereferencetxt field.
Parameters
icPostingInvoiceReferenceTxt | input | character | PostingInvoiceReferenceTxt holds the link to the Gross Income Accounting Posting: YYYY/daybook/voucher. |
oiPostingId | output | integer | Posting ID |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program6/bjournalentry.p)
if icPostingInvoiceReferenceTxt = '' or
icPostingInvoiceReferenceTxt = ? or
num-entries(icPostingInvoiceReferenceTxt, '/') <> 3
then return.
assign viPeriodYear = integer(entry(1, icPostingInvoiceReferenceTxt, '/'))
vcJournalCode = entry(2, icPostingInvoiceReferenceTxt, '/')
viPostingVoucher = integer(entry(3, icPostingInvoiceReferenceTxt, '/'))
no-error.
if error-status:error
then return.
<Q-6 run PostingPrim (all) (Read) (NoCache)
(input viCompanyId, (CompanyId)
input vcJournalCode, (JournalCode)
input viPeriodYear, (PeriodYear)
input viPostingVoucher, (PostingVoucher)
input 0, (PostingID)
output dataset tqPostingPrim) in BPosting >
find tqPostingPrim where
tqPostingPrim.tiPostingYear = viPeriodYear and
tqPostingPrim.tiPostingVoucher = viPostingVoucher
no-lock no-error.
if available tqPostingPrim
then assign oiPostingId = tqPostingPrim.tiPosting_ID.