project QadFinancials > class BDDocument > method RemoveNewDDocument

Description

This method is used in BBankImpLine. When action type is 'Create Customer Payment', if no invoice is found, then the new created DDocument need to be removed.


Parameters


iiDDocument_IDinputinteger
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BBankImportLine.ProcessBankImpLineNewDDocument


program code (program1/bddocument.p)

assign oiReturnStatus = -98.

if iiDDocument_ID <> 0 and iiDDocument_ID <> ? then
do:
    for each tDDocument where tDDocument.DDocument_ID = iiDDocument_ID:
        if tDDocument.tc_Status = "N":U
        then delete tDDocument.
    end.
end.

assign oiReturnStatus = 0.