mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Display purcahse price for stock item
This commit is contained in:
parent
8a114d345f
commit
fd821bbfc5
4 changed files with 25 additions and 1 deletions
|
|
@ -60,6 +60,8 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||
|
||||
String statusLabel(BuildContext context) {
|
||||
|
||||
// TODO: Delete me - The translated status values are provided by the API!
|
||||
|
||||
switch (status) {
|
||||
case OK:
|
||||
return L10().ok;
|
||||
|
|
@ -220,6 +222,15 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||
|
||||
int get partId => jsondata['part'] ?? -1;
|
||||
|
||||
String get purchasePrice => jsondata['purchase_price'];
|
||||
|
||||
bool get hasPurchasePrice {
|
||||
|
||||
String pp = purchasePrice;
|
||||
|
||||
return pp.isNotEmpty && pp.trim() != "-";
|
||||
}
|
||||
|
||||
int get trackingItemCount => (jsondata['tracking_items'] ?? 0) as int;
|
||||
|
||||
// Date of last update
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue