Skip to content

Commit

Permalink
Fix string lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
SchrodingersGat committed Oct 22, 2023
1 parent 1d99ed7 commit 9241271
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/inventree/purchase_order.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,17 @@ class InvenTreePurchaseOrder extends InvenTreeModel {
}
}

String get totalPriceCurrency => getString("total_price_currency");
// Return the currency for this order
// Note that the nomenclature in the API changed at some point
String get totalPriceCurrency {
if (jsondata.containsKey("order_currency")) {
return getString("order_currency");
} else if (jsondata.containsKey("total_price_currency")) {
return getString("total_price_currency");
} else {
return "";
}
}

Future<List<InvenTreePOLineItem>> getLineItems() async {

Expand Down

0 comments on commit 9241271

Please sign in to comment.