SInvce::GetDetail2 (Interface: SInvce)
 
Gets an extended detail from the invoice.
 
VARIANT_BOOL GetDetail2 (
    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* pvDate1,
    VARIANT* pvDate2,
    VARIANT* pvTickYear,
    VARIANT* pvTickDocType,
    VARIANT* pvVatCode,
    VARIANT* pvIcCode,
    VARIANT* pvPrintLine,
    VARIANT* pvCutOffStart,
    VARIANT* pvCutOffEnd
)
 
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.
pvDate1
[out] Returns a VARIANT, subtype DATE, containing the first free date of the detail.
pvDate2
[out] Returns a VARIANT, subtype DATE, containing the second free 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.
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.
 
Return value
True if the detail with the given index exists, otherwise false.
 
See Also
CreateSInvce
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, vDate1, vDate2, vTickYear, vTickDocType, vVatCode, vIcCode, vPrintLine, vCutOffStart, vCutOffEnd;
short sNumDetails;

pSInvce->PrepareDocument (paView);

sNumDetails = pSInvce->GetNumDetails ();

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

pSInvce->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, oDate1, oDate2, oTickYear, oTickDocType, oVatCode, oIcCode, oPrintLine, oCutOffStart, oCutOffEnd;
short sNumDetails;

oSInvce.PrepareDocument (ePrepareAction.paView);

sNumDetails = oSInvce.GetNumDetails ();

for (short sDetail = 0; sDetail < sNumDetails; sDetail++)
{
    if (oSInvce.GetDetail2 (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 oDate1, out oDate2, out oTickYear, out oTickDocType, out oVatCode, out oIcCode, out oPrintLine, out oCutOffStart, out oCutOffEnd))
    {
        // Process data
    }
}

oSInvce.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, oDate1, oDate2, oTickYear, oTickDocType, oVatCode, oIcCode, oPrintLine, oCutOffStart, oCutOffEnd
Dim sDetail, sNumDetails

Call oSInvce.PrepareDocument(paView)

sNumDetails = oSInvce.GetNumDetails()

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

Call oSInvce.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, oDate1, oDate2, oTickYear, oTickDocType, oVatCode, oIcCode, oPrintLine, oCutOffStart, oCutOffEnd As Object
Dim sNumDetails As Short

oSInvce.PrepareDocument(ePrepareAction.paView)

sNumDetails = oSInvce.GetNumDetails()

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

Call oSInvce.CancelDocument()