Custm::GetOpenAmounts (Interface: Custm)
 
Gets the open amounts of this Customer.
 
VARIANT_BOOL GetOpenAmounts (
    VARIANT* pvAmountInv,
    VARIANT* pvAmountAcc,
    VARIANT* pvAmountTot
)
 
Parameters
pvAmountInv
[out] Returns a VARIANT, subtype DOUBLE, containing the sum of all open amount of all invoicing documents (orders, deliveries and invoices).
pvAmountAcc
[out] Returns a VARIANT, subtype DOUBLE, containing the accounting balance at the current moment.
pvAmountTot
[out] Returns a VARIANT, subtype DOUBLE, containing the sum of the invoicing and the accounting balance.
 
Return value
True if the open amounts were successfully retrieved, otherwise false.
 
Remarks
This method throws an exception if no financial years are present in the dossier.
 
See Also
CreateCustm
SeekByCstNum
 
Samples
 
C++
 
// Get the open amounts and the credit limit the customer with number = 25/0
if (pCustm->SeekByCstNum (smEqual, 25, 0))
{
    double lfCreLim = pCustm->pCreditLimitDosC;
    VARIANT vAmountInv, vAmountAcc, vAmountTot;

    if (pCustm->GetOpenAmounts (&vAmountInv, &vAmountAcc, &vAmountTot))
    {
        // Process data
    }
}

C#
 
// Get the open amounts and the credit limit the customer with number = 25/0
if (oCustm.SeekByCstNum (eSeekMode.smEqual, 25, 0))
{
    double lfCreLim = (double)oCustm.pCreditLimitDosC;
    object oAmountInv, oAmountAcc, oAmountTot;

    if (oCustm.GetOpenAmounts (out oAmountInv, out oAmountAcc, out oAmountTot))
    {
        // Process data
    }
}

VBS
 
' Get the open amounts and the credit limit the customer with number = 25/0
If oCustm.SeekByCstNum(smEqual, 25, 0) Then
    Dim lfCreLim
    Dim oAmountInv, oAmountAcc, oAmountTot

    lfCreLim = oCustm.pCreditLimitDosC
    
    If oCustm.GetOpenAmounts(oAmountInv, oAmountAcc, oAmountTot) Then
        ' Process data
    End If
End If

VB.NET
 
' Get the open amounts and the credit limit the customer with number = 25/0
If oCustm.SeekByCstNum(eSeekMode.smEqual, 25, 0) Then
    Dim lfCreLim As Double
    Dim oAmountInv, oAmountAcc, oAmountTot As Object

    lfCreLim = oCustm.pCreditLimitDosC
    oAmountInv = 0.0
    oAmountAcc = 0.0
    oAmountTot = 0.0
    
    If oCustm.GetOpenAmounts(oAmountInv, oAmountAcc, oAmountTot) Then
        ' Process data
    End If
End If