diff --git a/report_tax_summary.php b/report_tax_summary.php index 90775c6b..fd180ecf 100644 --- a/report_tax_summary.php +++ b/report_tax_summary.php @@ -71,23 +71,24 @@ $sql_tax = mysqli_query($mysqli, "SELECT `tax_name` FROM `taxes`"); "; echo "" . $row['tax_name'] . ""; if ($view == 'monthly') { for ($i = 1; $i <= 12; $i++) { - $monthly_tax = getMonthlyTax($row['tax_name'], $i, $year, $mysqli); + $monthly_tax = getMonthlyTax($tax_name, $i, $year, $mysqli); echo "" . numfmt_format_currency($currency_format, $monthly_tax, $company_currency) . ""; } } else { for ($q = 1; $q <= 4; $q++) { - $quarterly_tax = getQuarterlyTax($row['tax_name'], $q, $year, $mysqli); + $quarterly_tax = getQuarterlyTax($tax_name, $q, $year, $mysqli); echo "" . numfmt_format_currency($currency_format, $quarterly_tax, $company_currency) . ""; } } // Calculate total for row and echo bold - $total_tax = getTotalTax($row['tax_name'], $year, $mysqli); + $total_tax = getTotalTax($tax_name, $year, $mysqli); echo "" . numfmt_format_currency($currency_format, $total_tax, $company_currency) . ""; echo ""; } @@ -97,12 +98,12 @@ $sql_tax = mysqli_query($mysqli, "SELECT `tax_name` FROM `taxes`"); " . numfmt_format_currency($currency_format, $monthly_tax, $company_currency) . ""; } } else { for ($q = 1; $q <= 4; $q++) { - $quarterly_tax = getQuarterlyTax($row['tax_name'], $q, $year, $mysqli); + $quarterly_tax = getQuarterlyTax($tax_name, $q, $year, $mysqli); echo "" . numfmt_format_currency($currency_format, $quarterly_tax, $company_currency) . ""; } }