X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Finquiry%2Fprofit_loss.php;fp=gl%2Finquiry%2Fprofit_loss.php;h=46b8f44bb98b31062f212e105597a0a04ff638b4;hb=46c5f7a65a7659a44ae8254c63152074363d3987;hp=e20fae1ac33e3404189b08a6fb456b61083724ab;hpb=35f482e2a9246960de37e5f1d975c734e08951e6;p=fa-stable.git diff --git a/gl/inquiry/profit_loss.php b/gl/inquiry/profit_loss.php index e20fae1a..46b8f44b 100644 --- a/gl/inquiry/profit_loss.php +++ b/gl/inquiry/profit_loss.php @@ -40,6 +40,10 @@ if (isset($_GET["TransToDate"])) $_POST["TransToDate"] = $_GET["TransToDate"]; if (isset($_GET["Compare"])) $_POST["Compare"] = $_GET["Compare"]; +if (isset($_GET["Dimension"])) + $_POST["Dimension"] = $_GET["Dimension"]; +if (isset($_GET["Dimension2"])) + $_POST["Dimension2"] = $_GET["Dimension2"]; if (isset($_GET["AccGrp"])) $_POST["AccGrp"] = $_GET["AccGrp"]; @@ -74,7 +78,7 @@ function display_type ($type, $typename, $from, $to, $begin, $end, $compare, $co if ($drilldown && $levelptr == 0) { $url = "" . $account['account_code'] ." ". $account['account_name'] .""; @@ -122,7 +126,7 @@ function display_type ($type, $typename, $from, $to, $begin, $end, $compare, $co //elseif ($drilldown && $type != $_POST["AccGrp"]) { $url = "" . $typename .""; alt_table_row_color($k); @@ -153,7 +157,8 @@ function Achieve($d1, $d2) function inquiry_controls() { - start_table("class='tablestyle_noborder'"); + $dim = get_company_pref('use_dimension'); + start_table(TABLESTYLE_NOBORDER); date_cells(_("From:"), 'TransFromDate', '', null, -30); date_cells(_("To:"), 'TransToDate'); @@ -165,6 +170,10 @@ function inquiry_controls() echo ""; echo array_selector('Compare', null, $sel); echo "\n"; + if ($dim >= 1) + dimensions_list_cells(_("Dimension")." 1:", 'Dimension', null, true, " ", false, 1); + if ($dim > 1) + dimensions_list_cells(_("Dimension")." 2:", 'Dimension2', null, true, " ", false, 2); submit_cells('Show',_("Show"),'','', 'default'); end_table(); @@ -176,10 +185,14 @@ function inquiry_controls() function display_profit_and_loss() { - global $comp_path, $path_to_root, $table_style, $sel; + global $path_to_root, $sel; - $dim = get_company_pref('use_dimension'); - $dimension = $dimension2 = 0; + if (!isset($_POST['Dimension'])) + $_POST['Dimension'] = 0; + if (!isset($_POST['Dimension2'])) + $_POST['Dimension2'] = 0; + $dimension = $_POST['Dimension']; + $dimension2 = $_POST['Dimension2']; $from = $_POST['TransFromDate']; $to = $_POST['TransToDate']; @@ -211,7 +224,7 @@ function display_profit_and_loss() div_start('pl_tbl'); - start_table("width=50% $table_style"); + start_table(TABLESTYLE, "width=50%"); $tableheader = " " . _("Group/Account Name") . " @@ -252,7 +265,7 @@ function display_profit_and_loss() if ($TypeTotal[0] != 0 || $TypeTotal[1] != 0 ) { $url = "" . $accounttype['name'] .""; alt_table_row_color($k);