Description
Actions to take after writing current instance to the database, and before final commit of the transaction.
Use the field tc_status to test the status of the updated records:
'' = unchanged
'N' = new
'C' = changed
'D' = deleted
Parameters
oiReturnStatus | output | integer | |
Internal usage
unused
program code (program/bwithholdingtax.p)
<ANCESTOR-CODE>
/* ====================================================================================== */
/* Strange construction on the WHT-numbering as not all calls for the same number are */
/* done in the same class: */
/* WHT Numbers are retrieved in BCInvoice, BBankEntry, BCDocument and BOpenItemAdjustment */
/* The possible release/store is done in these components as well. */
/* The Numbers are committed in BWithHoldingTax.PostSave */
/* ====================================================================================== */
for each tWHT where
tWHT.tc_Status = "N":U:
if tWHT.WHTNumber <> 0 and
tWHT.WHTNumber <> ?
then do:
assign vhFcComponent = ?.
<M-54 run CommitNumber
(input tWHT.Company_ID (iiCompanyID),
input 9999 (iiNumbrYear),
input 'WHT':U (icNumbrType),
input tWHT.WHTNumber (iiNumbr),
input viFcCurrentInstanceId (iiInstanceId),
input vcFcComponentName (icClassName),
output viFcReturnSuper (oiReturnStatus)) in BNumber>
if viFcReturnSuper < 0 or
oiReturnStatus = 0
then assign oiReturnStatus = viFcReturnSuper.
if oiReturnStatus < 0
then return.
end. /* if tWHT.WHTNumber <> 0 and */
end. /* for each tWHT where */