PdcPurchaseInvoices.Open: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
Created page with "== Declaration == Open(ID as long) as PdcPurchaseInvoiceHeader == Description == == Notes == == Code example == <source lang="vb"> </source> == Availability =="
 
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Declaration ==
== Declaration ==
Open(ID as long) as [[PdcPurchaseInvoiceHeader]]
Open(BookNo as string) as [[PdcPurchaseInvoiceHeader]]


== Description ==
== Description ==
 
Returns an opened purchase invoice object of the supplied number.


== Notes ==
== Notes ==
 
BookNo = the invoice number to open in an object (PIH_BOOKNUMBER).


== Code example ==
== Code example ==
 
The following code example opens an existing purchase invoice, changes the invoice number, invoice date and saves the purchase invoice.
<source lang="vb">
<source lang="vb">
dim objPI


  set objPI = Pdc.logistics.PurchaseInvoices.Open("00027")
  if IsValid(objPI) then
    objPI.InvoiceNo = "12345"
    objPI.InvoiceDate = Date - 2
    if not objPI.Save then
      msgbox objPI.ErrorMessages
    end if
  else
    msgbox "The invoice number is not found in PdC."
  end if
</source>
</source>


== Availability ==
== Availability ==
Available since April 2014 (Version 4.3 onwards)

Latest revision as of 10:27, 19 August 2015

Declaration

Open(BookNo as string) as PdcPurchaseInvoiceHeader

Description

Returns an opened purchase invoice object of the supplied number.

Notes

BookNo = 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
    if not objPI.Save then
      msgbox objPI.ErrorMessages
    end if
  else
    msgbox "The invoice number is not found in PdC."
  end if

Availability

Available since April 2014 (Version 4.3 onwards)