PInvce::SeekByTrnDocDate (Interface: PInvce)
 
Seeks a Purchase Invoice by its transfer state and document date.
 
VARIANT_BOOL SeekByTrnDocDate (
    enum eSeekMode eSeekMode,
    DATE dDocDate
)
 
Key information
This method uses key number 6 (See SwapKey).
This key allows duplicates.
This is a null key, only the records where pToTransfer is true are in the index.
 
Key segment information
Segment NameTypeOrderCollation
pDocDateDATE (date)Ascending-
pToTransferVARIANT_BOOLAscending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
dDocDate
[in] The document date of the Purchase Invoice you want to seek.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreatePInvce
GetDBStatus
GetPrevious
 
Samples
 
C++
 
// Process all documents with a document date before 28/06/2024 that still need to be transferred
pPInvce->SeekByTrnDocDate (smLess, COleDateTime (2024, 6, 28, 0, 0, 0).m_dt);
while (pPInvce->GetDBStatus () == 0)
{
    // Process record data

    pPInvce->GetPrevious ();
}

C#
 
// Process all documents with a document date before 28/06/2024 that still need to be transferred
oPInvce.SeekByTrnDocDate (eSeekMode.smLess, new DateTime (2024, 6, 28));
while (oPInvce.GetDBStatus () == 0)
{
    // Process record data

    oPInvce.GetPrevious ();
}

VBS
 
' Process all documents with a document date before 28/06/2024 that still need to be transferred
Call oPInvce.SeekByTrnDocDate(smLess, #6/28/2024#)
While oPInvce.GetDBStatus() = 0
    ' Process record data

    Call oPInvce.GetPrevious()
Wend

VB.NET
 
' Process all documents with a document date before 28/06/2024 that still need to be transferred
oPInvce.SeekByTrnDocDate(eSeekMode.smLess, #6/28/2024#)
While oPInvce.GetDBStatus() = 0
    ' Process record data

    oPInvce.GetPrevious()
End While