document_calculate
Compute invoice totals, discounts, tax, shipping and subtotal without rendering or storing the document, so checkout pages can display a final figure before commitment.
Instructions
Compute the totals for a document without storing or rendering it.
Returns the same breakdown — subtotal, discounts, tax, shipping, total — that a render would print, so a checkout page can show a figure before committing to one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| document_type | No | invoice |