X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Ftypes.inc;h=8bf64e97ae9804f4eb9ab1ac6b6ebe68944ad435;hb=05f0481e5264c2a9154297adec74b4a64259e562;hp=e12efa0d088164faa73059d0a5b34f27e2354aba;hpb=1a5b277431e6804654cbca16aaed5ee3a5a729eb;p=fa-stable.git diff --git a/includes/types.inc b/includes/types.inc index e12efa0d..8bf64e97 100644 --- a/includes/types.inc +++ b/includes/types.inc @@ -309,6 +309,7 @@ class wo_types } } +define('CL_NONE', 0); // for backward compatibility define('CL_ASSETS', 1); define('CL_LIABILITIES', 2); define('CL_EQUITY', 3); @@ -325,6 +326,14 @@ $class_types = array( CL_EXPENSE => _("Expense"), ); +function get_class_type_convert($ctype) +{ + global $use_oldstyle_convert; + if (isset($use_oldstyle_convert) && $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); +} define('WO_LABOUR', 0); define('WO_OVERHEAD', 1);