Description
This method updates existing ERS records to close this processing cycle.
Parameters
| oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program5/bersprocessor.p)
/* =================================================================================================== */
/* Method : ERSProcessFinishERS */
/* Desc : Updates created ERS record about ending time */
/* =================================================================================================== */
assign oiReturnStatus = -98
viLocalReturn = 0.
/* =================================================================================================== */
/* Check if ERS was created */
/* =================================================================================================== */
if viERSId = ?
then do:
assign oiReturnStatus = 0.
return.
end.
/* =================================================================================================== */
/* Store data to database */
/* =================================================================================================== */
<I-5 {bFcStartAndOpenInstance
&ADD-TO-TRANSACTION = "true"
&CLASS = "BERS"}>
<M-6 run ModifyERS
(input viERSId (iiERSId),
input today (itEndDate),
input time (iiEndTime),
output viFcReturnSuper (oiReturnStatus)) in BERS>
if viFcReturnSuper < 0 or
viFcReturnSuper > 0 and viLocalReturn = 0
then assign viLocalReturn = viFcReturnSuper.
if viLocalReturn >= 0
then do:
<M-7 run ValidateBCAndAdditionalUpdate (output viFcReturnSuper (oiReturnStatus)) in BERS>
if viFcReturnSuper < 0 or
viFcReturnSuper > 0 and viLocalReturn = 0
then assign viLocalReturn = viFcReturnSuper.
end.
<I-4 {bFcCloseInstance
&CLASS = "BERS"}>
/* =================================================================================================== */
/* Return */
/* =================================================================================================== */
assign oiReturnStatus = viLocalReturn.