Skip to content

Commit

Permalink
fix: typeerror on transaction.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthra-kumar committed Nov 28, 2024
1 parent 9a5d68f commit 46ce878
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 @@ -1135,7 +1135,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 && !item.price_list_rate) {
item[field] = 0.0;
} else {
this.price_list_rate(doc, cdt, cdn);
Expand Down

0 comments on commit 46ce878

Please sign in to comment.