PdcPurchaseInvoiceHeader.SetTermsOfPayment
Declaration
SetTermsOfPaymentId(TermsOfPaymentId as Integer) as Boolean
Description
Sets the terms of payment ID of the purchase invoice.
Notes
Automatically after setting terms of payment, the expirationdate is calculated with the number of days.
Code example
The following code example changes the terms of payment ID and saves the invoice.
dim objPI
set objPI = Pdc.logistics.PurchaseInvoices.Open("157625")
if objPI.SetTermsOfPaymentID("02") then
if not objPI.Save then
msgbox pdc.LastError
end if
else
msgbox pdc.LastError
end if
Availability
Available since April 2014 (Version 4.3 onwards)