project QadFinancials > class BBankEntry > method AdditionalUpdatesInvCInvoice
Description
create ci movements
Parameters
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program4/bbankentry.p)
MAIN_BLOCK:
do on error undo, throw:
/* ========================================================================= *
* Call a method in BCI that does update of the delayed taxes on the invoice *
* ========================================================================= */
if can-find(first tCInvoiceVatDelayDeltaRef)
then do:
<M-82 run UpdateCInvoiceVatDelay
(input tCInvoiceVatDelayDeltaRef (tCInvoiceVatDelayDelta),
input viBJournalEntryBEID (iiBJournalEntryID),
input vhBJournalEntryBEInst (ihBJournalEntryHandle),
output viFcReturnSuper (oiReturnStatus)) in BCInvoice>
if viFcReturnSuper < 0 or viFcReturnSuper > 0 and oiReturnStatus = 0 then assign oiReturnStatus = viFcReturnSuper.
if oiReturnStatus < 0 then leave MAIN_BLOCK.
end. /* if can-find(first tCInvoiceVatDelayDeltaRef) */
/* ====================================================================== */
/* Call a method in BCI that will make the movements */
/* ====================================================================== */
if can-find(first tBankCIMovement)
then do:
<M-1 run CreateCInvoiceMovements
(input-output tBankCIMovement (tMovement),
input tCDocInvoiceXrefStageRef (tCInvoiceStageUpdates),
input-output viBJournalEntryBEID (biBJournalEntryId),
input false (ilClearData),
input tBankStateLine.BankStateLinePostingDate (itPaymentTaxPointDate),
input vlBCInvoiceIsStartedFromBE (ilIsCallFromBankingEntryOrOIAdj),
output viFcReturnSuper (oiReturnStatus)) in BCInvoice>
if viFcReturnSuper < 0 or viFcReturnSuper > 0 and oiReturnStatus = 0 then assign oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then do:
assign vcMessage = trim(substitute(#T-3'Error &1 has occurred when creating the supplier invoice activity. See other messages for more information.':150(351)t-3#, string(viExternalError))).
<M-2 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-954':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input '' (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BBankEntry>
leave MAIN_BLOCK.
end. /* if viFcReturnSuper < 0 */
end. /* if can-find(first tBankCIMovement) */
end. /* MAIN_BLOCK */