|   | 
			
			
				| Deletes an analytical detail of one accounting detail and analytical type. | 
			
			
				|   | 
			
			
				
					
						
							  | 
							void DeleteAnaDetail (     SHORT sAccIndex,     SHORT sAnaIndex,     enum eAnaEntType eAnaEntType ) | 
						 
					 
				 | 
			
			
				|   | 
			
			
				
					
						| Parameters |  | sAccIndex |  | [in] The index of the detail line where the analytical detail line belongs to, starting from 0. |  | sAnaIndex |  | [in] The index of the analytical detail line, starting from 0. |  | eAnaEntType |  | [in] A value of the 'eAnaEntType' enumeration. |  |   |  | Remarks |  
	
		
	  | If the parameter sIndex is an invalid index (refers to a not existing analytical detail) an exception is thrown. You can use GetAnaDetail to check whether an index is valid, in which case it returns true. |  
	  |  
						
							|   | 
						 
						
							| See Also | 
						 
						
							| 
								
							 | 
						 
					 
				 | 
			
			|   | 
			| Samples | 
			|   | 
			
				
					
						
							  | 
							C++ | 
						 
						
							|   | 
							
 // Remove all the analytical centre details of the first manual detail of the current document
 short sManualIndex;
 bool bWrite = false;
 
 pSales->PrepareDocument (paUpdate);
 
 sManualIndex = pSales->GetManualIndex ();
 
 if (sManualIndex != -1)
 {
     short sNumAnaDets = pSales->GetNumAnaDetails (sManualIndex, aetCent);
     
     if (sNumAnaDets != 0)
     {
         for (short sAnaDet = sNumAnaDets - 1; sAnaDet >= 0; sAnaDet--)
         {
             pSales->DeleteAnaDetail (sManualIndex, sAnaDet, aetCent);
         }
         
         bWrite = true;
     }
 }
     
 if (bWrite)
     pSales->WriteDocument (rmFullReport);
 else    
     pSales->CancelDocument ();
 
  | 
						 
					 
				 | 
			
			
				
					
						
							  | 
							C# | 
						 
						
							|   | 
							
 // Remove all the analytical centre details of the first manual detail of the current document
 short sManualIndex;
 bool bWrite = false;
 
 oSales.PrepareDocument (ePrepareAction.paUpdate);
 
 sManualIndex = oSales.GetManualIndex ();
 
 if (sManualIndex != -1)
 {
     short sNumAnaDets = oSales.GetNumAnaDetails (sManualIndex, eAnaEntType.aetCent);
     
     if (sNumAnaDets != 0)
     {
         for (short sAnaDet = (short)(sNumAnaDets - 1); sAnaDet >= 0; sAnaDet--)
         {
             oSales.DeleteAnaDetail (sManualIndex, sAnaDet, eAnaEntType.aetCent);
         }
         
         bWrite = true;
     }
 }
 
 if (bWrite)
     oSales.WriteDocument (eReportMode.rmFullReport);
 else    
     oSales.CancelDocument ();
 
  | 
						 
					 
				 | 
			
			
				
					
						
							  | 
							VBS | 
						 
						
							|   | 
							
 ' Remove all the analytical centre details of the first manual detail of the current document
 Dim sManualIndex
 Dim bWrite
 
 Call oSales.PrepareDocument(paUpdate)
 
 sManualIndex = oSales.GetManualIndex()
 bWrite = False
 
 If sManualIndex <> -1 Then
     Dim sNumAnaDets, sAnaDet
     
     sNumAnaDets = oSales.GetNumAnaDetails(sManualIndex, aetCent)
     
     If sNumAnaDets <> 0 Then
         For sAnaDet = sNumAnaDets - 1 To 0 Step -1
             Call oSales.DeleteAnaDetail(sManualIndex, sAnaDet, aetCent)
         Next
         
         bWrite = True
     End If
 End If
 
 If bWrite Then
     Call oSales.WriteDocument(rmFullReport)
 Else
     Call oSales.CancelDocument()
 End If
 
  | 
						 
					 
				 | 
			
			
				
					
						
							  | 
							VB.NET | 
						 
						
							|   | 
							
 ' Remove all the analytical centre details of the first manual detail of the current document
 Dim sManualIndex As Short
 Dim bWrite As Boolean
 
 oSales.PrepareDocument(ePrepareAction.paUpdate)
 
 sManualIndex = oSales.GetManualIndex()
 bWrite = True
 
 If sManualIndex <> -1 Then
     Dim sNumAnaDets As Short
     
     sNumAnaDets = oSales.GetNumAnaDetails(sManualIndex, eAnaEntType.aetCent)
     
     If sNumAnaDets <> 0 Then
         For sAnaDet As Short = sNumAnaDets - 1 To 0 Step -1
             oSales.DeleteAnaDetail(sManualIndex, sAnaDet, eAnaEntType.aetCent)
         Next
     End If
 End If
 
 If bWrite Then
     oSales.WriteDocument(eReportMode.rmFullReport)
 Else
     oSales.CancelDocument()
 End If
 
  | 
						 
					 
				 |