X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Ftypes.inc;h=f07b83b3cd56cebf84d314f3ab0480932af3faed;hb=95fd152649f9383cee8680762daf3430e8250bd6;hp=65805a901787bbeb8fbf5ddc9444a74629c212b8;hpb=5b8f4c4b4aa8cf996bc071f116bfce1273200fa2;p=fa-stable.git diff --git a/includes/types.inc b/includes/types.inc index 65805a90..f07b83b3 100644 --- a/includes/types.inc +++ b/includes/types.inc @@ -127,12 +127,10 @@ 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; return ''; } } @@ -186,8 +184,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 +241,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 // @@ -265,4 +267,5 @@ defined('ICON_VIEW') || define('ICON_VIEW', 'view.gif'); defined('ICON_SUBMIT') || define('ICON_SUBMIT', 'ok.gif'); defined('ICON_ESCAPE') || define('ICON_ESCAPE', 'escape.png'); defined('ICON_ALLOC') || define('ICON_ALLOC', 'alloc.png'); +defined('ICON_CLOSED') || define('ICON_CLOSED', 'closed.png');