Skip to content

Commit

Permalink
fix: Nan value when no items
Browse files Browse the repository at this point in the history
  • Loading branch information
Ninad1306 committed Sep 4, 2024
1 parent f968037 commit 7b982a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ function get_sub_suppy_type_options(frm) {
let supply_type, sub_supply_type, sub_supply_desc, document_type;

if (frm.doctype === "Delivery Note") {
const same_gstin = frm.doc.billing_address_gstin === frm.doc.company_gstin;
const same_gstin = frm.doc.billing_address_gstin == frm.doc.company_gstin;

if (frm.doc.is_return) {
supply_type = "Inward";
Expand Down
4 changes: 2 additions & 2 deletions india_compliance/public/js/taxes_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,13 @@ india_compliance.taxes_controller = class TaxesController {
return (
total + multiplier * (item_wise_tax_rates[item.name] || tax_row.rate)
);
}, 0);
}, 0) || 0;
}

calculate_total_taxable_value() {
return this.frm.doc.items.reduce((total, item) => {
return total + item.taxable_value;
}, 0);
}, 0) || 0;
}

get_value(field, doc, default_value) {
Expand Down

0 comments on commit 7b982a8

Please sign in to comment.