Follow

CPInfo

This method returns different pieces of information about a given account.

Syntax:

oBiz.CPInfo( <cMethod>, < cAccount>, [< dDateEnd>][, < dDateStart>][, <cJournal>][, <bNoStartingBalance>])

 

Parameter

Description

cMethod

Type of information to be returned from an account. The possible values are:

solde: account balance in local currency;

solde monnaie: account balance in the currency specified in the account;

débit: account debit balance in local currency;

débit monnaie: account debit balance in the currency specified in the account;

crédit: account credit balance in local currency;

crédit monnaie: account credit balance in the currency specified in the account.

cAccount

Account number.

dDateEnd

The recordings up to this date are considered. This parameter is optional. If the parameter is omitted, the recordings up to the end of the fiscal year are considered.

dDateStart

The recordings starting from this date are considered. The parameter is optional. If the parameter is omitted, the recordings starting from the beginning of the fiscal year are considered.

cJournal

Only the recording for the specified ledger are considered. This parameter is optional. If the parameter is omitted no filter is applied to the journal and all the recordings are considered. The possible values are:

"d": entries not coming from auxiliary modules: manual entries;

"v": sales ledger;

"a": purchases ledger;

"s": wages ledger;

"b": closing entries;

"o": starting balances ledger;

"i": inventories ledger;

"m": amortizations ledger;

"x": reversals ledger.

bNoStartingBalance

If the parameter is set to True, the starting balances are excluded. The parameter is optional. If the parameter is omitted its default value is false and the starting balances are included.

Example of body:

*/ Instantiate end set the database location.

oBiz = createobject("bizinfo.application")

oBiz.cDatabasePath = "C:\WinBIZ Data"

oBiz.nCompany = 1000

oBiz.nYear = 2017

*/ Show the balance for the Account 1000.

messagebox(oBiz.CPInfo("solde", "1000"))

 

*/ Show the debit balance for the Account 1000.

messagebox(oBiz.CPInfo("débit", "1000"))

*/ Show the foreign currency balance at the 01.03.2017 for the Account 1000.

messagebox(oBiz.CPInfo("solde monnaie", "1000", {01.03.2017}))

*/ Show the balance for the month of march 2017 for the Account 1000.

messagebox(oBiz.CPInfo("solde", "1000", {01.03.2017}, {31.03.2017}))

*/ Show the balance of the sales ledger for the month of march 2017 for the Account 1000.

messagebox(oBiz.CPInfo("solde", "1000", {01.03.2017}, {31.03.2017}, "v"))

*/ Show the balance for the Account 1000 without the initial balance.

messagebox(oBiz.CPInfo("solde", "1000", .f., .f., .f., .t.))

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments