PdcPurchaseInvoices.Open: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
== Notes == | == Notes == | ||
ID = the invoice number to open in an object (PIH_BOOKNUMBER). | |||
== Code example == | == Code example == | ||
Line 18: | Line 18: | ||
objPI.InvoiceDate = Date - 2 | objPI.InvoiceDate = Date - 2 | ||
objPI.save | objPI.save | ||
else | |||
msgbox "The invoice number is not found in PdC." | |||
end if | end if | ||
</source> | </source> |
Revision as of 07:12, 16 April 2014
Declaration
Open(ID as string) as PdcPurchaseInvoiceHeader
Description
Returns an opened purchase invoice object of the supplied number.
Notes
ID = the invoice number to open in an object (PIH_BOOKNUMBER).
Code example
The following code example opens an existing purchase invoice, changes the invoice number, invoice date and saves the purchase invoice.
dim objPI
set objPI = Pdc.logistics.PurchaseInvoices.Open("00027")
if IsValid(objPI) then
objPI.InvoiceNo = "12345"
objPI.InvoiceDate = Date - 2
objPI.save
else
msgbox "The invoice number is not found in PdC."
end if
Availability
Available since April 2014 (Version 4.3 onwards)