$js = '';
set_focus('account');
-if ($use_popup_windows)
+if ($SysPrefs->use_popup_windows)
$js .= get_js_open_window(800, 500);
-if ($use_date_picker)
+if (user_use_date_picker())
$js .= get_js_date_picker();
page(_($help_context = "Tax Inquiry"), false, false, '', $js);
start_table(TABLESTYLE_NOBORDER);
start_row();
- date_cells(_("from:"), 'TransFromDate', '', null, -$_SESSION["wa_current_user"]->prefs->transaction_days());
+ date_cells(_("from:"), 'TransFromDate', '', null, -user_transaction_days());
date_cells(_("to:"), 'TransToDate');
submit_cells('Show',_("Show"),'','', 'default');
function show_results()
{
- global $path_to_root;
-
/*Now get the transactions */
div_start('trans_tbl');
start_table(TABLESTYLE);
table_header($th);
$k = 0;
$total = 0;
- $bdate = date2sql($_POST['TransFromDate']);
- $edate = date2sql($_POST['TransToDate']);
$taxes = get_tax_summary($_POST['TransFromDate'], $_POST['TransToDate']);
{
$payable = $tx['payable'];
- $collectible = $tx['collectible'];
+ $collectible = -$tx['collectible'];
$net = $collectible + $payable;
$total += $net;
alt_table_row_color($k);
label_cell($tx['name'] . " " . $tx['rate'] . "%");
label_cell(_("Paid on purchases") . " (" . _("Input Tax")."):");
amount_cell($collectible);
- amount_cell($tx['net_input']);
+ amount_cell(-$tx['net_input']);
end_row();
alt_table_row_color($k);
label_cell("<b>".$tx['name'] . " " . $tx['rate'] . "%</b>");
end_page();
-?>