From e66063161c51b0956d2ff3acabf778e8f2b4d045 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Thu, 17 Aug 2023 22:28:14 -0700 Subject: [PATCH] load_tax_table: Optional deductible --- tax_ui.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tax_ui.js b/tax_ui.js index 57bd361..0117dcc 100644 --- a/tax_ui.js +++ b/tax_ui.js @@ -1,8 +1,8 @@ "use strict"; -function load_tax_table(table_id, deductible_id) { - return apply_deductible(parse_tax_table(document.getElementById(table_id).value), - parseFloat(document.getElementById(deductible_id).value)); +function load_tax_table(table_id, deductible_id = null) { + const deductible = deductible_id == null ? 0.0 : parseFloat(document.getElementById(deductible_id).value); + return apply_deductible(parse_tax_table(document.getElementById(table_id).value), deductible); } function format_number(n) { -- 2.44.1