Venice
SDeliv::GetNumStkDetails
 
Gets the number of distributions for a detail.
 
SHORT GetNumStkDetails (
    SHORT sDetIndex
)
 
Parameters
sDetIndex
[in] The index of the detail where the distribution belongs to, starting from 0.
 
Return value
A SHORT containing the number of distributions of the given detail of the current document.
 
Remarks
If the option 'Stock management' nor the option 'Serial numbers' is active in the dossier, this method returns 0.
 
See Also
CreateSDeliv
Handling invoicing documents using the SDK
PrepareDocument
CancelDocument
 
Samples
 
C++
 
// Get the number of distributions of the first detail of the current document
pSDeliv->PrepareDocument (paView);

short sNumStkDets = pSDeliv->GetNumStkDetails (0);

if (sNumStkDets != 0)
{
    // Process data
}

pSDeliv->CancelDocument ();

C#
 
// Get the number of distributions of the first detail of the current document
oSDeliv.PrepareDocument (ePrepareAction.paView);

short sNumStkDets = oSDeliv.GetNumStkDetails (0);

if (sNumStkDets != 0)
{
    // Process data
}

oSDeliv.CancelDocument ();

VBS
 
' Get the number of distributions of the first detail of the current document
Dim sNumStkDets

Call oSDeliv.PrepareDocument(paView)

sNumStkDets = oSDeliv.GetNumStkDetails(0)
    
If sNumStkDets <> 0 Then
    ' Process data
End If

Call oSDeliv.CancelDocument()

VB.NET
 
' Get the number of distributions of the first detail of the current document
Dim sNumStkDets As Short

oSDeliv.PrepareDocument(ePrepareAction.paView)

sNumStkDets = oSDeliv.GetNumStkDetails(0)
    
If sNumStkDets <> 0 Then
    ' Process data
End If

oSDeliv.CancelDocument()