From 800242da55740720edc44d00ce0c49b20dd0e9b6 Mon Sep 17 00:00:00 2001 From: Rich Lott / Artful Robot <forums@artfulrobot.uk> Date: Mon, 14 Oct 2019 10:11:57 +0100 Subject: [PATCH] update docs now dev/financial#73 fixed --- docs/financial/OrderAPI.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/financial/OrderAPI.md b/docs/financial/OrderAPI.md index 7ffbbcaa..8cc4d83f 100644 --- a/docs/financial/OrderAPI.md +++ b/docs/financial/OrderAPI.md @@ -57,8 +57,8 @@ Things to note: 5. The `line_total` *must* equal the `unit_price` × `qty` -!!! bug - The `total_amount` *must* equal the sum of all the `line_total` values. This is a [current bug](https://lab.civicrm.orog/dev/financial/issues/73) - once fixed you will be able to omit the `total_amount` key and the total will be calculated. +!!! info + If you provide a value to `total_amount` as we have above, it *must* equal the sum of all the `line_total` values. Before 5.20 there was [a bug](https://lab.civicrm.orog/dev/financial/issues/73) that required the top-level `total_amount` was provided, but from 5.20 onward you can ommit this and it will be calculated automatically from the sum of the `line_items`. Currently the data returned from `Order.create` shows only the fields from the created Contribution. However an `Order.get` API call for the ID will also include an array of `line_items` (see below for example). -- GitLab