Profit and loss
get_profit_and_lossUse this when the user asks about their profit, income and expenses, or profit and loss for this month, this quarter or given dates. Profit and loss for a period, the same figures as the Profit & loss page in Fatura Go, whose basis depends on the business (basis_kind). cash (accounting off): income (customer payments received in the period, excluding VAT, less credit-note refunds), expenses excluding VAT by category, and profit, per currency; supplier bills are not included and currencies are not added together. ledger (accounting on): revenue, cost of sales, gross profit, expenses and net profit from the books in AED, by report line. Say which basis it is when presenting it. period this_month (default), this_quarter, or custom with date_from and date_to. Needs access to expenses (or accounting once the books are on). Do not use it for per-unit profit on a product (calculate_profit) or for VAT (get_vat_summary).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_profit_and_loss"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | No | Default this_month; custom needs date_from and date_to. | |
| date_to | No | YYYY-MM-DD, document date on or before. | |
| date_from | No | YYYY-MM-DD, document date on or after. | |
| business_id | No | From list_businesses. May be left out when the connection shares exactly one business. |