Venice
Purch::SeekByUnpaid
 
Seeks an unpaid Purchase Document by its supplier number.
 
VARIANT_BOOL SeekByUnpaid (
    enum eSeekMode eSeekMode,
    LONG lSupNum,
    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
pSupNumLONG (unsigned)Ascending-
pDocDateDATE (date)Ascending-
pIsTickedVARIANT_BOOLAscending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
lSupNum
[in] The supplier number of the Purchase Document you want to seek.
dDocDate
[in] The document date of the Purchase Document you want to seek.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreatePurch
GetDBStatus
GetNext
 
Samples
 
C++
 
// Seek all unpaid Purchase Documents for the supplier with number 125
long lSupNum = 125;
pPurch->SeekByUnpaid (smGreater, lSupNum, COleDateTime (0, 0, 0, 0, 0, 0).m_dt);
while (pPurch->GetDBStatus () == 0 && (long)pPurch->pSupNum == lSupNum)
{
    // Process record data
    
    pPurch->GetNext ();    
}

C#
 
// Seek all unpaid Purchase Documents for the supplier with number 125
int iSupNum = 125;
oPurch.SeekByUnpaid (eSeekMode.smGreater, iSupNum, new DateTime ());
while (oPurch.GetDBStatus () == 0 && (int)oPurch.pSupNum == iSupNum)
{
    // Process record data
    
    oPurch.GetNext ();
}

VBS
 
' Seek all unpaid Purchase Documents for the supplier with number 125
Dim dtDocDate
Dim iSupNum
iSupNum = 125
Call oPurch.SeekByUnpaid(smGreater, iSupNum, dtDocDate)
While oPurch.GetDBStatus() = 0 And oPurch.pSupNum = iSupNum
    ' Process record data

    Call oPurch.GetNext()
Wend

VB.NET
 
' Seek all unpaid Purchase Documents for the supplier with number 125
Dim dtDocDate As Date
Dim iSupNum As Integer
iSupNum = 125
oPurch.SeekByUnpaid(eSeekMode.smGreater, iSupNum, dtDocDate)
While oPurch.GetDBStatus() = 0 And oPurch.pSupNum = iSupNum
    ' Process record data

    oPurch.GetNext()
End While