Skip to content

Commit

Permalink
fix: use serial and batch fields (backport #43421) (#43423)
Browse files Browse the repository at this point in the history
fix: use serial and batch fields (#43421)

(cherry picked from commit ca16089)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
  • Loading branch information
mergify[bot] and rohitwaghchaure authored Sep 29, 2024
1 parent a1b6628 commit d495d93
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions erpnext/public/js/controllers/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,15 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
callback: function(r) {
if(!r.exc) {
frappe.run_serially([
() => {
if (item.docstatus === 0
&& frappe.meta.has_field(item.doctype, "use_serial_batch_fields")
&& !item.use_serial_batch_fields
&& cint(frappe.user_defaults?.use_serial_batch_fields) === 1
) {
item["use_serial_batch_fields"] = 1;
}
},
() => {
var d = locals[cdt][cdn];
me.add_taxes_from_item_tax_template(d.item_tax_rate);
Expand Down

0 comments on commit d495d93

Please sign in to comment.