Commercialinvoicecontrol
Service CommercialInvoiceControl
Synopsis
Services connected with commercial invoice control.
Service Data structures
Service Calls
CalcInvoiceWeights
Calculate the weight of an invoice. Declaration:
Procedure CalcInvoiceWeights(IDS : TInt64Array);
update NRW_CI set
brweight =
(select
sum(CAST (CAST (A.QUANTITY AS NUMERIC (18, 0)) * isnull(WEIGHT, 0) AS NUMERIC (18, 2)))
from
NRW_CI_DET A,
ARTICLE C
where
'NW' + A.ITEMCODE = C.NAME AND
(A.InvoiceNumber = NRW_CI.ID)
)
where
NRW_CI.ID in (:IDS)
MarkInvoicesAsPrinted
Mark commercial invoices as printed.
Declaration:
Procedure MarkInvoicesAsPrinted(IDS : TInt64Array);
UPDATE NRW_CI SET
PrintingDate=GETDATE()
WHERE
ID in (:IDS)
AND PrintingDate IS NULL