X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Finquiry%2Fprofit_loss.php;h=1543bddc1ba102842f8f071865bf58660b0e72b0;hb=52f4ea3f7360e1284b1cf1cd39b2efda6ff0606f;hp=4022e968f7ccb89a2082b90cf2bb377f445b6225;hpb=0c1ab57c09d87eed2bd248892dbfe3f256767a82;p=fa-stable.git diff --git a/gl/inquiry/profit_loss.php b/gl/inquiry/profit_loss.php index 4022e968..1543bddc 100644 --- a/gl/inquiry/profit_loss.php +++ b/gl/inquiry/profit_loss.php @@ -26,6 +26,11 @@ if (user_use_date_picker()) page(_($help_context = "Profit & Loss Drilldown"), false, false, "", $js); +$compare_types = array( + _("Accumulated"), + _("Period Y-1"), + _("Budget") +); //---------------------------------------------------------------------------------------------------- // Ajax updates @@ -50,7 +55,7 @@ if (isset($_GET["AccGrp"])) //---------------------------------------------------------------------------------------------------- function display_type ($type, $typename, $from, $to, $begin, $end, $compare, $convert, - &$dec, &$pdec, &$rep, $dimension=0, $dimension2=0, $drilldown, $path_to_root) + $dimension=0, $dimension2=0, $drilldown, $path_to_root) { global $levelptr, $k; @@ -63,7 +68,7 @@ function display_type ($type, $typename, $from, $to, $begin, $end, $compare, $co //Get Accounts directly under this group/type $result = get_gl_accounts(null, null, $type); - + while ($account=db_fetch($result)) { $per_balance = get_gl_trans_from_to($from, $to, $account["account_code"], $dimension, $dimension2); @@ -101,7 +106,7 @@ function display_type ($type, $typename, $from, $to, $begin, $end, $compare, $co while ($accounttype=db_fetch($result)) { $totals_arr = display_type($accounttype["id"], $accounttype["name"], $from, $to, $begin, $end, - $compare, $convert, $dec, $pdec, $rep, $dimension, $dimension2, $drilldown, $path_to_root); + $compare, $convert, $dimension, $dimension2, $drilldown, $path_to_root); $per_balance_total += $totals_arr[0]; $acc_balance_total += $totals_arr[1]; } @@ -157,6 +162,8 @@ function Achieve($d1, $d2) function inquiry_controls() { + global $compare_types; + $dim = get_company_pref('use_dimension'); start_table(TABLESTYLE_NOBORDER); @@ -164,17 +171,15 @@ function inquiry_controls() if (!isset($_POST['TransToDate'])) $_POST['TransToDate'] = end_month($date); if (!isset($_POST['TransFromDate'])) - $_POST['TransFromDate'] = add_days(end_month($date), -$_SESSION["wa_current_user"]->prefs->transaction_days()); + $_POST['TransFromDate'] = add_days(end_month($date), -user_transaction_days()); date_cells(_("From:"), 'TransFromDate'); date_cells(_("To:"), 'TransToDate'); - //Compare Combo - global $sel; - $sel = array(_("Accumulated"), _("Period Y-1"), _("Budget")); echo "