Venice
SInvce::UpdateDetailSel2
 
Updates an extended detail in the invoice (with selectively given values).
 
void UpdateDetailSel2 (
    SHORT sIndex,
    VARIANT vQuantity,
    VARIANT vPriceDocC,
    VARIANT vPurchaseValueDocC,
    VARIANT vExciseDocC,
    VARIANT vEmptiesDocC,
    VARIANT vDiscount1,
    VARIANT vDiscount2,
    VARIANT vValue1,
    VARIANT vArtNum,
    VARIANT vArtDsc,
    VARIANT vFollowUp,
    VARIANT vRemark,
    VARIANT vText1,
    VARIANT vAnaCentre,
    VARIANT vAnaUnit,
    VARIANT vDate1,
    VARIANT vDate2,
    VARIANT vVatCode,
    VARIANT vIcCode,
    VARIANT vPrintLine,
    VARIANT vCutOffStart,
    VARIANT vCutOffEnd
)
 
Parameters
sIndex
[in] The index of the detail, starting from 0.
vQuantity
[in] A VARIANT stating the quantity of the detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
DOUBLE (VT_R8) Use the given value
vPriceDocC
[in] A VARIANT stating the unit price (in document currency) of the article that is mentioned in the detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
DOUBLE (VT_R8) Use the given value
vPurchaseValueDocC
[in] A VARIANT stating the purchase value (in document currency) of the article that is mentioned in the detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
DOUBLE (VT_R8) Use the given value
vExciseDocC
[in] A VARIANT stating the excise amount (in document currency) of the detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
DOUBLE (VT_R8) Use the given value
vEmptiesDocC
[in] A VARIANT stating the empties amount (in document currency) of the detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
DOUBLE (VT_R8) Use the given value
vDiscount1
[in] A VARIANT stating the first discount rate of the detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
DOUBLE (VT_R8) Use the given value
vDiscount2
[in] A VARIANT stating the second discount rate of the detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
DOUBLE (VT_R8) Use the given value
vValue1
[in] A VARIANT stating the free value of the detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
DOUBLE (VT_R8) Use the given value
vArtNum
[in] A VARIANT stating the article number of the detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
BSTR (VT_BSTR) Use the given value
vArtDsc
[in] A VARIANT stating the article description of the detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
BSTR (VT_BSTR) Use the given value
vFollowUp
[in] A VARIANT stating the follow-up code of the detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
BSTR (VT_BSTR) Use the given value
vRemark
[in] A VARIANT stating the remark of the detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
BSTR (VT_BSTR) Use the given value
vText1
[in] A VARIANT stating the free text of the detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
DOUBLE (VT_R8) Use the given value
vAnaCentre
[in] A VARIANT stating the analytical centre of the detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
BSTR (VT_BSTR) Use the given value
vAnaUnit
[in] A VARIANT stating the analytical unit of the detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
BSTR (VT_BSTR) Use the given value
vDate1
[in] A VARIANT stating the first free date of the detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
DATE (VT_DATE) Use the given value
vDate2
[in] A VARIANT stating the second free date of the detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
DATE (VT_DATE) Use the given value
vVatCode
[in] A VARIANT stating the VAT code of the detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
Numerical value (variant type VT_UI1, VT_INT, VT_I2 or VT_I4) Use the given value
vIcCode
[in] A VARIANT stating the IC code of the detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
Numerical value (variant type VT_UI1, VT_INT, VT_I2 or VT_I4) Use the given value
vPrintLine
[in] A VARIANT indicating if the detail can be printed. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
VARIANT_BOOL (VT_BOOL) Use the given value
vCutOffStart
[in] A VARIANT stating the cut off starting date of the detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
DATE (VT_DATE) Use the given value
vCutOffEnd
[in] A VARIANT stating the cut off end date of the detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
DATE (VT_DATE) Use the given value
 
Remarks
If the parameter sIndex is an invalid index (refers to a not existing detail) an exception is thrown. You can use GetDetail to check whether an index is valid, in which case it returns true.
How to pass a VARIANT of type VT_EMPTY?
C++
Define a VARIANT and set the type to VT_EMPTY (vEmpty.vt = VT_EMPTY).
Pass this VARIANT.
C#
Pass 'null'.
VBS
Pass 'Empty'.
VB.NET
Pass 'Nothing'.
 
See Also
CreateSInvce
Handling invoicing documents using the SDK
PrepareDocument
WriteDocument
 
Samples
 
C++
 
// Update the remark of the first detail of the current document to 'Updated via SDK', leaving all other data unchanged
VARIANT vEmpty;
vEmpty.vt = VT_EMPTY;

pSInvce->PrepareDocument (paUpdate);

pSInvce->UpdateDetailSel2 (0, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, "Updated via SDK", vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty);

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

C#
 
// Update the remark of the first detail of the current document to 'Updated via SDK', leaving all other data unchanged
oSInvce.PrepareDocument (ePrepareAction.paUpdate);

oSInvce.UpdateDetailSel2 (0, null, null, null, null, null, null, null, null, null, null, null, "Updated via SDK", null, null, null, null, null, null, null, null, null, null);

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

VBS
 
' Update the remark of the first detail of the current document to 'Updated via SDK', leaving all other data unchanged
Call oSInvce.PrepareDocument(paUpdate)

Call oSInvce.UpdateDetailSel2(0, Empty, Empty, Empty, Empty, Empty, Empty, Empty, Empty, Empty, Empty, Empty, "Updated via SDK", Empty, Empty, Empty, Empty, Empty, Empty, Empty, Empty, Empty, Empty)

Call oSInvce.WriteDocument(rmFullReport, False, False)

VB.NET
 
' Update the remark of the first detail of the current document to 'Updated via SDK', leaving all other data unchanged
oSInvce.PrepareDocument(ePrepareAction.paUpdate)

oSInvce.UpdateDetailSel2(0, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, "Updated via SDK", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing)

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