2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-03 04:00:57 +00:00

Specify order currency (#4698)

* Add 'order_currency' to the various external order models

- By default will use the currency specified for the supplier (or customer)
- Can be specified per order, also

* Display order currency on order pgae

* Add 'order_currency' field

* Enable "blank" currency option (to default to the currency specified by the referenced company

* Fix default currency code when adding line items

* Remove 'total_price_currency' serializer field

- Now replaced with 'order_currency' for greater flexibility

* Bump api_version.py

* Update default order report templates

* Updated docs

* More docs updaes

* Adjust unit tests

* Use 'order_currency' in order tables

* Update purchase order api unit tests
This commit is contained in:
Oliver
2023-04-26 17:35:15 +10:00
committed by GitHub
parent 36d17c082b
commit 5fcab2aec3
22 changed files with 199 additions and 35 deletions

View File

@ -70,7 +70,7 @@
<td></td>
<td></td>
<th>{% trans "Total" %}</th>
<td>{% render_currency order.total_price decimal_places=2 currency=order.supplier.currency %}</td>
<td>{% render_currency order.total_price decimal_places=2 currency=order.currency %}</td>
<td></td>
</tr>

View File

@ -70,7 +70,7 @@
<td></td>
<td></td>
<th>{% trans "Total" %}</th>
<td>{% render_currency order.total_price currency=order.customer.currency %}</td>
<td>{% render_currency order.total_price currency=order.currency %}</td>
<td></td>
</tr>
</tbody>