|
Gets the last tick information. |
|
|
VARIANT_BOOL GetLastTickInfo ( VARIANT* pvSession, VARIANT* pvSequence, VARIANT* pvTickDate, VARIANT* pvTickUser, VARIANT* pvAmountDetC, VARIANT* pvAmountDosC, VARIANT* pvTickSysNums ) |
|
|
Parameters | pvSession | [out] Returns a VARIANT, subtype LONG, containing the tick session number. | pvSequence | [out] Returns a VARIANT, subtype LONG, containing the sequence number within the tick session (0 based). | pvTickDate | [out] Returns a VARIANT, subtype DATE, containing the tick date. | pvTickUser | [out] Returns a VARIANT, subtype BSTR, containing the user initials of the tick session. | pvAmountDetC | [out] Returns a VARIANT, subtype DOUBLE, containing the tick amount in detail currency. | pvAmountDosC | [out] Returns a VARIANT, subtype DOUBLE, containing the tick amount in dossier currency. | pvTickSysNums | [out] Returns a VARIANT, subtype array of LONG, containing a list of entry system numbers involved in the tick session. | | Return value |
True if the last tick info record of the current entry record was found, otherwise false. | | Remarks |
| Use the SeekByDocNum method to position on the corresponing entry record for purchase and sales documents of the current financial year. For transferred purchase and sales documents of previous financial years the SeekByDocNumOrg method can be used. |
|
|
See Also |
|
|
|
Samples |
|
|
C++ |
|
// Seek the entry record for a transferred document of a previous year
if (pEntry->SeekByDocNumOrg (smEqual, btSales, "FAK", 2023, 12))
{
VARIANT vSession, vSequence, vTickDate, vTickUser, vAmountDetC, vAmountDosC, vTickSysNums;
// Get the tick information for that entry record
if (pEntry->GetLastTickInfo (&vSession, &vSequence, &vTickDate, &vTickUser, &vAmountDetC, &vAmountDosC, &vTickSysNums) && vTickSysNums.vt&VT_ARRAY)
{
COleSafeArray saTickSysNums (vTickSysNums);
VARIANT vSysNum;
long lUB, lInd;
// Loop through all other system numbers involved in the tick session
saTickSysNums.GetUBound (1, &lUB);
for (lInd = 0; lInd <= lUB; lInd++)
{
saTickSysNums.GetElement (&lInd, &vSysNum);
if (pEntry->SeekBySysNum (smEqual, vSysNum.lVal))
{
// Process record data
}
}
}
}
|
|
|
C# |
|
// Seek the entry record for a transferred document of a previous year
if (oEntry.SeekByDocNumOrg(eSeekMode.smEqual, eBookType.btSales, "FAK", 2023, 2793))
{
object oSession, oSequence, oTickDate, oTickUser, oAmountDetC, oAmountDosC, oTickSysNums;
// Get the tick information for that entry record
if (oEntry.GetLastTickInfo (out oSession, out oSequence, out oTickDate, out oTickUser, out oAmountDetC, out oAmountDosC, out oTickSysNums))
{
// Loop through all other system numbers involved in the tick session
if (oTickSysNums != null)
{
foreach (Object oSysNum in (Array)oTickSysNums)
{
if (oEntry.SeekBySysNum (eSeekMode.smEqual, (int)oSysNum))
{
// Process record data
}
}
}
}
}
|
|
|
VBS |
|
' Seek the entry record for a transferred document of a previous year
If oEntry.SeekByDocNumOrg(smEqual, btSales, "FAK", 2023, 2793) Then
Dim oSession, oSequence, oTickDate, oTickUser, oAmountDetC, oAmountDosC, oTickSysNums, oSysNum
' Get the tick information for the entry record
If oEntry.GetLastTickInfo(oSession, oSequence, oTickDate, oTickUser, oAmountDetC, oAmountDosC, oTickSysNums) Then
' Loop through all other system numbers involved in the tick session
For Each oSysNum In oTickSysNums
If oEntry.SeekBySysNum(smEqual, oSysNum) Then
' Process record data
End If
Next
End If
End If
|
|
|
VB.NET |
|
' Seek the entry record for a transferred document of a previous year
If oEntry.SeekByDocNumOrg(eSeekMode.smEqual, eBookType.btSales, "FAK", 2023, 2793) Then
Dim oSession, oSequence, oTickDate, oTickUser, oAmountDetC, oAmountDosC, oTickSysNums, oSysNum As Object
' Get the tick information for the entry record
If oEntry.GetLastTickInfo(oSession, oSequence, oTickDate, oTickUser, oAmountDetC, oAmountDosC, oTickSysNums) And Not IsNothing(oTickSysNums) Then
' Loop through all other system numbers involved in the tick session
For Each oSysNum In oTickSysNums
If oEntry.SeekBySysNum(eSeekMode.smEqual, oSysNum) Then
' Process record data
End If
Next
End If
End If
|
|