[0003239] Bank Account Inquiry: fixed missing counterparty info for some transactions.
[fa-stable.git] / includes / types.inc
index 6f6744dd9f64c874139b9542d55a5ac698e6e3cc..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;
@@ -186,8 +186,9 @@ define('CL_EXPENSE', 6);
 
 function get_class_type_convert($ctype)
 {
-       global $use_oldstyle_convert;
-       if (isset($use_oldstyle_convert) && $use_oldstyle_convert == 1)
+       global $SysPrefs;
+
+       if (isset($SysPrefs->use_oldstyle_convert) && $SysPrefs->use_oldstyle_convert == 1)
                return (($ctype >= CL_INCOME || $ctype == CL_NONE) ? -1 : 1);
        else    
                return ((($ctype >= CL_LIABILITIES && $ctype <= CL_INCOME) || $ctype == CL_NONE) ? -1 : 1);
@@ -242,6 +243,9 @@ define('BO_SUPPLIER', 3);
 
 include_once($path_to_root . '/includes/sysnames.inc');
 
+// tax register type
+define('TR_OUTPUT', 0); // sales
+define('TR_INPUT', 1); // purchase
 //---------------------------------------------------------------------------------
 // Constants optionally redefined locally
 //
@@ -266,4 +270,3 @@ defined('ICON_SUBMIT') || define('ICON_SUBMIT', 'ok.gif');
 defined('ICON_ESCAPE') || define('ICON_ESCAPE', 'escape.png');
 defined('ICON_ALLOC') || define('ICON_ALLOC', 'alloc.png');
 
-?>
\ No newline at end of file