fix: reset the incoming rate on changing of the warehouse (#38909)

This commit is contained in:
rohitwaghchaure
2023-12-21 18:49:36 +05:30
committed by GitHub
parent 3b9feffc00
commit 2770ca1b65

View File

@@ -200,6 +200,10 @@ erpnext.selling.SellingController = class SellingController extends erpnext.Tran
item.serial_no = null;
}
if (doc.docstatus === 0 && doc.is_return && !doc.return_against) {
item.incoming_rate = 0.0;
}
var has_batch_no;
frappe.db.get_value('Item', {'item_code': item.item_code}, 'has_batch_no', (r) => {
has_batch_no = r && r.has_batch_no;