Sales::SeekByUnpaid (Interface: Sales)
 
Seeks an unpaid Sales Document by its customer number.
 
VARIANT_BOOL SeekByUnpaid (
    enum eSeekMode eSeekMode,
    LONG lCstNum,
    DATE dDocDate
)
 
Key information
This method uses key number 3 (See SwapKey).
This key allows duplicates.
This is a null key, only the records where pIsTicked is false are in the index.
 
Key segment information
Segment NameTypeOrderCollation
pCstNumLONG (unsigned)Ascending-
pDocDateDATE (date)Ascending-
pIsTickedVARIANT_BOOLAscending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
lCstNum
[in] The customer number of the Sales Document you want to seek.
dDocDate
[in] The document date of the Sales Document you want to seek.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreateSales
GetDBStatus
GetNext
 
Samples
 
C++
 
// Seek all unpaid Sales Documents for the customer with number 25
long lCstNum = 25;
pSales->SeekByUnpaid (smGreater, lCstNum, COleDateTime (0, 0, 0, 0, 0, 0).m_dt);
while (pSales->GetDBStatus () == 0 && (long)pSales->pCstNum == lCstNum)
{
    // Process record data
    
    pSales->GetNext ();    
}

C#
 
// Seek all unpaid Sales Documents for the customer with number 25
int iCstNum = 25;
oSales.SeekByUnpaid (eSeekMode.smGreater, iCstNum, new DateTime ());
while (oSales.GetDBStatus () == 0 && (int)oSales.pCstNum == iCstNum)
{
    // Process record data
    
    oSales.GetNext ();
}

VBS
 
' Seek all unpaid Sales Documents for the customer with number 25
Dim dtDocDate
Dim iCstNum
iCstNum = 25
Call oSales.SeekByUnpaid(smGreater, iCstNum, dtDocDate)
While oSales.GetDBStatus() = 0 And oSales.pCstNum = iCstNum
    ' Process record data

    Call oSales.GetNext()
Wend

VB.NET
 
' Seek all unpaid Sales Documents for the customer with number 25
Dim dtDocDate As Date
Dim iCstNum As Integer
iCstNum = 25
oSales.SeekByUnpaid(eSeekMode.smGreater, iCstNum, dtDocDate)
While oSales.GetDBStatus() = 0 And oSales.pCstNum = iCstNum
    ' Process record data

    oSales.GetNext()
End While