project QadFinancials > class BCInvoice > method ValidateComponentPrePO
Description
This method is submethod of ValidateComponentPre.
This method validates CInvoicePO records
Parameters
| icCInvoiceRowId | input | character | Row ID of creditor invoice |
| oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program5/bcinvoice.p)
/* =================================================================================================== */
/* Method : ValidateComponentPrePO */
/* Desc : Perform pre validate actions on CInvoicePO records */
/* --------------------------------------------------------------------------------------------------- */
/* Params: (I) Name Description */
/* (O) Name Description */
/* =================================================================================================== */
assign oiReturnStatus = -98.
/* =================================================================================================== */
/* If there are records without defined Purchase Order, simply delete them */
/* =================================================================================================== */
for each t_sCInvoicePO where
t_sCInvoicePO.tc_ParentRowid = icCInvoiceRowId and
(t_sCInvoicePO.CInvoicePOPoNbr = "":U or
t_sCInvoicePO.CInvoicePOPoNbr = ?):
if t_sCInvoicePO.tc_Status = "N":U
then delete t_sCInvoicePO.
else assign t_sCInvoicePO.tc_Status = "D":U.
end. /* for each t_sCInvoicePO where */
/* =================================================================================================== */
/* Return */
/* =================================================================================================== */
if oiReturnStatus = -98 then assign oiReturnStatus = 0.