SDeliv::UpdateDetailSel (Interface: SDeliv)
 
Updates a detail in the sales delivery (with selectively given values).
 
void UpdateDetailSel (
    SHORT sIndex,
    VARIANT vQuantity,
    VARIANT vPriceDocC,
    VARIANT vPurchaseValueDocC,
    VARIANT vExciseDocC,
    VARIANT vEmptiesDocC,
    VARIANT vDiscount1,
    VARIANT vDiscount2,
    VARIANT vValue1,
    VARIANT vArtNum,
    VARIANT vArtDsc,
    VARIANT vParcelCode,
    VARIANT vFollowUp,
    VARIANT vRemark,
    VARIANT vText1,
    VARIANT vAnaCentre,
    VARIANT vAnaUnit,
    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
vParcelCode
[in] A VARIANT stating the parcel 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
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
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 start date of the detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Use the programmatorical default (= blank)
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 Use the programmatorical default (= blank)
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
CreateSDeliv
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;

pSDeliv->PrepareDocument (paUpdate);

pSDeliv->UpdateDetailSel (0, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, "Updated via SDK", vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty);

pSDeliv->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
oSDeliv.PrepareDocument (ePrepareAction.paUpdate);

oSDeliv.UpdateDetailSel (0, null, null, null, null, null, null, null, null, null, null, null, null, "Updated via SDK", null, null, null, null, null, null, null, null);

oSDeliv.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 oSDeliv.PrepareDocument(paUpdate)

Call oSDeliv.UpdateDetailSel(0, Empty, Empty, Empty, Empty, Empty, Empty, Empty, Empty, Empty, Empty, Empty, Empty, "Updated via SDK", Empty, Empty, Empty, Empty, Empty, Empty, Empty, Empty)

Call oSDeliv.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
oSDeliv.PrepareDocument(ePrepareAction.paUpdate)

oSDeliv.UpdateDetailSel(0, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, "Updated via SDK", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing)

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