invoice_message_prepare
Prepare what a business sends a client about one issued invoice: purpose 'invoice', 'reminder' (overdue), 'receipt' (paid in full) or 'promise_follow_up' (promised date passed); left out, the one that fits. language 'en', 'ms' or 'zh'; left out, the client's (invoice_client_update message_language), else English. Returns to, subject, body, share_text, a mailto and link_on; share_url only for a member or above with a live link (never made here). NOTHING IS SENT. Refusals (CONFLICT): draft SIMPLER_SALES_MESSAGE_NOT_ISSUED (issue it with invoice_update status 'sent'); cancelled; written off; SIMPLER_SALES_MESSAGE_PURPOSE_UNFIT (send its next_call). Other arguments: VALIDATION_ERROR. Free.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The invoice's id, from invoice_list or invoice_read. | |
| purpose | No | 'invoice' sends the invoice, 'reminder' asks for payment, 'receipt' thanks the client once it is paid in full, 'promise_follow_up' asks when to expect a payment the client promised by a date that has passed (invoice_promise_set). Leave out to get the one that fits the invoice's state. | |
| language | No | 'en' English, 'ms' Bahasa Melayu, 'zh' Chinese. Leave out to use the client's message_language (English when none is set). |