|
Selectively updates values of an accounting detail in the document. |
|
|
void UpdateDetailSel ( SHORT sIndex, VARIANT vAmountDocC, VARIANT vQuantity, VARIANT vValue1, VARIANT vAccount, VARIANT vRemark, VARIANT vText1, VARIANT vAmountDetC, VARIANT vDetC, VARIANT vTickSysNum ) |
|
|
Parameters | sIndex | [in] The index of the detail, starting from 0. | vAmountDocC | [in] A VARIANT stating the 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 |
| 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 |
| 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 |
| vAccount | [in] A VARIANT stating the account 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 |
| 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) |
|
BSTR (VT_BSTR) |
|
Use the given value |
| vAmountDetC | [in] A VARIANT stating the amount (in detail 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 |
| vDetC | [in] A VARIANT stating the 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) |
|
BSTR (VT_BSTR) |
|
Use the given value |
| vTickSysNum | [in] A VARIANT stating the system number of the detail that is ticked by this line (0 if nothing is ticked). The type of this VARIANT determines the action to be taken by the SDK:
|
Subtype |
|
Action |
|
VT_EMPTY |
|
Keep the existing value (on disk) |
|
LONG (VT_I4) |
|
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. |
| If an analytical entry proposal exists for the provided account (parameter bsAccount), the detail is automatically distributed according to this proposal. |
| 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 |
|
|
|
Samples |
|
|
C++ |
|
// Update the remark of the first manual detail of the current document to 'Updated via SDK'
short sManualIndex;
pSndry->PrepareDocument (paUpdate);
sManualIndex = pSndry->GetManualIndex ();
if (sManualIndex != -1)
{
VARIANT vEmpty;
vEmpty.vt = VT_EMPTY;
pSndry->UpdateDetailSel (sManualIndex, vEmpty, vEmpty, vEmpty, vEmpty, "Updated via SDK", vEmpty, vEmpty, vEmpty, vEmpty);
}
pSndry->WriteDocument (rmFullReport);
|
|
|
C# |
|
// Update the remark of the first manual detail of the current document to 'Updated via SDK'
short sManualIndex;
oSndry.PrepareDocument (ePrepareAction.paUpdate);
sManualIndex = oSndry.GetManualIndex ();
if (sManualIndex != -1)
oSndry.UpdateDetailSel (sManualIndex, null, null, null, null, "Updated via SDK", null, null, null, null);
oSndry.WriteDocument (eReportMode.rmFullReport);
|
|
|
VBS |
|
' Update the remark of the first manual detail of the current document to 'Updated via SDK'
Dim sManualIndex
Call oSndry.PrepareDocument(paUpdate)
sManualIndex = oSndry.GetManualIndex()
If sManualIndex <> -1 Then
Call oSndry.UpdateDetailSel(sManualIndex, Empty, Empty, Empty, Empty, "Updated via SDK", Empty, Empty, Empty, Empty)
End If
Call oSndry.WriteDocument(rmFullReport)
|
|
|
VB.NET |
|
' Update the remark of the first manual detail of the current document to 'Updated via SDK'
Dim sManualIndex As Short
oSndry.PrepareDocument(ePrepareAction.paUpdate)
sManualIndex = oSndry.GetManualIndex()
If sManualIndex <> -1 Then
oSndry.UpdateDetailSel(sManualIndex, Nothing, Nothing, Nothing, Nothing, "Updated via SDK", Nothing, Nothing, Nothing, Nothing)
End If
oSndry.WriteDocument(eReportMode.rmFullReport)
|
|