mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-12 17:51:20 +00:00
Revert "fix(ux): don't update qty blindly" (backport #38728) (#38730) Revert "fix(ux): don't update qty blindly" (#38728) (cherry picked from commit6851c5042f) Co-authored-by: Ankush Menat <ankush@frappe.io> (cherry picked from commit3fabca1051) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
@@ -471,6 +471,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
item.pricing_rules = ''
|
item.pricing_rules = ''
|
||||||
return this.frm.call({
|
return this.frm.call({
|
||||||
method: "erpnext.stock.get_item_details.get_item_details",
|
method: "erpnext.stock.get_item_details.get_item_details",
|
||||||
|
child: item,
|
||||||
args: {
|
args: {
|
||||||
doc: me.frm.doc,
|
doc: me.frm.doc,
|
||||||
args: {
|
args: {
|
||||||
@@ -519,19 +520,6 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
if(!r.exc) {
|
if(!r.exc) {
|
||||||
frappe.run_serially([
|
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];
|
var d = locals[cdt][cdn];
|
||||||
me.add_taxes_from_item_tax_template(d.item_tax_rate);
|
me.add_taxes_from_item_tax_template(d.item_tax_rate);
|
||||||
|
|||||||
Reference in New Issue
Block a user