Sales::GetDetail (Interface: Sales)
 
Gets an accounting detail from the document.
 
VARIANT_BOOL GetDetail (
    SHORT sIndex,
    VARIANT* pvAmountDocC,
    VARIANT* pvQuantity,
    VARIANT* pvValue1,
    VARIANT* pvAccount,
    VARIANT* pvRemark,
    VARIANT* pvText1
)
 
Parameters
sIndex
[in] The index of the detail, starting from 0.
pvAmountDocC
[out] Returns a VARIANT, subtype DOUBLE, containing the amount (in document currency) of the detail.
pvQuantity
[out] Returns a VARIANT, subtype DOUBLE, containing the quantity of the detail.
pvValue1
[out] Returns a VARIANT, subtype DOUBLE, containing the free value of the detail.
pvAccount
[out] Returns a VARIANT, subtype BSTR, containing the general account of the detail.
pvRemark
[out] Returns a VARIANT, subtype BSTR, containing the remark of the detail.
pvText1
[out] Returns a VARIANT, subtype BSTR, containing the free text of the detail.
 
Return value
True if the detail with the given index exists, otherwise false.
 
See Also
CreateSales
Handling accounting documents using the SDK
GetDetail2
PrepareDocument
GetNumDetails
CancelDocument
 
Samples
 
C++
 
// Retrieve all detail data of the current document
VARIANT vAmountDocC, vQuantity, vValue1, vAccount, vRemark, vText1;
short sNumDetails;

pSales->PrepareDocument (paView);

sNumDetails = pSales->GetNumDetails ();

for (short sDetail = 0; sDetail < sNumDetails; sDetail++)
{
    if (pSales->GetDetail (sDetail, &vAmountDocC, &vQuantity, &vValue1, &vAccount, &vRemark, &vText1))
    {
        // Process data
    }
}

pSales->CancelDocument ();

C#
 
// Retrieve all detail data of the current document
object oAmountDocC, oQuantity, oValue1, oAccount, oRemark, oText1;
short sNumDetails;

oSales.PrepareDocument (ePrepareAction.paView);

sNumDetails = oSales.GetNumDetails ();

for (short sDetail = 0; sDetail < sNumDetails; sDetail++)
{
    if (oSales.GetDetail (sDetail, out oAmountDocC, out oQuantity, out oValue1, out oAccount, out oRemark, out oText1))
    {
        // Process data
    }
}

oSales.CancelDocument ();

VBS
 
' Retrieve all detail data of the current document
Dim oAmountDocC, oQuantity, oValue1, oAccount, oRemark, oText1
Dim sDetail, sNumDetails

Call oSales.PrepareDocument(paView)

sNumDetails = oSales.GetNumDetails()

For sDetail = 0 To sNumDetails - 1
    If oSales.GetDetail(sDetail, oAmountDocC, oQuantity, oValue1, oAccount, oRemark, oText1) Then
        ' Process data
    End If
Next

Call oSales.CancelDocument()

VB.NET
 
' Retrieve all detail data of the current document
Dim oAmountDocC, oQuantity, oValue1, oAccount, oRemark, oText1 As Object
Dim sNumDetails As Short

oSales.PrepareDocument(ePrepareAction.paView)

sNumDetails = oSales.GetNumDetails()

For sDetail As Short = 0 To sNumDetails - 1
    If oSales.GetDetail(sDetail, oAmountDocC, oQuantity, oValue1, oAccount, oRemark, oText1) Then
        ' Process data
    End If
Next

Call oSales.CancelDocument()