Skip to content

Commit

Permalink
Merge pull request #44407 from frappe/mergify/bp/version-15-hotfix/pr…
Browse files Browse the repository at this point in the history
…-44405

fix: typeerror on transaction.js (backport #44405)
  • Loading branch information
ruthra-kumar authored Nov 28, 2024
2 parents 0fbc60a + 173d60f commit 11c54d2
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 @@ -1124,7 +1124,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 11c54d2

Please sign in to comment.