Venice
SInvce::InsertInvProp
 
Inserts an invoicing proposal in the invoice.
 
SHORT InsertInvProp (
    VARIANT vCode
)
 
Parameters
vCode
[in] A VARIANT stating the code of the invoicing proposal you want to insert. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY If an invoicing proposal code is found in the customer card, this value is used.
If no proposal code is found in the customer card, the invoicing proposal for a blank code is used if it exists, otherwise no details are added.
BSTR (VT_BSTR) The given value is used if it exists, otherwise an exception is thrown.
 
Return value
A SHORT containing the index where the invoicing proposal details are added if an invoicing proposal was found, otherwise -1.
 
Remarks
The details of the invoicing proposal are added after the existing details.
 
See Also
CreateSInvce
Handling invoicing documents using the SDK
PrepareDocument
GetNumDetails
WriteDocument
 
Samples
 
C++
 
// Insert an invoicing proposal with code 'PRP01' in the sales document.
pSInvce->PrepareDocument (paInsert);

// Fill the necessary header data

short sIndex = pSInvce->InsertInvProp ("PRP01");

if (sIndex != -1)
{
    for (short sNew = pSInvce->GetNumDetails (); sNew > sIndex; sNew--)
    {
        // Add necessary data to the details of the proposal
    }
}

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

C#
 
// Insert an invoicing proposal with code 'PRP01' in the sales document.
oSInvce.PrepareDocument (ePrepareAction.paInsert);

// Fill the necessary header data

short sIndex = oSInvce.InsertInvProp ("PRP01");

if (sIndex != -1)
{
    for (short sNew = oSInvce.GetNumDetails (); sNew > sIndex; sNew--)
    {
        // Add necessary data to the details of the proposal
    }
}

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

VBS
 
' Insert an invoicing proposal with code 'PRP01' in the sales document.
Dim sIndex, sNew

Call oSInvce.PrepareDocument(paInsert)

' Fill the necessary header data

sIndex = oSInvce.InsertInvProp("PRP01")

If sIndex <> -1 Then
    For sNew = oSInvce.GetNumDetails() To sIndex
        ' Add necessary data to the details of the proposal
    Next
End If

Call oSInvce.WriteDocument(rmFullReport, False, False)

VB.NET
 
' Insert an invoicing proposal with code 'PRP01' in the sales document.
Dim sIndex, sNew As Short

oSInvce.PrepareDocument(ePrepareAction.paInsert)

' Fill the necessary header data

sIndex = oSInvce.InsertInvProp("PRP01")

If sIndex <> -1 Then
    For sNew = oSInvce.GetNumDetails() To sIndex
        ' Add necessary data to the details of the proposal
    Next
End If

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