mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Updates
(cherry picked from commit 94125667d9cdd1bd486aa58a2c4908c143b47225)
This commit is contained in:
parent
0ef72dc3dd
commit
08e01a729b
4 changed files with 15 additions and 0 deletions
|
|
@ -40,6 +40,7 @@ class InvenTreePurchaseOrder extends InvenTreeOrder {
|
|||
"supplier_reference": {},
|
||||
"description": {},
|
||||
"project_code": {},
|
||||
"destination": {},
|
||||
"target_date": {},
|
||||
"link": {},
|
||||
"responsible": {},
|
||||
|
|
@ -54,6 +55,10 @@ class InvenTreePurchaseOrder extends InvenTreeOrder {
|
|||
fields.remove("project_code");
|
||||
}
|
||||
|
||||
if (!InvenTreeAPI().supportsPurchaseOrderDestination) {
|
||||
fields.remove("destination");
|
||||
}
|
||||
|
||||
return fields;
|
||||
|
||||
}
|
||||
|
|
@ -87,6 +92,8 @@ class InvenTreePurchaseOrder extends InvenTreeOrder {
|
|||
|
||||
String get supplierReference => getString("supplier_reference");
|
||||
|
||||
int get destinationId => getInt("destination");
|
||||
|
||||
bool get isOpen => api.PurchaseOrderStatus.isNameIn(status, ["PENDING", "PLACED", "ON_HOLD"]);
|
||||
|
||||
bool get isPending => api.PurchaseOrderStatus.isNameIn(status, ["PENDING", "ON_HOLD"]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue