fix: serial and batch selector and added deprecated decorator

This commit is contained in:
Rohit Waghchaure
2023-03-24 10:14:09 +05:30
parent 440510337c
commit c1132d1e6d
8 changed files with 32 additions and 27 deletions

View File

@@ -384,9 +384,10 @@ erpnext.PointOfSale.ItemDetails = class {
new erpnext.SerialBatchPackageSelector(frm, item_row, (r) => {
if (r) {
frm.refresh_fields();
frappe.model.set_value(item_row.doctype, item_row.name,
"serial_and_batch_bundle", r.name);
frappe.model.set_value(item_row.doctype, item_row.name, {
"serial_and_batch_bundle": r.name,
"qty": Math.abs(r.total_qty)
});
}
});
});

View File

@@ -444,11 +444,10 @@ erpnext.selling.SellingController = class SellingController extends erpnext.Tran
new erpnext.SerialBatchPackageSelector(
me.frm, item, (r) => {
if (r) {
me.frm.refresh_fields();
frappe.model.set_value(cdt, cdn,
"serial_and_batch_bundle", r.name);
me.frm.save();
frappe.model.set_value(item.doctype, item.name, {
"serial_and_batch_bundle": r.name,
"qty": Math.abs(r.total_qty)
});
}
}
);