mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-10 22:06:52 +00:00
Merge pull request #23651 from rohitwaghchaure/donot-set-serial-nos-if-manually-set
fix: manually set serial nos override with current available serial nos
This commit is contained in:
@@ -110,7 +110,7 @@ frappe.ui.form.on("Stock Reconciliation", {
|
||||
frappe.model.set_value(cdt, cdn, "amount", r.message.rate * r.message.qty);
|
||||
frappe.model.set_value(cdt, cdn, "current_serial_no", r.message.serial_nos);
|
||||
|
||||
if (frm.doc.purpose == "Stock Reconciliation") {
|
||||
if (frm.doc.purpose == "Stock Reconciliation" && !d.serial_no) {
|
||||
frappe.model.set_value(cdt, cdn, "serial_no", r.message.serial_nos);
|
||||
}
|
||||
}
|
||||
@@ -187,6 +187,11 @@ frappe.ui.form.on("Stock Reconciliation Item", {
|
||||
frappe.model.set_value(cdt, cdn, "batch_no", "");
|
||||
}
|
||||
|
||||
if (child.serial_no) {
|
||||
frappe.model.set_value(cdt, cdn, "serial_no", "");
|
||||
frappe.model.set_value(cdt, cdn, "current_serial_no", "");
|
||||
}
|
||||
|
||||
frm.events.set_valuation_rate_and_qty(frm, cdt, cdn);
|
||||
},
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ class StockReconciliation(StockController):
|
||||
|
||||
if item_dict.get("serial_nos"):
|
||||
item.current_serial_no = item_dict.get("serial_nos")
|
||||
if self.purpose == "Stock Reconciliation":
|
||||
if self.purpose == "Stock Reconciliation" and not item.serial_no:
|
||||
item.serial_no = item.current_serial_no
|
||||
|
||||
item.current_qty = item_dict.get("qty")
|
||||
|
||||
Reference in New Issue
Block a user