! Much better presentation of new Balance Sheet, P&L Statement and Monthly Breakdown.
$ /gl/includes/db/gl_db_account_types.inc
/gl/includes/db/gl_db_accounts.inc
+ /includes/types.inc
/reporting/rep705.php
/reporting/rep706.php
/reporting/rep707.php
+! New variable in config.php, $use_oldstyle_convert, if set to 1, same convert as in old versions.
+$ config.php
13-Jun-2009 Joe Hunt/Pete/Tom Moulton
! Changed next reference method to also include partly alpha characters in front, fi. WA036 increments to WA037
/* use Audit Trails in GL */
$use_audit_trail = 0;
+ /* use old style convert (income and expense in BS, PL) */
+ $use_oldstyle_convert = 0;
+
/* Integrated base Wiki Help URL or null if not used */
//$help_base_url = $path_to_root.'/modules/wiki/index.php?n='._('Help').'.';
$help_base_url = null;
}
}
+define('CL_NONE', 0); // for backward compatibility
define('CL_ASSETS', 1);
define('CL_LIABILITIES', 2);
define('CL_EQUITY', 3);
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);
}
$classname = $account['AccountClassName'];
$ctype = $account['ClassType'];
- $convert = (($ctype == CL_INCOME || $ctype == 0) ? -1 : 1); // backwards compatibility
+ $convert = get_class_type_convert($ctype);
if ($account['account_code'] != null)
{
}
$classname = $account['AccountClassName'];
$ctype = $account['ClassType'];
- $convert = (($ctype == CL_LIABILITIES || $ctype == CL_EQUITY || $ctype == 0) ? -1 : 1); // backwards compatibility
+ $convert = get_class_type_convert($ctype);
if ($account['account_code'] != null)
{
}
$classname = $account['AccountClassName'];
$ctype = $account['ClassType'];
- $convert = (($ctype == CL_INCOME || $ctype == 0) ? -1 : 1); // backwards compatibility
-
+ $convert = get_class_type_convert($ctype);
+
if ($account['account_code'] != null)
{
//$per_balance *= -1;