mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 18:59:08 +00:00
Merge remote-tracking branch 'upstream/version-15-hotfix' into mergify/bp/version-15-hotfix/pr-40050
This commit is contained in:
@@ -150,6 +150,19 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
||||
});
|
||||
}
|
||||
|
||||
if (this.frm.fields_dict["items"].grid.get_field("uom")) {
|
||||
this.frm.set_query("uom", "items", function(doc, cdt, cdn) {
|
||||
let row = locals[cdt][cdn];
|
||||
|
||||
return {
|
||||
query: "erpnext.controllers.queries.get_item_uom_query",
|
||||
filters: {
|
||||
"item_code": row.item_code
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
if(
|
||||
this.frm.docstatus < 2
|
||||
&& this.frm.fields_dict["payment_terms_template"]
|
||||
@@ -238,6 +251,15 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
||||
}
|
||||
}
|
||||
|
||||
use_serial_batch_fields(frm, cdt, cdn) {
|
||||
const item = locals[cdt][cdn];
|
||||
if (!item.use_serial_batch_fields) {
|
||||
frappe.model.set_value(cdt, cdn, "serial_no", "");
|
||||
frappe.model.set_value(cdt, cdn, "batch_no", "");
|
||||
frappe.model.set_value(cdt, cdn, "rejected_serial_no", "");
|
||||
}
|
||||
}
|
||||
|
||||
set_fields_onload_for_line_item() {
|
||||
if (this.frm.is_new() && this.frm.doc?.items) {
|
||||
this.frm.doc.items.forEach(item => {
|
||||
|
||||
Reference in New Issue
Block a user