mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-16 12:15:31 +00:00
Updates
(cherry picked from commit 94125667d9cdd1bd486aa58a2c4908c143b47225)
This commit is contained in:
@ -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"]);
|
||||
|
Reference in New Issue
Block a user