Description
get the dinvoice deduction status.
if the status of the deduction detail is rejected, the deduction invoice status will be rejected.
Parameters
icDInvoiceID | input | character | Invoice ID. it could be several invoice id, seperated by comma. |
tDInvoiceDeductionStatus | output | temp-table | deduction invoice status. |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program3/bdpaymentselection.p)
assign oiReturnStatus = -98.
empty temp-table tDInvoiceDeductionStatus.
if icDInvoiceID = '' or icDInvoiceID = ? then
do:
assign oiReturnStatus = 0.
end.
do viCounter = 1 to num-entries(icDInvoiceID):
if Entry(viCounter,icDInvoiceID) <> '' and Entry(viCounter,icDInvoiceID) <> ? then
do:
create tDInvoiceDeductionStatus.
assign tDInvoiceDeductionStatus.tiDInvoice_ID = integer(Entry(viCounter,icDInvoiceID)).
<Q-80 run DInvoiceDedStatusByDInvoiceID (all) (Read) (NoCache)
(input 0, (CompanyId)
input tDInvoiceDeductionStatus.tiDInvoice_ID, (DInvoiceID)
output dataset tqDInvoiceDedStatusByDInvoiceID) in BDInvoice>
if can-find(first tqDInvoiceDedStatusByDInvoiceID where tqDInvoiceDedStatusByDInvoiceID.tcDInvoiceDeductionStatus = {&INVOICEDEDUCTSTATUS-REJECTED}) then
do:
assign tDInvoiceDeductionStatus.tcDInvoiceDeductionStatus = {&INVOICEDEDUCTSTATUS-REJECTED}.
end.
end.
end.
assign oiReturnStatus = 0.