Skip to content

Commit

Permalink
Merge pull request #44405 from ruthra-kumar/typeerror_on_transactionjs
Browse files Browse the repository at this point in the history
fix: typeerror on transaction.js
  • Loading branch information
ruthra-kumar authored Nov 28, 2024
2 parents af5dae8 + 46ce878 commit 5de7db2
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 5de7db2

Please sign in to comment.