|  | 
			
				| Inserts a new Intrastat detail in the document. | 
			
				|  | 
			
				| 
						
							|  | void InsertItrDetail ( SHORT sIndex,
 DOUBLE dAmountDocC,
 DOUBLE dMass,
 DOUBLE dSupplUnits,
 enum eStatProc eStatProc,
 enum eNatTrans eNatTrans,
 enum eRegion eRegion,
 enum eTransport eTransport,
 enum eDelivCond eDelivCond,
 BSTR bsCommodityCode,
 BSTR bsCountry,
 BSTR bsCountryOrigin
 )
 |  | 
			
				|  | 
			
				| 
						| Parameters |  | sIndex |  | [in] The index of the Intrastat detail, starting from 0. |  | dAmountDocC |  | [in] The amount (in document currency) of the Intrastat detail. |  | dMass |  | [in] The mass of the Intrastat detail. |  | dSupplUnits |  | [in] The supplementary units of the Intrastat detail. |  | eStatProc |  | [in] A value of the 'eStatProc' enumeration. |  | eNatTrans |  | [in] A value of the 'eNatTrans' enumeration. |  | eRegion |  | [in] A value of the 'eRegion' enumeration. |  | eTransport |  | [in] A value of the 'eTransport' enumeration. |  | eDelivCond |  | [in] A value of the 'eDelivCond' enumeration. |  | bsCommodityCode |  | [in] The unformatted commodity code of the Intrastat detail. |  | bsCountry |  | [in] The country code of the partner of the Intrastat detail. |  | bsCountryOrigin |  | [in] The country code of origin of the Intrastat detail. |  |  |  | Remarks |  | 
		
	|  | The parameter sIndex can have the value -1. In this case the new Intrastat detail is inserted after the existing Intrastat details. |  |  | If sIndex refers to an existing index, the new Intrastat detail is inserted at this index and all following Intrastat details are moved to the next index. |  |  | Any calls to InsertItrDetails are ignored if there is no IC relation. |  |  
							|  |  
							| See Also |  
							|  |  | 
			|  | 
			| Samples | 
			|  | 
			
				| 
						
							|  | C++ |  
							|  | // Insert an Intrastat detail for the complete amount of the current document if Intrastat details are not yet available
 pPurch->PrepareDocument (paUpdate);
 
 if (pPurch->IsIcRelation () && !pPurch->GetNumItrDetails ())
 {
 pPurch->InsertItrDetail (0, -pPurch->pTotalDocC.dblVal, 1.0, 1.0, spArrival, ntrFree_Free, reFlanders, trAir, dcFCA, "85203219", "FR", "");
 
 pPurch->WriteDocument (rmFullReport);
 }
 else
 pPurch->CancelDocument ();
 
 
 |  | 
			
				| 
						
							|  | C# |  
							|  | // Insert an Intrastat detail for the complete amount of the current document if Intrastat details are not yet available
 oPurch.PrepareDocument (ePrepareAction.paUpdate);
 
 if (oPurch.IsIcRelation () && oPurch.GetNumItrDetails () == 0)
 {
 oPurch.InsertItrDetail (0, -(double)oPurch.pTotalDocC, 1.0, 1.0, eStatProc.spArrival, eNatTrans.ntrFree_Free, eRegion.reFlanders, eTransport.trAir, eDelivCond.dcFCA, "85203219", "FR", "");
 
 oPurch.WriteDocument (eReportMode.rmFullReport);
 }
 else
 oPurch.CancelDocument ();
 
 
 |  | 
			
				| 
						
							|  | VBS |  
							|  | ' Insert an Intrastat detail for the complete amount of the current document if Intrastat details are not yet available
 Call oPurch.PrepareDocument(paUpdate)
 
 If oPurch.IsIcRelation() And oPurch.GetNumItrDetails() = 0 Then
 Call oPurch.InsertItrDetail(0, -oPurch.pTotalDocC, 1.0, 1.0, spArrival, ntrFree_Free, reFlanders, trAir, dcFCA, "85203219", "FR", "")
 
 Call oPurch.WriteDocument(rmFullReport)
 Else
 Call oPurch.CancelDocument()
 End If
 
 
 |  | 
			
				| 
						
							|  | VB.NET |  
							|  | ' Insert an Intrastat detail for the complete amount of the current document if Intrastat details are not yet available
 oPurch.PrepareDocument(ePrepareAction.paUpdate)
 
 If oPurch.IsIcRelation() And oPurch.GetNumItrDetails() = 0 Then
 oPurch.InsertItrDetail(0, -oPurch.pTotalDocC, 1.0, 1.0, eStatProc.spArrival, eNatTrans.ntrFree_Free, eRegion.reFlanders, eTransport.trAir, eDelivCond.dcFCA, "85203219", "FR", "")
 
 oPurch.WriteDocument(eReportMode.rmFullReport)
 Else
 oPurch.CancelDocument()
 End If
 
 
 |  |