Sales::PrepareDocument (Interface: Sales)
 
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
CreateSales
Handling accounting documents using the SDK
WriteDocument
CancelDocument
 
Samples
 
C++
 
// Change the book date of the current document to 17/09/2023
pSales->PrepareDocument (paUpdate);

pSales->pBookDate = COleDateTime (2023, 9, 17, 0, 0, 0).m_dt;

pSales->WriteDocument (rmFullReport);

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

oSales.pBookDate = new DateTime (2023, 9, 17);

oSales.WriteDocument (eReportMode.rmFullReport);

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

oSales.pBookDate = #9/17/2023#

Call oSales.WriteDocument(rmFullReport)

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

oSales.pBookDate = #9/17/2023#

oSales.WriteDocument (eReportMode.rmFullReport)