SDeliv::InsertInvProp (Interface: SDeliv)
 
Inserts an invoicing proposal in the sales delivery.
 
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.
 
See Also
CreateSDeliv
Handling invoicing documents using the SDK
PrepareDocument
GetNumDetails
WriteDocument
 
Samples
 
C++
 
// Insert an invoicing proposal with code 'PRP01' in the sales document.
pSDeliv->PrepareDocument (paInsert);

// Fill the necessary header data

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

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

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

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

// Fill the necessary header data

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

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

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

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

Call oSDeliv.PrepareDocument(paInsert)

' Fill the necessary header data

sIndex = oSDeliv.InsertInvProp("PRP01")

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

Call oSDeliv.WriteDocument(rmFullReport, False, False)

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

oSDeliv.PrepareDocument(ePrepareAction.paInsert)

' Fill the necessary header data

sIndex = oSDeliv.InsertInvProp("PRP01")

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

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