|
Gets a distribution of a detail. |
|
|
VARIANT_BOOL GetStkDetail ( SHORT sDetIndex, SHORT sStkIndex, VARIANT* pvQuantity, VARIANT* pvLocation, VARIANT* pvSerialNumber ) |
|
|
Parameters | sDetIndex | [in] The index of the detail where the distribution belongs to, starting from 0. | sStkIndex | [in] The index of the distribution, starting from 0. | pvQuantity | [out] Returns a VARIANT, subtype DOUBLE, containing the quantity that is distributed. | pvLocation | [out] Returns a VARIANT, subtype BSTR, containing the location of the article. | pvSerialNumber | [out] Returns a VARIANT, subtype BSTR, containing the serial number of the article. | | Return value |
True if the distribution with the given index exists, otherwise false. |
|
See Also |
|
|
|
Samples |
|
|
C++ |
|
// Retrieve all distributions of all details of the current document
VARIANT vQuantity, vLocation, vSerialNumber;
short sNumDetails, sNumStkDets;
pSInvce->PrepareDocument (paView);
sNumDetails = pSInvce->GetNumDetails ();
for (short sDetail = 0; sDetail < sNumDetails; sDetail++)
{
sNumStkDets = pSInvce->GetNumStkDetails (sDetail);
for (short sStkDet = 0; sStkDet < sNumStkDets; sStkDet++)
{
if (pSInvce->GetStkDetail (sDetail, sStkDet, &vQuantity, &vLocation, &vSerialNumber))
{
// Process data
}
}
}
pSInvce->CancelDocument ();
|
|
|
C# |
|
// Retrieve all distributions of all details of the current document
object oQuantity, oLocation, oSerialNumber;
short sNumDetails, sNumStkDets;
oSInvce.PrepareDocument (ePrepareAction.paView);
sNumDetails = oSInvce.GetNumDetails ();
for (short sDetail = 0; sDetail < sNumDetails; sDetail++)
{
sNumStkDets = oSInvce.GetNumStkDetails (sDetail);
for (short sStkDet = 0; sStkDet < sNumStkDets; sStkDet++)
{
if (oSInvce.GetStkDetail (sDetail, sStkDet, out oQuantity, out oLocation, out oSerialNumber))
{
// Process data
}
}
}
oSInvce.CancelDocument ();
|
|
|
VBS |
|
' Retrieve all distributions of all details of the current document
Dim oQuantity, oLocation, oSerialNumber
Dim sDetail, sStkDet, sNumDetails, sNumStkDets
Call oSInvce.PrepareDocument(paView)
sNumDetails = oSInvce.GetNumDetails()
For sDetail = 0 To sNumDetails - 1
sNumStkDets = oSInvce.GetNumStkDetails(sDetail)
For sStkDet = 0 To sNumStkDets - 1
If oSInvce.GetStkDetail(sDetail, sStkDet, oQuantity, oLocation, oSerialNumber) Then
' Process data
End If
Next
Next
Call oSInvce.CancelDocument()
|
|
|
VB.NET |
|
' Retrieve all distributions of all details of the current document
Dim oQuantity, oLocation, oSerialNumber As Object
Dim sNumDetails, sNumStkDets As Short
oSInvce.PrepareDocument(ePrepareAction.paView)
sNumDetails = oSInvce.GetNumDetails()
For sDetail As Short = 0 To sNumDetails - 1
sNumStkDets = oSInvce.GetNumStkDetails(sDetail)
For sStkDet As Short = 0 To sNumStkDets - 1
If oSInvce.GetStkDetail(sDetail, sStkDet, oQuantity, oLocation, oSerialNumber) Then
' Process data
End If
Next
Next
oSInvce.CancelDocument()
|
|