[0003239] Bank Account Inquiry: fixed missing counterparty info for some transactions.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Thu, 23 Jul 2015 09:34:34 +0000 (11:34 +0200)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Thu, 23 Jul 2015 09:36:27 +0000 (11:36 +0200)
gl/inquiry/bank_inquiry.php
includes/types.inc

index 577d234693021a2b63f6f60399b3f3fa53b4c8b9..d2196a2cf94db4549f42afcbd604e84c0eadbf8f 100644 (file)
@@ -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"]));
 
index dc2145eb9012051d5cafa0499ccb0bb05ae03f34..e1206bcf59f5f33c062afe1e6108bca38d1fb669 100644 (file)
@@ -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;