project QadFinancials > class BCInvoice > method UpdateJournalInPostingInstance
Description
update the journal in the posting instance : run from ui when changing the invoice status code from one with transient allocation to one with official allocation
Parameters
iiMFPostingId | input | integer | |
icMFJournalCode | input | character | MF Journal Code |
oiPostingVoucher | output | integer | Posting Voucher |
oiPostingYear | output | integer | Posting Year |
oiPostingPeriod | output | integer | Posting Period |
otPostingDate | output | date | Posting Date |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program3/bcinvoice.p)
/* Start and/or Open BJournalEntry */
if viBJournalEntryCIId = 0 or
viBJournalEntryCIId = ?
then do:
<I-1 {bFcStartAndOpenInstance
&ADD-TO-TRANSACTION = "true"
&CLASS = "BJournalEntry"}>
assign vlBJEIsStartedFromCI = true.
end.
else do:
<I-2 {bFcOpenInstance
&CLASS = "BJournalEntry"}>
end.
<M-3 run UpdateJournalDateInPostingInstance
(input iiMFPostingId (iiPostingId),
input icMFJournalCode (icNewJournalCode),
output oiPostingVoucher (oiPostingVoucher),
output oiPostingYear (oiPostingYear),
output oiPostingPeriod (oiPostingPeriod),
output otPostingDate (otPostingDate),
output viFcReturnSuper (oiReturnStatus)) in BJournalEntry>
if viFcReturnSuper < 0 or (viFcReturnSuper > 0 and oiReturnStatus = 0)
then assign oiReturnStatus = viFcReturnSuper.
/* Close the journal entry instance */
<I-4 {bFcCloseInstance
&CLASS = "BJournalEntry"}>
if oiReturnStatus < 0
then return.