Merge branch 'version-12-hotfix' into commonify-warehouse-autofill-hotfix
This commit is contained in:
@@ -175,6 +175,20 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
};
|
||||
}
|
||||
|
||||
if (this.frm.fields_dict["items"].grid.get_field('blanket_order')) {
|
||||
this.frm.set_query("blanket_order", "items", function(doc, cdt, cdn) {
|
||||
var item = locals[cdt][cdn];
|
||||
return {
|
||||
query: "erpnext.controllers.queries.get_blanket_orders",
|
||||
filters: {
|
||||
"company": doc.company,
|
||||
"blanket_order_type": doc.doctype === "Sales Order" ? "Selling" : "Purchasing",
|
||||
"item": item.item_code
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
onload: function() {
|
||||
var me = this;
|
||||
@@ -1374,7 +1388,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
me.frm.doc.items.forEach(d => {
|
||||
if (in_list(data.apply_rule_on_other_items, d[data.apply_rule_on])) {
|
||||
for(var k in data) {
|
||||
if (in_list(fields, k) && data[k]) {
|
||||
if (in_list(fields, k) && data[k] && (data.price_or_product_discount === 'price' || k === 'pricing_rules')) {
|
||||
frappe.model.set_value(d.doctype, d.name, k, data[k]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user