Add an expense account
create_expense_accountAdds an expense account: a category expenses are filed under, such as "Pest control". Check list_expense_accounts first: an active account with the same name is answered instead. Tag it with the IRD return line it feeds (list_choices lists them as irdExpenseLines) so the year's return totals it. When the organisation is connected to Xero the account is sent there too. Only for an organisation where this connection may add and change records (list_organisations says which). The answer is the saved account.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Its accounting code, such as 473, when the organisation uses codes. | |
| name | Yes | What the account is called. | |
| ird_line | No | The key of the IRD return line it feeds, from list_choices irdExpenseLines, such as ir3r-9. | |
| allow_duplicate | No | Adding is safe to repeat: the same details sent again return the record already made. Set true only when the person confirms they really want a second, identical record. | |
| organisation_id | No | The id of the organisation to use, from list_organisations. Leave it out when the connection covers only one organisation; it is required when it covers more than one. |