Venice
SOrder::WriteDocument
 
Inserts or updates the prepared order.
 
void WriteDocument (
    enum eReportMode eReportMode,
    VARIANT_BOOL bAddTextLines,
    VARIANT_BOOL bExpandSets
)
 
Parameters
eReportMode
[in] A value of the 'eReportMode' enumeration.
bAddTextLines
[in] True if text lines must be added automatically after the article line, otherwise false.
bExpandSets
[in] True if set articles must be expanded automatically, otherwise false.
 
Remarks
When updating or duplicating a document (ePrepareAction is set to paUpdate or paDuplicate) set articles that were already expanded (parameter bExpandSets is set to true) or text lines that were already added (parameter bAddTextLines is set to true) will be expanded or added again!
 
See Also
CreateSOrder
Handling invoicing documents using the SDK
PrepareDocument
CancelDocument
 
Samples
 
C++
 
// Change the document date of the current document to 17/09/2024
pSOrder->PrepareDocument (paUpdate);

pSOrder->pDocDate = COleDateTime (2024, 9, 17, 0, 0, 0).m_dt;

pSOrder->WriteDocument (rmFullReport, VARIANT_FALSE, VARIANT_FALSE);

C#
 
// Change the document date of the current document to 17/09/2024
oSOrder.PrepareDocument (ePrepareAction.paUpdate);

oSOrder.pDocDate = new DateTime (2024, 9, 17);

oSOrder.WriteDocument (eReportMode.rmFullReport, false, false);

VBS
 
' Change the document date of the current document to 17/09/2024
Call oSOrder.PrepareDocument(paUpdate)

oSOrder.pDocDate = #9/17/2024#

Call oSOrder.WriteDocument(rmFullReport, False, False)

VB.NET
 
' Change the document date of the current document to 17/09/2024
oSOrder.PrepareDocument(ePrepareAction.paUpdate)

oSOrder.pDocDate = #9/17/2024#

oSOrder.WriteDocument (eReportMode.rmFullReport, False, False)