Description
Remove the posting from the instance
Parameters
iiPostingId | input | integer | Posting ID |
iiBJournalEntryId | input | integer | Instance of BJournalEntry |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program3/bbankentry.p)
/* ====================== */
/* replace unknown values */
/* ====================== */
if iiPostingId = ? then assign iiPostingId = 0.
if iiBJournalEntryId = ? then assign iiBJournalEntryId = 0.
assign viBJournalEntryBEID = iiBJournalEntryId.
/* =========================== */
/* if no posting id, then return */
/* =========================== */
if iiPostingId = 0
then return.
/* ================= */
/* Get info from DB */
/* ================= */
if viBJournalEntryBEID <> 0
then do :
<I-1 {bFcOpenInstance
&CLASS = "BJournalEntry"}>
<M-6 run RemovePostingFromInstance
(input iiPostingId (iiPostingID),
output viFcReturnSuper (oiReturnStatus)) in BJournalEntry>
<I-2 {bFcCloseInstance
&CLASS = "BJournalEntry"}>
if viFcReturnSuper <> 0
then assign oiReturnStatus = viFcReturnSuper.
if oiReturnStatus < 0
then do :
assign vcMessage = trim(substitute(#T-5'An error (&1) has occurred while removing the posting.':200(357)T-5#, string(viFcReturnSuper)))
oiReturnStatus = -1.
<M-3 run SetMessage (input vcMessage (icMessage),
input '':U (icArguments),
input '':U (icFieldName),
input '':U (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input '':U (icRowid),
input 'QADFIN-1996':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input '' (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BBankEntry>
return.
end.
end.