Venice
SOrder::GetDetail
 
Gets a detail from the order.
 
VARIANT_BOOL GetDetail (
    SHORT sIndex,
    VARIANT* pvQuantity,
    VARIANT* pvPriceDocC,
    VARIANT* pvPurchaseValueDocC,
    VARIANT* pvExciseDocC,
    VARIANT* pvEmptiesDocC,
    VARIANT* pvDiscount1,
    VARIANT* pvDiscount2,
    VARIANT* pvValue1,
    VARIANT* pvTickSysNum,
    VARIANT* pvArtNum,
    VARIANT* pvArtDsc,
    VARIANT* pvFollowUp,
    VARIANT* pvRemark,
    VARIANT* pvText1,
    VARIANT* pvAnaCentre,
    VARIANT* pvAnaUnit,
    VARIANT* pvCutOffStart,
    VARIANT* pvCutOffEnd,
    VARIANT* pvTickYear,
    VARIANT* pvTickDocType,
    VARIANT* pvVatCode,
    VARIANT* pvIcCode,
    VARIANT* pvPrintLine,
    VARIANT* pvStockReservat,
    VARIANT* pvTrnDetail
)
 
Parameters
sIndex
[in] The index of the detail, starting from 0.
pvQuantity
[out] Returns a VARIANT, subtype DOUBLE, containing the quantity of the detail.
pvPriceDocC
[out] Returns a VARIANT, subtype DOUBLE, containing the price (in document currency) of the article that is mentioned in the detail.
pvPurchaseValueDocC
[out] Returns a VARIANT, subtype DOUBLE, containing the purchase value (in document currency) of the article that is mentioned in the detail.
pvExciseDocC
[out] Returns a VARIANT, subtype DOUBLE, containing the excise amount (in document currency) of the detail.
pvEmptiesDocC
[out] Returns a VARIANT, subtype DOUBLE, containing the empties amount (in document currency) of the detail.
pvDiscount1
[out] Returns a VARIANT, subtype DOUBLE, containing the first discount rate of the detail.
pvDiscount2
[out] Returns a VARIANT, subtype DOUBLE, containing the second discount rate of the detail.
pvValue1
[out] Returns a VARIANT, subtype DOUBLE, containing the free value of the detail.
pvTickSysNum
[out] Returns a VARIANT, subtype LONG, containing the system number of a ticked detail line.
pvArtNum
[out] Returns a VARIANT, subtype BSTR, containing the article number of the detail.
pvArtDsc
[out] Returns a VARIANT, subtype BSTR, containing the article description of the detail.
pvFollowUp
[out] Returns a VARIANT, subtype BSTR, containing the follow-up code 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.
pvAnaCentre
[out] Returns a VARIANT, subtype BSTR, containing the analytical centre of the detail.
pvAnaUnit
[out] Returns a VARIANT, subtype BSTR, containing the analytical unit of the detail.
pvCutOffStart
[out] Returns a VARIANT, subtype DATE, containing the cut off starting date of the detail.
pvCutOffEnd
[out] Returns a VARIANT, subtype DATE, containing the cut off end date of the detail.
pvTickYear
[out] Returns a VARIANT, subtype SHORT, containing the financial year of a ticked detail line.
pvTickDocType
[out] Returns a VARIANT, subtype BYTE (unsigned char), containing the document type of a ticked detail line.
pvVatCode
[out] Returns a VARIANT, subtype BYTE (unsigned char), containing the VAT code (eVatCode-enumeration value) of the detail.
pvIcCode
[out] Returns a VARIANT, subtype BYTE (unsigned char), containing the IC code (eIcCode-enumeration value) of the detail.
pvPrintLine
[out] Returns a VARIANT, subtype VARIANT_BOOLEAN, containing the indication if the detail can be printed.
pvStockReservat
[out] Returns a VARIANT, subtype VARIANT_BOOLEAN, containing the indication if the stock of the article number of the detail must be reserved.
pvTrnDetail
[out] Returns a VARIANT, subtype VARIANT_BOOLEAN, containing the indication if the detail can be copied to another document.
 
Return value
True if the detail with the given index exists, otherwise false.
 
See Also
CreateSOrder
Handling invoicing documents using the SDK
PrepareDocument
GetNumDetails
CancelDocument
 
Samples
 
C++
 
// Retrieve all detail data of the current document
VARIANT vQuantity, vPriceDocC, vPurchaseValueDocC, vExciseDocC, vEmptiesDocC, vDiscount1, vDiscount2, vValue1, vTickSysNum, vArtNum, vArtDsc, vFollowUp, vRemark, vText1, vAnaCentre, vAnaUnit, vCutOffStart, vCutOffEnd, vTickYear, vTickDocType, vVatCode, vIcCode, vPrintLine, vStockReservat, vTrnDetail;
short sNumDetails;

pSOrder->PrepareDocument (paView);

sNumDetails = pSOrder->GetNumDetails ();

for (short sDetail = 0; sDetail < sNumDetails; sDetail++)
{
    if (pSOrder->GetDetail (sDetail, &vQuantity, &vPriceDocC, &vPurchaseValueDocC, &vExciseDocC, &vEmptiesDocC, &vDiscount1, &vDiscount2, &vValue1, &vTickSysNum, &vArtNum, &vArtDsc, &vFollowUp, &vRemark, &vText1, &vAnaCentre, &vAnaUnit, &vCutOffStart, &vCutOffEnd, &vTickYear, &vTickDocType, &vVatCode, &vIcCode, &vPrintLine, &vStockReservat, &vTrnDetail))
    {
        // Process data
    }
}

pSOrder->CancelDocument ();

C#
 
// Retrieve all detail data of the current document
object oQuantity, oPriceDocC, oPurchaseValueDocC, oExciseDocC, oEmptiesDocC, oDiscount1, oDiscount2, oValue1, oTickSysNum, oArtNum, oArtDsc, oFollowUp, oRemark, oText1, oAnaCentre, oAnaUnit, oCutOffStart, oCutOffEnd, oTickYear, oTickDocType, oVatCode, oIcCode, oPrintLine, oStockReservat, oTrnDetail;
short sNumDetails;

oSOrder.PrepareDocument (ePrepareAction.paView);

sNumDetails = oSOrder.GetNumDetails ();

for (short sDetail = 0; sDetail < sNumDetails; sDetail++)
{
    if (oSOrder.GetDetail (sDetail, out oQuantity, out oPriceDocC, out oPurchaseValueDocC, out oExciseDocC, out oEmptiesDocC, out oDiscount1, out oDiscount2, out oValue1, out oTickSysNum, out oArtNum, out oArtDsc, out oFollowUp, out oRemark, out oText1, out oAnaCentre, out oAnaUnit, out oCutOffStart, out oCutOffEnd, out oTickYear, out oTickDocType, out oVatCode, out oIcCode, out oPrintLine, out oStockReservat, out oTrnDetail))
    {
        // Process data
    }
}

oSOrder.CancelDocument ();

VBS
 
' Retrieve all detail data of the current document
Dim oQuantity, oPriceDocC, oPurchaseValueDocC, oExciseDocC, oEmptiesDocC, oDiscount1, oDiscount2, oValue1, oTickSysNum, oArtNum, oArtDsc, oFollowUp, oRemark, oText1, oAnaCentre, oAnaUnit, oCutOffStart, oCutOffEnd, oTickYear, oTickDocType, oVatCode, oIcCode, oPrintLine, oStockReservat, oTrnDetail
Dim sDetail, sNumDetails

Call oSOrder.PrepareDocument(paView)

sNumDetails = oSOrder.GetNumDetails()

For sDetail = 0 To sNumDetails - 1
    If oSOrder.GetDetail(sDetail, oQuantity, oPriceDocC, oPurchaseValueDocC, oExciseDocC, oEmptiesDocC, oDiscount1, oDiscount2, oValue1, oTickSysNum, oArtNum, oArtDsc, oFollowUp, oRemark, oText1, oAnaCentre, oAnaUnit, oCutOffStart, oCutOffEnd, oTickYear, oTickDocType, oVatCode, oIcCode, oPrintLine, oStockReservat, oTrnDetail) Then
        ' Process data
    End If
Next

Call oSOrder.CancelDocument()

VB.NET
 
' Retrieve all detail data of the current document
Dim oQuantity, oPriceDocC, oPurchaseValueDocC, oExciseDocC, oEmptiesDocC, oDiscount1, oDiscount2, oValue1, oTickSysNum, oArtNum, oArtDsc, oFollowUp, oRemark, oText1, oAnaCentre, oAnaUnit, oCutOffStart, oCutOffEnd, oTickYear, oTickDocType, oVatCode, oIcCode, oPrintLine, oStockReservat, oTrnDetail As Object
Dim sNumDetails As Short

oSOrder.PrepareDocument(ePrepareAction.paView)

sNumDetails = oSOrder.GetNumDetails()

For sDetail As Short = 0 To sNumDetails - 1
    If oSOrder.GetDetail(sDetail, oQuantity, oPriceDocC, oPurchaseValueDocC, oExciseDocC, oEmptiesDocC, oDiscount1, oDiscount2, oValue1, oTickSysNum, oArtNum, oArtDsc, oFollowUp, oRemark, oText1, oAnaCentre, oAnaUnit, oCutOffStart, oCutOffEnd, oTickYear, oTickDocType, oVatCode, oIcCode, oPrintLine, oStockReservat, oTrnDetail) Then
        ' Process data
    End If
Next

Call oSOrder.CancelDocument()