AdInfo
This method can return various information related to an address.
Body - raw:
{
"Method": "AdInfo",
"Parameters": [
<cInfo>,
<nAdresse>
[, <dDateEnd>]
[, <dDateStart>]
[, <vStock>]
]
}
Parameters | Description |
---|---|
Piece of information to be returned. The possible values for cInfo are: customerbalance: debtor balance; customerdocumentsopen: list of open invoice numbers for a given customer; customerinitialbalance: beginning debtor balance; customerinvoicesopen: open debtor's invoices total amount; customersalesitem: total amount of sales for an item or group of items; customersalestotal: total amount of sales [VAT Excluded] [VAT Included] [TTC] [HT]; customersalestotalvatexcluded: total amount of sales, VAT Exclude (no need to pass a parameter); customercreditnoteopen: total amount of open debtor's credit notes; customerlastsale: last sale; customeradvances: debtor advances; salescount: total number of sales; supplierbalance: creditor balance supplierinitialbalance: beginning creditor balance; supplierpurchasestotal: total amount of purchases; supplierinvoicesopen: total amount of open creditor's invoices; suppliercreditnoteopen: total amount of creditor's credit notes; supplierlastpurchase: last purchase; supplierpurchaseitem: total amount of purchases by item; supplierpurchasescount: total number of purchases; salesmansalestotal: total amount of sales for the vendor. |
|
nAdresse | Only the transactions concerning the addresses with ad_numero = nAdresse are considered. |
dDateEnd |
The transactions are selected up to the date specified. The parameter is optional. If the parameter is missing all the transactions are selected. |
dDateStart |
The transactions are selected starting from the date specified. The parameter is optional. If the parameter is missing all the transactions are selected. |
vStock |
This parameter is used only if cInfo is customersalesitem or supplierpurchasesitem. If the type of vStock is a numeric, the cInfo is applied to the Item with ar_numero = vStock. If the type of vStock is a string, the cInfo is applied to the Items being in the group specified in vStock. |
Examples:
*/ Show the debtor balance for the customer with the identifier equal to 1000 (Ad_numero = 1000).
{
"Method": "AdInfo",
"Parameters": [
"customerinitialbalance",
1000
]
}
messagebox(oBiz.AdInfo("customerinitialbalance", 1000))
*/ Show the total number of sales at 15 march 2017 for the customer having an ID of 100.
{
"Method": "AdInfo",
"Parameters": [
"customerinitialbalance",
1000,
"15.03.2017"
]
}