PdcPurchaseInvoices.New: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
Created page with "== Declaration == New as PdcPurchaseInvoiceHeader == Description == == Notes == == Code example == <source lang="vb"> </source> == Availability =="
 
No edit summary
Line 3: Line 3:


== Description ==
== Description ==
 
A new purchase invoice is created with this method.


== Notes ==
== Notes ==
 
After calling this method, the new created purchase invoice is immediately stored with a new number and the invoice date.


== Code example ==
== Code example ==
The following code example creates a new purchase invoice, sets a relation, invoice no, invoice date and saves the purchase invoice.


<source lang="vb">
<source lang="vb">
dim objPI


  set objPI = Pdc.logistics.PurchaseInvoices.New
  if objPI.SetRelationNo("00224") then
    objPI.InvoiceNo = "12345"
    objPI.InvoiceDate = Date - 2
    objPI.Save
  else
    msgbox objPI.ErrorMessages
  end if
</source>
</source>


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

Revision as of 06:59, 16 April 2014

Declaration

New as PdcPurchaseInvoiceHeader

Description

A new purchase invoice is created with this method.

Notes

After calling this method, the new created purchase invoice is immediately stored with a new number and the invoice date.

Code example

The following code example creates a new purchase invoice, sets a relation, invoice no, invoice date and saves the purchase invoice.

dim objPI

  set objPI = Pdc.logistics.PurchaseInvoices.New
  if objPI.SetRelationNo("00224") then
    objPI.InvoiceNo = "12345"
    objPI.InvoiceDate = Date - 2
    objPI.Save
  else
    msgbox objPI.ErrorMessages
  end if

Availability

Available since April 2014 (Version 4.3 onwards)