mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 04:09:11 +00:00
fix: enable use serial / batch fields on batch selection
This commit is contained in:
@@ -795,6 +795,10 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
||||
return;
|
||||
}
|
||||
|
||||
if (item.serial_no) {
|
||||
item.use_serial_batch_fields = 1
|
||||
}
|
||||
|
||||
if (item && item.serial_no) {
|
||||
if (!item.item_code) {
|
||||
this.frm.trigger("item_code", cdt, cdn);
|
||||
@@ -1358,13 +1362,6 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
||||
}
|
||||
}
|
||||
|
||||
batch_no(doc, cdt, cdn) {
|
||||
let item = frappe.get_doc(cdt, cdn);
|
||||
if (!this.is_a_mapped_document(item)) {
|
||||
this.apply_price_list(item, true);
|
||||
}
|
||||
}
|
||||
|
||||
toggle_conversion_factor(item) {
|
||||
// toggle read only property for conversion factor field if the uom and stock uom are same
|
||||
if(this.frm.get_field('items').grid.fields_map.conversion_factor) {
|
||||
@@ -1590,7 +1587,12 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
||||
|
||||
batch_no(frm, cdt, cdn) {
|
||||
let row = locals[cdt][cdn];
|
||||
if (row.use_serial_batch_fields && row.batch_no) {
|
||||
|
||||
if (row.batch_no) {
|
||||
row.use_serial_batch_fields = 1
|
||||
}
|
||||
|
||||
if (row.batch_no) {
|
||||
var params = this._get_args(row);
|
||||
params.batch_no = row.batch_no;
|
||||
params.uom = row.uom;
|
||||
|
||||
Reference in New Issue
Block a user