project QadFinancials > class BPosting > method AdditionalUpdatesOpenItems
Description
UpdateOpenItems
Parameters
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program5/bposting.p)
if can-find(first tPostingGLOpenItemMov)
then do:
if viBGLOpenItemPostingID = 0 or
viBGLOpenItemPostingID = ?
then do:
<I-13 {bFcStartAndOpenInstance
&ADD-TO-TRANSACTION = "true"
&CLASS = "BGLOpenItem"}>
assign vlBGLOpenItemIsStartedFromPost = true.
end.
else do:
<I-14 {bFcOpenInstance
&CLASS = "BGLOpenItem"}>
end.
<M-43 run CreateUpdateGLOpenItemMov
(input tPostingGLOpenItemMov (tGLOpenItemMov),
output viReturn (oiReturnStatus)) in BGLOpenItem>
if viReturn >= 0 and
vlBGLOpenItemIsStartedFromPost
then do:
<M-18 run ValidateBCAndAdditionalUpdates (output viReturn (oiReturnStatus)) in BGLOpenItem>
end.
/* ========================================================================================================= */
/* Normally we would here close BGLOpenItem but we will not do it for performance */
/* reasons as this way the Commit of the transaction does not have to re-open the instance to commit it. */
/* And in all other scenario's the instance of the class ill be closed by the de-activiate procedure of the */
/* appserver that is executed after each call to the appserver */
/* ========================================================================================================= */
if viReturn < 0 or
oiReturnStatus = 0
then assign oiReturnStatus = viReturn.
if oiReturnStatus < 0
then return.
end.