fix: show material to supplier button (#41686)
This commit is contained in:
@@ -235,9 +235,11 @@ erpnext.buying.SubcontractingOrderController = class SubcontractingOrderControll
|
||||
}
|
||||
|
||||
has_unsupplied_items() {
|
||||
return this.frm.doc["supplied_items"].some(
|
||||
(item) => item.required_qty > item.supplied_qty - item.returned_qty
|
||||
);
|
||||
let over_transfer_allowance = this.frm.doc.__onload.over_transfer_allowance;
|
||||
return this.frm.doc["supplied_items"].some((item) => {
|
||||
let required_qty = item.required_qty + (item.required_qty * over_transfer_allowance) / 100;
|
||||
return required_qty > item.supplied_qty - item.returned_qty;
|
||||
});
|
||||
}
|
||||
|
||||
make_subcontracting_receipt() {
|
||||
|
||||
@@ -99,6 +99,12 @@ class SubcontractingOrder(SubcontractingController):
|
||||
}
|
||||
]
|
||||
|
||||
def onload(self):
|
||||
self.set_onload(
|
||||
"over_transfer_allowance",
|
||||
frappe.db.get_single_value("Buying Settings", "over_transfer_allowance"),
|
||||
)
|
||||
|
||||
def before_validate(self):
|
||||
super().before_validate()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user