projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed mysqli related warnings.
[fa-stable.git]
/
gl
/
inquiry
/
profit_loss.php
diff --git
a/gl/inquiry/profit_loss.php
b/gl/inquiry/profit_loss.php
index 8d9144d61c12f624fd19079ae3eedd6e8d9f63d7..f4a73e129b3147cc4076a14550264a9a71d5a620 100644
(file)
--- a/
gl/inquiry/profit_loss.php
+++ b/
gl/inquiry/profit_loss.php
@@
-21,7
+21,7
@@
include_once($path_to_root . "/includes/data_checks.inc");
include_once($path_to_root . "/gl/includes/gl_db.inc");
$js = "";
include_once($path_to_root . "/gl/includes/gl_db.inc");
$js = "";
-if (
$use_date_picker
)
+if (
user_use_date_picker()
)
$js = get_js_date_picker();
page(_($help_context = "Profit & Loss Drilldown"), false, false, "", $js);
$js = get_js_date_picker();
page(_($help_context = "Profit & Loss Drilldown"), false, false, "", $js);
@@
-164,12
+164,10
@@
function inquiry_controls()
if (!isset($_POST['TransToDate']))
$_POST['TransToDate'] = end_month($date);
if (!isset($_POST['TransFromDate']))
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');
date_cells(_("From:"), 'TransFromDate');
date_cells(_("To:"), 'TransToDate');
- //Compare Combo
- global $sel;
$sel = array(_("Accumulated"), _("Period Y-1"), _("Budget"));
echo "<td>"._("Compare to").":</td>\n";
echo "<td>";
$sel = array(_("Accumulated"), _("Period Y-1"), _("Budget"));
echo "<td>"._("Compare to").":</td>\n";
echo "<td>";
@@
-184,13
+182,15
@@
function inquiry_controls()
end_table();
hidden('AccGrp');
end_table();
hidden('AccGrp');
+
+ return $sel[get_post('Compare')];
}
//----------------------------------------------------------------------------------------------------
}
//----------------------------------------------------------------------------------------------------
-function display_profit_and_loss()
+function display_profit_and_loss(
$compare
)
{
{
- global $path_to_root
, $sel
;
+ global $path_to_root;
if (!isset($_POST['Dimension']))
$_POST['Dimension'] = 0;
if (!isset($_POST['Dimension']))
$_POST['Dimension'] = 0;
@@
-201,7
+201,6
@@
function display_profit_and_loss()
$from = $_POST['TransFromDate'];
$to = $_POST['TransToDate'];
$from = $_POST['TransFromDate'];
$to = $_POST['TransToDate'];
- $compare = $_POST['Compare'];
if (isset($_POST["AccGrp"]) && (strlen($_POST['AccGrp']) > 0))
$drilldown = 1; // Deeper Level
if (isset($_POST["AccGrp"]) && (strlen($_POST['AccGrp']) > 0))
$drilldown = 1; // Deeper Level
@@
-229,12
+228,12
@@
function display_profit_and_loss()
div_start('pl_tbl');
div_start('pl_tbl');
- start_table(TABLESTYLE, "width=
50%
");
+ start_table(TABLESTYLE, "width=
'50%'
");
$tableheader = "<tr>
<td class='tableheader'>" . _("Group/Account Name") . "</td>
<td class='tableheader'>" . _("Period") . "</td>
$tableheader = "<tr>
<td class='tableheader'>" . _("Group/Account Name") . "</td>
<td class='tableheader'>" . _("Period") . "</td>
- <td class='tableheader'>" . $
sel[$compare]
. "</td>
+ <td class='tableheader'>" . $
compare
. "</td>
<td class='tableheader'>" . _("Achieved %") . "</td>
</tr>";
<td class='tableheader'>" . _("Achieved %") . "</td>
</tr>";
@@
-332,12
+331,11
@@
function display_profit_and_loss()
start_form();
start_form();
-inquiry_controls();
+
$sel =
inquiry_controls();
-display_profit_and_loss();
+display_profit_and_loss(
$sel
);
end_form();
end_page();
end_form();
end_page();
-?>
\ No newline at end of file