Redundant sql sentences in Report Filters.
[fa-stable.git] / gl / inquiry / bank_inquiry.php
index efc0fd406065721012908991019f7fed759e839a..d2196a2cf94db4549f42afcbd604e84c0eadbf8f 100644 (file)
@@ -47,7 +47,7 @@ start_table(TABLESTYLE_NOBORDER);
 start_row();
 bank_accounts_list_cells(_("Account:"), 'bank_account', null);
 
-date_cells(_("From:"), 'TransAfterDate', '', null, -$_SESSION["wa_current_user"]->prefs->transaction_days());
+date_cells(_("From:"), 'TransAfterDate', '', null, -user_transaction_days());
 date_cells(_("To:"), 'TransToDate');
 
 submit_cells('Show',_("Show"),'','', 'default');
@@ -103,7 +103,9 @@ while ($myrow = db_fetch($result))
        label_cell($trandate);
        display_debit_or_credit_cells($myrow["amount"]);
        amount_cell($running_total);
-       label_cell(get_counterparty_name($myrow["type"], $myrow["trans_no"]));
+
+       label_cell(payment_person_name($myrow["person_type_id"],$myrow["person_id"]));
+
        label_cell(get_comments_string($myrow["type"], $myrow["trans_no"]));
        label_cell(get_gl_view_str($myrow["type"], $myrow["trans_no"]));