Skip to content

Commit

Permalink
fix: Cannot read properties of undefined (reading 'price_list_rate') (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitwaghchaure authored Sep 24, 2024
1 parent 8c32ebe commit a63dca0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/public/js/controllers/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe

apply_discount_on_item(doc, cdt, cdn, field) {
var item = frappe.get_doc(cdt, cdn);
if(!item.price_list_rate) {
if(!item?.price_list_rate) {
item[field] = 0.0;
} else {
this.price_list_rate(doc, cdt, cdn);
Expand Down

0 comments on commit a63dca0

Please sign in to comment.