project QadFinancials > class BDDocument > method AdditionalUpdatesDInvoice
Parameters
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program1/bddocument.p)
/* =================================================================================================== */
/* Method : AdditionalUpdatesDInvoice */
/* Desc : This method does additional updates on customer invoice */
/* --------------------------------------------------------------------------------------------------- */
/* Params: none */
/* =================================================================================================== */
if can-find (first tUpdateDInvBankNumber)
then do:
/* Update DInvoice */
if viBDInvoiceDDocID = 0 or viBDInvoiceDDocID = ?
then do:
<I-5 {bFcStartAndOpenInstance
&ADD-TO-TRANSACTION = "true"
&CLASS = "BDInvoice"}>
assign vlBDInvoiceDDocWasStartedHere = true.
end. /* if viBDInvoiceDDocID = 0 or viBDInvoiceDDocID = ? */
else do:
<I-6 {bFcOpenInstance
&CLASS = "BDInvoice"}>
end. /* else do */
<M-11 run UpdateDInvoiceBank
(input tUpdateDInvBankNumber (tUpdateDInvoiceBankNumber),
output viFcReturnSuper (oiReturnStatus)) in BDInvoice>
if viFcReturnSuper < 0 or oiReturnStatus = 0
then assign oiReturnStatus = viFcReturnSuper.
<M-10 run ValidateBCAndAdditionalUpdates (output viFcReturnSuper (oiReturnStatus)) in BDInvoice>
if viFcReturnSuper < 0 or oiReturnStatus = 0
then assign oiReturnStatus = viFcReturnSuper.
/* ========================================================================================================= */
/* Normally we would here close BDInvoice 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 */
/* ========================================================================================================= */
end. /* if can-find (first tUpdateDInvBankNumber) */