docs: update order module's conceptual guides (#7893)

* fixes + add return document

* update order conceptual guides

* resolve todo

* re-generate files map
This commit is contained in:
Shahed Nasser
2024-07-09 18:14:30 +03:00
committed by GitHub
parent d46f9fda21
commit 3e4a96a31c
13 changed files with 297 additions and 338 deletions
@@ -18,7 +18,19 @@ The transactions main purpose is to ensure a correct balance between paid and
## Checking Outstanding Amount
The orders total is stored in the `OrderSummary`'s `total` property. To check the outstanding amount of the order, its transaction amounts are summed. Then, the following conditions are checked:
The orders total amounts are stored in the `OrderSummary`'s `totals` property, which is a JSON object holding the total details of the order.
```json
{
"totals": {
"total": 30,
"subtotal": 30,
// ...
}
}
```
To check the outstanding amount of the order, its transaction amounts are summed. Then, the following conditions are checked:
<Table>
<Table.Header>
@@ -71,9 +83,9 @@ The orders total is stored in the `OrderSummary`'s `total` property. To check
## Transaction Reference
The Order Module doesnt provide payment processing functionalities, so it doesnt store payments that can be processed. For that, use the Payment Module or custom logic.
The Order Module doesnt provide payment processing functionalities, so it doesnt store payments that can be processed. Payment functionalities are provided by the [Payment Module](../../payment/page.mdx).
The `Transaction` data model has two properties that determine which data model and record holds the actual payments details:
- `reference`: indicates the tables name in the database. For example, `payment` if youre using the Payment Module.
- `reference`: indicates the tables name in the database. For example, `payment` from the Payment Module.
- `reference_id`: indicates the ID of the record in the table. For example, `pay_123`.