Venice
Purch::NeedAnaDistrib
 
Should this accounting detail be analytically distributed?
 
VARIANT_BOOL NeedAnaDistrib (
    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
True if for the given detail analytical distribution is required, otherwise false.
 
See Also
CreatePurch
Handling accounting documents using the SDK
PrepareDocument
GetManualIndex
CancelDocument
 
Samples
 
C++
 
// Check if the first manual detail of the current document needs to be analytically distributed by centre
short sManualIndex;

pPurch->PrepareDocument (paView);

sManualIndex = pPurch->GetManualIndex ();

if (sManualIndex != -1)
{
    if (pPurch->NeedAnaDistrib (sManualIndex, aetCent))
    {
        // Process data
    }
}

pPurch->CancelDocument ();

C#
 
// Check if the first manual detail of the current document needs to be analytically distributed by centre
short sManualIndex;

oPurch.PrepareDocument (ePrepareAction.paView);

sManualIndex = oPurch.GetManualIndex ();

if (sManualIndex != -1)
{
    if (oPurch.NeedAnaDistrib (sManualIndex, eAnaEntType.aetCent))
    {
        // Process data
    }
}

oPurch.CancelDocument ();

VBS
 
' Check if the first manual detail of the current document needs to be analytically distributed by centre
Dim sManualIndex

Call oPurch.PrepareDocument(paView)

sManualIndex = oPurch.GetManualIndex()

If sManualIndex <> -1 Then
    If oPurch.NeedAnaDistrib(sManualIndex, aetCent) Then
        ' Process data
    End If
End If

Call oPurch.CancelDocument()

VB.NET
 
' Check if the first manual detail of the current document needs to be analytically distributed by centre
Dim sManualIndex As Short

oPurch.PrepareDocument(ePrepareAction.paView)

sManualIndex = oPurch.GetManualIndex()

If sManualIndex <> -1 Then
    If oPurch.NeedAnaDistrib(sManualIndex, eAnaEntType.aetCent) Then
        ' Process data
    End If
End If

oPurch.CancelDocument()