Venice
Balan::GetBalance
 
Gets the balance for a group of account numbers and for a period of a month or the complete financial year.
 
DOUBLE GetBalance (
    BSTR bsAccount,
    SHORT sMonth
)
 
Parameters
bsAccount
[in] The account number of which you want to know the monthly balance.
sMonth
[in] The month of which you want to know the monthly balance.
 
Return value
A DOUBLE containing the balance for the given account number in the given month.
 
Remarks
The account number, which is normally composed of digits only, can contain the wild card '?' (which stands for any digit) and can end with '*' (all account numbers beginning with the digits before the '*').
The month can have a value from 1 to 25 (a financial year can cover 2 complete calendar years) and if 0 is given, the monthly balance of the complete financial year is returned.
The balance that is returned is limited to the given account only, it is not the sum of the balances of its sub-accounts. There are a few exceptions, for class accounts (accounts consisting of 1 digit, e.g. '2') and prefix accounts (customers, suppliers, deposits, banks, postal cheques and cash) the balance returned is the sum of the balances of the sub-accounts.
 
See Also
CreateBalan
GetBalanceEx
GetBalanceField
 
Samples
 
C++
 
// Retrieve the monthly balance of the class account '2' for the month of January (contains the sum of the balances of the sub-accounts)
double lfBalance = pBalan->GetBalance ("2", 1);

// Retrieve the monthly balance of the account '2009' for the month of February (contains only the balances of this account)
lfBalance = pBalan->GetBalance ("2009", 2);

// Retrieve the monthly balance of all customers (assuming that '400' is the customer prefix account) for the month of March
lfBalance = pBalan->GetBalance ("400", 3);

// Retrieve the monthly balance of the accounts 1204, 1214, 1224, ..., 1294 for the month of April
lfBalance = pBalan->GetBalance ("1204", 4) + pBalan->GetBalance ("1214", 4) + ... + pBalan->GetBalance ("1294", 4);
// ...or using the '?'-wildcard
lfBalance = pBalan->GetBalance ("12?4", 4);

// Retrieve the monthly balance of the account 1204 and all its sub-accounts (12041, 12042, 120420, 120421) for the month of May
lfBalance = pBalan->GetBalance ("1204", 5) + pBalan->GetBalance ("12041", 5) + pBalan->GetBalance ("12042", 5) + pBalan->GetBalance ("120420", 5) + pBalan->GetBalance ("120421", 5);
// ...or using the '*'-wildcard
lfBalance = pBalan->GetBalance ("1204*", 5);

C#
 
// Retrieve the monthly balance of the class account '2' for the month of January (contains the sum of the balances of the sub-accounts)
double lfBalance = oBalan.GetBalance ("2", 1);

// Retrieve the monthly balance of the account '2009' for the month of February (contains only the balances of this account)
lfBalance = oBalan.GetBalance ("2009", 2);

// Retrieve the monthly balance of all customers (assuming that '400' is the customer prefix account) for the month of March
lfBalance = oBalan.GetBalance ("400", 3);

// Retrieve the monthly balance of the accounts 1204, 1214, 1224, ..., 1294 for the month of April
lfBalance = oBalan.GetBalance ("1204", 4) + oBalan.GetBalance ("1214", 4) + ... + oBalan.GetBalance ("1294", 4);
// ...or using the '?'-wildcard
lfBalance = oBalan.GetBalance ("12?4", 4);

// Retrieve the monthly balance of the account 1204 and all its sub-accounts (12041, 12042, 120420, 120421) for the month of May
lfBalance = oBalan.GetBalance ("1204", 5) + oBalan.GetBalance ("12041", 5) + oBalan.GetBalance ("12042", 5) + oBalan.GetBalance ("120420", 5) + oBalan.GetBalance ("120421", 5);
// ...or using the '*'-wildcard
lfBalance = oBalan.GetBalance ("1204*", 5);

VBS
 
Dim lfBalance

' Retrieve the monthly balance of the class account '2' for the month of January (contains the sum of the balances of the sub-accounts)
lfBalance = oBalan.GetBalance("2", 1)

' Retrieve the monthly balance of the account '2009' for the month of February (contains only the balances of this account)
lfBalance = oBalan.GetBalance("2009", 2)

' Retrieve the monthly balance of all customers (assuming that '400' is the customer prefix account) for the month of March
lfBalance = oBalan.GetBalance("400", 3)

' Retrieve the monthly balance of the accounts 1204, 1214, 1224, ..., 1294 for the month of April
lfBalance = oBalan.GetBalance("1204", 4) + oBalan.GetBalance("1214", 4) + ... + oBalan.GetBalance("1294", 4)
' ...or using the '?'-wildcard
lfBalance = oBalan.GetBalance("12?4", 4)

' Retrieve the monthly balance of the account 1204 and all its sub-accounts (12041, 12042, 120420, 120421) for the month of May
lfBalance = oBalan.GetBalance("1204", 5) + oBalan.GetBalance("12041", 5) + oBalan.GetBalance("12042", 5) + oBalan.GetBalance("120420", 5) + oBalan.GetBalance("120421", 5)
' ...or using the '*'-wildcard
lfBalance = oBalan.GetBalance("1204*", 5)

VB.NET
 
Dim lfBalance As Double

' Retrieve the monthly balance of the class account '2' for the month of January (contains the sum of the balances of the sub-accounts)
lfBalance = oBalan.GetBalance("2", 1)

' Retrieve the monthly balance of the account '2009' for the month of February (contains only the balances of this account)
lfBalance = oBalan.GetBalance("2009", 2)

' Retrieve the monthly balance of all customers (assuming that '400' is the customer prefix account) for the month of March
lfBalance = oBalan.GetBalance("400", 3)

' Retrieve the monthly balance of the accounts 1204, 1214, 1224, ..., 1294 for the month of April
lfBalance = oBalan.GetBalance("1204", 4) + oBalan.GetBalance("1214", 4) + ... + oBalan.GetBalance("1294", 4)
' ...or using the '?'-wildcard
lfBalance = oBalan.GetBalance("12?4", 4)

' Retrieve the monthly balance of the account 1204 and all its sub-accounts (12041, 12042, 120420, 120421) for the month of May
lfBalance = oBalan.GetBalance("1204", 5) + oBalan.GetBalance("12041", 5) + oBalan.GetBalance("12042", 5) + oBalan.GetBalance("120420", 5) + oBalan.GetBalance("120421", 5)
' ...or using the '*'-wildcard
lfBalance = oBalan.GetBalance("1204*", 5)