fix: pos item detail serial no field (#46211)
(cherry picked from commit d2fad44e89)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
This commit is contained in:
@@ -187,6 +187,7 @@ erpnext.PointOfSale.ItemDetails = class {
|
|||||||
this[`${fieldname}_control`].set_value(item[fieldname]);
|
this[`${fieldname}_control`].set_value(item[fieldname]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.resize_serial_control(item);
|
||||||
this.make_auto_serial_selection_btn(item);
|
this.make_auto_serial_selection_btn(item);
|
||||||
|
|
||||||
this.bind_custom_control_change_event();
|
this.bind_custom_control_change_event();
|
||||||
@@ -203,11 +204,17 @@ erpnext.PointOfSale.ItemDetails = class {
|
|||||||
"actual_qty",
|
"actual_qty",
|
||||||
"price_list_rate",
|
"price_list_rate",
|
||||||
];
|
];
|
||||||
if (item.has_serial_no) fields.push("serial_no");
|
if (item.has_serial_no || item.serial_no) fields.push("serial_no");
|
||||||
if (item.has_batch_no) fields.push("batch_no");
|
if (item.has_batch_no || item.batch_no) fields.push("batch_no");
|
||||||
return fields;
|
return fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resize_serial_control(item) {
|
||||||
|
if (item.has_serial_no || item.serial_no) {
|
||||||
|
this.$form_container.find(".serial_no-control").find("textarea").css("height", "6rem");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
make_auto_serial_selection_btn(item) {
|
make_auto_serial_selection_btn(item) {
|
||||||
if (item.has_serial_no || item.has_batch_no) {
|
if (item.has_serial_no || item.has_batch_no) {
|
||||||
if (item.has_serial_no && item.has_batch_no) {
|
if (item.has_serial_no && item.has_batch_no) {
|
||||||
@@ -225,7 +232,6 @@ erpnext.PointOfSale.ItemDetails = class {
|
|||||||
`<div class="btn btn-sm btn-secondary auto-fetch-btn" style="margin-top: 6px">${label}</div>`
|
`<div class="btn btn-sm btn-secondary auto-fetch-btn" style="margin-top: 6px">${label}</div>`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
this.$form_container.find(".serial_no-control").find("textarea").css("height", "6rem");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user