Venice
SInvce::GetItrDetail
 
Gets an Intrastat detail from the invoice.
 
VARIANT_BOOL GetItrDetail (
    SHORT sIndex,
    VARIANT* pvAmountDocC,
    VARIANT* pvMass,
    VARIANT* pvSupplUnits,
    VARIANT* pvStatProc,
    VARIANT* pvNatTrans,
    VARIANT* pvRegion,
    VARIANT* pvTransport,
    VARIANT* pvDelivCond,
    VARIANT* pvCommodityCode,
    VARIANT* pvCountry,
    VARIANT* pvCountryOrigin
)
 
Parameters
sIndex
[in] The index of the Intrastat detail, starting from 0.
pvAmountDocC
[out] Returns a VARIANT, subtype DOUBLE, containing the amount (in document currency) of the Intrastat detail.
pvMass
[out] Returns a VARIANT, subtype DOUBLE, containing the mass of the Intrastat detail.
pvSupplUnits
[out] Returns a VARIANT, subtype DOUBLE, containing the supplementary units of the Intrastat detail.
pvStatProc
[out] Returns a VARIANT, subtype BYTE (unsigned char), containing the statistical procedure (eStatProc-enumeration value) of the Intrastat detail.
pvNatTrans
[out] Returns a VARIANT, subtype BYTE (unsigned char), containing the transaction code (eNatTrans-enumeration value) of the Intrastat detail.
pvRegion
[out] Returns a VARIANT, subtype BYTE (unsigned char), containing the region code (eRegion-enumeration value) of the Intrastat detail.
pvTransport
[out] Returns a VARIANT, subtype BYTE (unsigned char), containing the transport code (eTransport-enumeration value) of the Intrastat detail.
pvDelivCond
[out] Returns a VARIANT, subtype BYTE (unsigned char), containing the delivery condition (eDelivCond-enumeration value) of the Intrastat detail.
pvCommodityCode
[out] Returns a VARIANT, subtype BSTR, containing the unformatted commodity code of the Intrastat detail.
pvCountry
[out] Returns a VARIANT, subtype BSTR, containing the country code of the partner of the Intrastat detail.
pvCountryOrigin
[out] Returns a VARIANT, subtype BSTR, containing the country code of origin of the Intrastat detail.
 
Return value
True if the Intrastat detail with the given index exists, otherwise false.
 
See Also
CreateSInvce
Handling invoicing documents using the SDK
PrepareDocument
GetNumItrDetails
CancelDocument
 
Samples
 
C++
 
// Retrieve all Intrastat detail data of the current document
VARIANT vAmountDocC, vMass, vSupplUnits, vStatProc, vNatTrans, vRegion, vTransport, vDelivCond, vCommodityCode, vCountry, vCountryOrigin;
short    sNumItrDets;
eRegion eCurRegion;

pSInvce->PrepareDocument (paView);

sNumItrDets = pSInvce->GetNumItrDetails ();

for (short sItrDet = 0; sItrDet < sNumItrDets; sItrDet++)
{
    if (pSInvce->GetItrDetail (sItrDet, &vAmountDocC, &vMass, &vSupplUnits, &vStatProc, &vNatTrans, &vRegion, &vTransport, &vDelivCond, &vCommodityCode, &vCountry, &vCountryOrigin))
    {
        eCurRegion = (eRegion)vRegion.bVal;
        
        // Process other data
    }
}

pSInvce->CancelDocument ();

C#
 
// Retrieve all Intrastat detail data of the current document
object oAmountDocC, oMass, oSupplUnits, oStatProc, oNatTrans, oRegion, oTransport, oDelivCond, oCommodityCode, oCountry, oCountryOrigin;
short sNumItrDets;
eRegion eCurRegion;

oSInvce.PrepareDocument (ePrepareAction.paView);

sNumItrDets = oSInvce.GetNumItrDetails ();

for (short sItrDet = 0; sItrDet < sNumItrDets; sItrDet++)
{
    if (oSInvce.GetItrDetail (sItrDet, out oAmountDocC, out oMass, out oSupplUnits, out oStatProc, out oNatTrans, out oRegion, out oTransport, out oDelivCond, out oCommodityCode, out oCountry, out oCountryOrigin))
    {
        eCurRegion = (eRegion)((byte)oRegion);
        
        // Process other data
    }
}

oSInvce.CancelDocument ();

VBS
 
' Retrieve all Intrastat detail data of the current document
Dim oAmountDocC, oMass, oSupplUnits, oStatProc, oNatTrans, oRegion, oTransport, oDelivCond, oCommodityCode, oCountry, oCountryOrigin
Dim sItrDet, sNumItrDets

Call oSInvce.PrepareDocument(paView)

sNumItrDets = oSInvce.GetNumItrDetails()

For sItrDet = 0 To sNumItrDets -1
    If oSInvce.GetItrDetail(sItrDet, oAmountDocC, oMass, oSupplUnits, oStatProc, oNatTrans, oRegion, oTransport, oDelivCond, oCommodityCode, oCountry, oCountryOrigin) Then
        ' Process data
    End If    
Next

Call oSInvce.CancelDocument()

VB.NET
 
' Retrieve all Intrastat detail data of the current document
Dim oAmountDocC, oMass, oSupplUnits, oStatProc, oNatTrans, oRegion, oTransport, oDelivCond, oCommodityCode, oCountry As Object, oCountryOrigin As Object
Dim sNumItrDets As Short

oSInvce.PrepareDocument(ePrepareAction.paView)

sNumItrDets = oSInvce.GetNumItrDetails()

For sItrDet As Short = 0 To sNumItrDets - 1
    If oSInvce.GetItrDetail(sItrDet, oAmountDocC, oMass, oSupplUnits, oStatProc, oNatTrans, oRegion, oTransport, oDelivCond, oCommodityCode, oCountry, oCountryOrigin) Then
        ' Process data
    End If    
Next

oSInvce.CancelDocument()