Skip to content

Commit

Permalink
Revert "fix(ux): don't update qty blindly" (backport #38728) (backport
Browse files Browse the repository at this point in the history
…#38730) (#38734)

Revert "fix(ux): don't update qty blindly" (backport #38728) (#38730)

Revert "fix(ux): don't update qty blindly" (#38728)

(cherry picked from commit 6851c50)

Co-authored-by: Ankush Menat <ankush@frappe.io>
(cherry picked from commit 3fabca1)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
mergify[bot] authored Dec 13, 2023
1 parent ff85f2a commit 753c1aa
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions erpnext/public/js/controllers/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
item.pricing_rules = ''
return this.frm.call({
method: "erpnext.stock.get_item_details.get_item_details",
child: item,
args: {
doc: me.frm.doc,
args: {
Expand Down Expand Up @@ -519,19 +520,6 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
callback: function(r) {
if(!r.exc) {
frappe.run_serially([
() => {
var child = locals[cdt][cdn];
var std_field_list = ["doctype"]
.concat(frappe.model.std_fields_list)
.concat(frappe.model.child_table_field_list);

for (var key in r.message) {
if (std_field_list.indexOf(key) === -1) {
if (key === "qty" && child[key]) continue;
child[key] = r.message[key];
}
}
},
() => {
var d = locals[cdt][cdn];
me.add_taxes_from_item_tax_template(d.item_tax_rate);
Expand Down

0 comments on commit 753c1aa

Please sign in to comment.