mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-13 10:45:29 +00:00
Adds support for currency display (#277)
* Adds a helper function for rendering currency data * Update helper functions for StockItem model * Render purchasePrice correctly for stockitem * Use currency_formatter library instead of money_formatter * Add total price display for purchase order * icon fix
This commit is contained in:
@ -158,6 +158,14 @@ class _PurchaseOrderDetailState extends RefreshableState<PurchaseOrderDetailWidg
|
||||
},
|
||||
));
|
||||
|
||||
tiles.add(ListTile(
|
||||
title: Text(L10().totalPrice),
|
||||
leading: FaIcon(FontAwesomeIcons.dollarSign),
|
||||
trailing: Text(
|
||||
renderCurrency(widget.order.totalPrice, widget.order.totalPriceCurrency)
|
||||
),
|
||||
));
|
||||
|
||||
tiles.add(ListTile(
|
||||
title: Text(L10().received),
|
||||
leading: FaIcon(FontAwesomeIcons.clipboardCheck, color: COLOR_CLICK),
|
||||
@ -407,7 +415,7 @@ class _PurchaseOrderDetailState extends RefreshableState<PurchaseOrderDetailWidg
|
||||
onTap: onTabSelectionChanged,
|
||||
items: [
|
||||
BottomNavigationBarItem(
|
||||
icon: FaIcon(FontAwesomeIcons.info),
|
||||
icon: FaIcon(FontAwesomeIcons.circleInfo),
|
||||
label: L10().details
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
|
@ -4,6 +4,7 @@ import "package:font_awesome_flutter/font_awesome_flutter.dart";
|
||||
|
||||
import "package:inventree/app_colors.dart";
|
||||
import "package:inventree/barcode.dart";
|
||||
import "package:inventree/helpers.dart";
|
||||
import "package:inventree/l10.dart";
|
||||
import "package:inventree/api.dart";
|
||||
import "package:inventree/api_form.dart";
|
||||
@ -675,7 +676,9 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
ListTile(
|
||||
title: Text(L10().purchasePrice),
|
||||
leading: FaIcon(FontAwesomeIcons.dollarSign),
|
||||
trailing: Text(widget.item.purchasePrice),
|
||||
trailing: Text(
|
||||
renderCurrency(widget.item.purchasePrice, widget.item.purchasePriceCurrency)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user