Venice
Purch::GetItrDetail
 
Gets an Intrastat detail from the document.
 
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
CreatePurch
Handling accounting 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;

pPurch->PrepareDocument (paView);

sNumItrDets = pPurch->GetNumItrDetails ();

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

pPurch->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;

oPurch.PrepareDocument (ePrepareAction.paView);

sNumItrDets = oPurch.GetNumItrDetails ();

for (short sItrDet = 0; sItrDet < sNumItrDets; sItrDet++)
{
    if (oPurch.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
    }
}

oPurch.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 oPurch.PrepareDocument(paView)

sNumItrDets = oPurch.GetNumItrDetails()

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

Call oPurch.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

oPurch.PrepareDocument(ePrepareAction.paView)

sNumItrDets = oPurch.GetNumItrDetails()

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

oPurch.CancelDocument()