Sales::NeedAnaDistrib (Interface: Sales)
 
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
CreateSales
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;

pSales->PrepareDocument (paView);

sManualIndex = pSales->GetManualIndex ();

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

pSales->CancelDocument ();

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

oSales.PrepareDocument (ePrepareAction.paView);

sManualIndex = oSales.GetManualIndex ();

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

oSales.CancelDocument ();

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

Call oSales.PrepareDocument(paView)

sManualIndex = oSales.GetManualIndex()

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

Call oSales.CancelDocument()

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

oSales.PrepareDocument(ePrepareAction.paView)

sManualIndex = oSales.GetManualIndex()

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

oSales.CancelDocument()