Venice
Purch::GetNumAnaDetails
 
Gets the number of analytical details for one accounting detail and analytical type.
 
SHORT GetNumAnaDetails (
    SHORT sAccIndex,
    enum eAnaEntType eAnaEntType
)
 
Parameters
sAccIndex
[in] The index of the detail line where the analytical detail line belongs to, starting from 0.
eAnaEntType
[in] A value of the 'eAnaEntType' enumeration.
 
Return value
A SHORT containing the number of analytical details of the current document.
 
Remarks
If the analytical option is not active in the dossier, this method returns 0.
 
See Also
CreatePurch
Handling accounting documents using the SDK
PrepareDocument
GetManualIndex
CancelDocument
 
Samples
 
C++
 
// Get the number of analytical details by centre of the first manual detail of the current document
short sManualIndex;

pPurch->PrepareDocument (paView);

sManualIndex = pPurch->GetManualIndex ();

if (sManualIndex != -1)
{
    short sNumAnaDets = pPurch->GetNumAnaDetails (sManualIndex, aetCent);
    
    if (sNumAnaDets != 0)
    {
        // Process data
    }
}

pPurch->CancelDocument ();

C#
 
// Get the number of analytical details by centre of the first manual detail of the current document
short sManualIndex;

oPurch.PrepareDocument (ePrepareAction.paView);

sManualIndex = oPurch.GetManualIndex ();

if (sManualIndex != -1)
{
    short sNumAnaDets = oPurch.GetNumAnaDetails (sManualIndex, eAnaEntType.aetCent);
    
    if (sNumAnaDets != 0)
    {
        // Process data
    }
}

oPurch.CancelDocument ();

VBS
 
' Get the number of analytical details by centre of the first manual detail of the current document
Dim sManualIndex

Call oPurch.PrepareDocument(paView)

sManualIndex = oPurch.GetManualIndex()

If sManualIndex <> -1 Then
    Dim sNumAnaDets
    
    sNumAnaDets = oPurch.GetNumAnaDetails(sManualIndex, aetCent)
    
    If sNumAnaDets <> 0 Then
        ' Process data
    End If
End If

Call oPurch.CancelDocument()

VB.NET
 
' Get the number of analytical details by centre of the first manual detail of the current document
Dim sManualIndex As Short

oPurch.PrepareDocument(ePrepareAction.paView)

sManualIndex = oPurch.GetManualIndex()

If sManualIndex <> -1 Then
    Dim sNumAnaDets As Short
    
    sNumAnaDets = oPurch.GetNumAnaDetails(sManualIndex, eAnaEntType.aetCent)
    
    If sNumAnaDets <> 0 Then
        ' Process data
    End If
End If

oPurch.CancelDocument()