Collected Tax Summary

" . date('M', mktime(0, 0, 0, $i, 10)) . ""; } } else { echo ""; echo ""; echo ""; echo ""; } ?> "; echo ""; if ($view == 'monthly') { for ($i = 1; $i <= 12; $i++) { $monthly_tax = (float) getMonthlyTax($tax_name, $i, $year, $mysqli); // Accumulate totals $monthly_totals[$i] += $monthly_tax; $grand_total += $monthly_tax; echo ""; } // Row total = sum of this tax’s 12 months $row_total = 0.0; for ($i = 1; $i <= 12; $i++) { $row_total += (float) getMonthlyTax($tax_name, $i, $year, $mysqli); } echo ""; } else { $row_total = 0.0; for ($q = 1; $q <= 4; $q++) { $quarterly_tax = (float) getQuarterlyTax($tax_name, $q, $year, $mysqli); // Accumulate totals $quarterly_totals[$q] += $quarterly_tax; $grand_total += $quarterly_tax; $row_total += $quarterly_tax; echo ""; } echo ""; } echo ""; } // Totals row echo ""; echo ""; if ($view == 'monthly') { for ($i = 1; $i <= 12; $i++) { echo ""; } } else { for ($q = 1; $q <= 4; $q++) { echo ""; } } echo ""; echo ""; ?>
Tax Jan-MarApr-JunJul-SepOct-DecTotal
" . nullable_htmlentities($tax_name_raw) . "" . numfmt_format_currency($currency_format, $monthly_tax, $company_currency) . "" . numfmt_format_currency($currency_format, $row_total, $company_currency) . "" . numfmt_format_currency($currency_format, $quarterly_tax, $company_currency) . "" . numfmt_format_currency($currency_format, $row_total, $company_currency) . "
Total" . numfmt_format_currency($currency_format, $monthly_totals[$i], $company_currency) . "" . numfmt_format_currency($currency_format, $quarterly_totals[$q], $company_currency) . "" . numfmt_format_currency($currency_format, $grand_total, $company_currency) . "