Purch::PrepareDocument (Interface: Purch)
 
Prepares the object for handling a document and its details.
 
void PrepareDocument (
    enum ePrepareAction ePrepareAction
)
 
Parameters
ePrepareAction
[in] A value of the 'ePrepareAction' enumeration.
 
See Also
CreatePurch
Handling accounting documents using the SDK
WriteDocument
CancelDocument
 
Samples
 
C++
 
// Change the book date of the current document to 17/09/2021
pPurch->PrepareDocument (paUpdate);

pPurch->pBookDate = COleDateTime (2021, 9, 17, 0, 0, 0).m_dt;

pPurch->WriteDocument (rmFullReport);

C#
 
// Change the book date of the current document to 17/09/2021
oPurch.PrepareDocument (ePrepareAction.paUpdate);

oPurch.pBookDate = new DateTime (2021, 9, 17);

oPurch.WriteDocument (eReportMode.rmFullReport);

VBS
 
' Change the book date of the current document to 17/09/2021
Call oPurch.PrepareDocument(paUpdate)

oPurch.pBookDate = #9/17/2021#

Call oPurch.WriteDocument(rmFullReport)

VB.NET
 
' Change the book date of the current document to 17/09/2021
oPurch.PrepareDocument(ePrepareAction.paUpdate)

oPurch.pBookDate = #9/17/2021#

oPurch.WriteDocument (eReportMode.rmFullReport)