From: Janusz Dobrowolski Date: Thu, 23 Jul 2015 09:34:34 +0000 (+0200) Subject: [0003239] Bank Account Inquiry: fixed missing counterparty info for some transactions. X-Git-Tag: v2.4.2~19^2~154 X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=4dca8e81d2eaa5a4630529ed2c4dea490f3a2fa4 [0003239] Bank Account Inquiry: fixed missing counterparty info for some transactions. --- diff --git a/gl/inquiry/bank_inquiry.php b/gl/inquiry/bank_inquiry.php index 577d2346..d2196a2c 100644 --- a/gl/inquiry/bank_inquiry.php +++ b/gl/inquiry/bank_inquiry.php @@ -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"])); diff --git a/includes/types.inc b/includes/types.inc index dc2145eb..e1206bcf 100644 --- a/includes/types.inc +++ b/includes/types.inc @@ -127,9 +127,9 @@ function payment_person_name($type, $person_id, $full=true) { global $wo_cost_types; return $wo_cost_types[$person_id]; case PT_CUSTOMER : - return ($full ?$payment_person_types[$type] . " ":"") . get_customer_name($person_id); + return ($full ?$payment_person_types[$type] . " ":"") . sprintf("[%05s] %s", $person_id, get_customer_name($person_id)); case PT_SUPPLIER : - return ($full ? $payment_person_types[$type] . " ":"") . get_supplier_name($person_id); + return ($full ? $payment_person_types[$type] . " ":"") . sprintf("[%05s] %s", $person_id, get_supplier_name($person_id)); default : //DisplayDBerror("Invalid type sent to person_name"); //return;