X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fgl_budget.php;h=cda847c2e29a1487b8e1028a4422692bc882057f;hb=0ad7b92c6cf2e4e65ca0fa94ba31f30f7b292ba8;hp=988e6026cb36c5c0f3ba86ba7ed8cd72a3304e2f;hpb=7e627484a9dbc0653469eb5ea22ba0cd2b036cc0;p=fa-stable.git diff --git a/gl/gl_budget.php b/gl/gl_budget.php index 988e6026..cda847c2 100644 --- a/gl/gl_budget.php +++ b/gl/gl_budget.php @@ -71,7 +71,7 @@ if (isset($_POST['add']) || isset($_POST['delete'])) for ($i = 0, $da = $_POST['begin']; date1_greater_date2($_POST['end'], $da); $i++) { if (isset($_POST['add'])) - add_update_gl_budget_trans($da, $_POST['account'], $_POST['dim1'], $_POST['dim2'], $_POST['amount'.$i]); + add_update_gl_budget_trans($da, $_POST['account'], $_POST['dim1'], $_POST['dim2'], input_num('amount'.$i)); else delete_gl_budget_trans($da, $_POST['account'], $_POST['dim1'], $_POST['dim2']); $da = add_months($da, 1); @@ -139,12 +139,12 @@ if (db_has_gl_accounts()) for ($i = 0, $date_ = $begin; date1_greater_date2($end, $date_); $i++) { start_row(); - $_POST['amount'.$i] = get_only_budget_trans_from_to($date_, $date_, $_POST['account'], $_POST['dim1'], $_POST['dim2']); + $_POST['amount'.$i] = number_format2(get_only_budget_trans_from_to($date_, $date_, $_POST['account'], $_POST['dim1'], $_POST['dim2']), 0); label_cell($date_); if (!isset($_POST['amount'.$i])) - $_POST['amount'.$i] = "0"; - text_cells(null, 'amount'.$i, null, 15); + $_POST['amount'.$i] = '0'; + amount_cells(null, 'amount'.$i, null, 15); if ($showdims) { $d = get_budget_trans_from_to($date_, $date_, $_POST['account'], $_POST['dim1'], $_POST['dim2']); @@ -152,7 +152,7 @@ if (db_has_gl_accounts()) $btotal += $d; } $lamount = get_gl_trans_from_to(add_years($date_, -1), add_years(end_month($date_), -1), $_POST['account'], $_POST['dim1'], $_POST['dim2']); - $total += $_POST['amount'.$i]; + $total += input_num('amount'.$i); $ltotal += $lamount; label_cell(number_format2($lamount, 0), "nowrap align=right"); $date_ = add_months($date_, 1); @@ -160,7 +160,7 @@ if (db_has_gl_accounts()) } start_row(); label_cell(""._("Total").""); - label_cell("".number_format2($total, 0).""); + label_cell("".number_format2($total, 0)."", 'align=right'); if ($showdims) label_cell("".number_format2($btotal, 0)."", "nowrap align=right"); label_cell("".number_format2($ltotal, 0)."", "nowrap align=right");