Description
Create new ERS record
Parameters
ilIsPrintAuditReport | input | logical | |
ilIsCreateCInvAndRM | input | logical | |
itStartDate | input | date | |
iiStartTime | input | integer | |
itEndDate | input | date | |
iiEndTime | input | integer | |
oiERSId | output | integer | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program5/bers.p)
/* =================================================================================================== */
/* Method : AddERS */
/* Desc : Add new ERS record */
/* --------------------------------------------------------------------------------------------------- */
/* Params: (I) IsPrintAuditReport Is print audit report */
/* (I) IsCreateCInvAndRM Create supplier invoice and receiver matching */
/* (I) StartDate Start date */
/* (I) StartTime Start time */
/* (I) EndDate End date */
/* (I) EndTime End time */
/* (O) ERSId ID of created ERS record */
/* =================================================================================================== */
assign oiReturnStatus = -98.
/* =================================================================================================== */
/* Normalize input parameters */
/* =================================================================================================== */
if ilIsPrintAuditReport = ? then ilIsPrintAuditReport = false.
if ilIsCreateCInvAndRM = ? then ilIsCreateCInvAndRM = false.
/* =================================================================================================== */
/* Create new record */
/* =================================================================================================== */
<M-1 run AddDetailLine
(input 'ERS':U (icTable),
input '':U (icParentRowid),
output viFcReturnSuper (oiReturnStatus)) in BERS>
if viFcReturnSuper <> 0 then assign oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0 then return.
assign tERS.ERSIsPrintAuditReport = ilIsPrintAuditReport
tERS.ERSIsCreateCInvAndRM = ilIsCreateCInvAndRM
tERS.ERSStartDate = itStartDate
tERS.ERSStartTime = iiStartTime
tERS.ERSEndDate = itEndDate
tERS.ERSEndTime = iiEndTime.
/* =================================================================================================== */
/* Return */
/* =================================================================================================== */
assign oiERSId = tERS.ERS_ID.
if oiReturnStatus = -98 then assign oiReturnStatus = 0.