projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[0000095] Bad behaviour of routine number_format and round in Windows.
[fa-stable.git]
/
purchasing
/
includes
/
ui
/
invoice_ui.inc
diff --git
a/purchasing/includes/ui/invoice_ui.inc
b/purchasing/includes/ui/invoice_ui.inc
index d72b0dcb95ec4d6697b325dab191bab0dc7a6ebf..88fcfd59bbee596a76618bb28e059acc86643a45 100644
(file)
--- a/
purchasing/includes/ui/invoice_ui.inc
+++ b/
purchasing/includes/ui/invoice_ui.inc
@@
-27,7
+27,7
@@
function copy_to_trans(&$supp_trans)
{
foreach ( $supp_trans->grn_items as $grn)
{
{
foreach ( $supp_trans->grn_items as $grn)
{
- $supp_trans->ov_amount += round(($grn->this_quantity_inv * $grn->chg_price),
+ $supp_trans->ov_amount += round
2
(($grn->this_quantity_inv * $grn->chg_price),
user_price_dec());
}
}
user_price_dec());
}
}
@@
-344,9
+344,9
@@
function display_grn_items_for_selection(&$supp_trans, $k)
null, null, $dec);
amount_cells(null, 'ChgPrice'.$n, price_format($myrow["unit_price"]));
if ($supp_trans->is_invoice)
null, null, $dec);
amount_cells(null, 'ChgPrice'.$n, price_format($myrow["unit_price"]));
if ($supp_trans->is_invoice)
- amount_cell(round($myrow["unit_price"] * ($myrow["qty_recd"] - $myrow["quantity_inv"]), user_price_dec()));
+ amount_cell(round
2
($myrow["unit_price"] * ($myrow["qty_recd"] - $myrow["quantity_inv"]), user_price_dec()));
else
else
- amount_cell(round($myrow["unit_price"] * max($myrow['quantity_inv'], 0), user_price_dec()));
+ amount_cell(round
2
($myrow["unit_price"] * max($myrow['quantity_inv'], 0), user_price_dec()));
if ($supp_trans->is_invoice)
submit_cells('grn_item_id'.$n, _("Add"), '', _("Add to Invoice"), true);
else
if ($supp_trans->is_invoice)
submit_cells('grn_item_id'.$n, _("Add"), '', _("Add to Invoice"), true);
else
@@
-460,7
+460,7
@@
function display_grn_items(&$supp_trans, $mode=0)
}
qty_cell(abs($entered_grn->this_quantity_inv), true, $dec);
amount_cell($entered_grn->chg_price);
}
qty_cell(abs($entered_grn->this_quantity_inv), true, $dec);
amount_cell($entered_grn->chg_price);
- amount_cell( round($entered_grn->chg_price * abs($entered_grn->this_quantity_inv), user_price_dec()), true);
+ amount_cell( round
2
($entered_grn->chg_price * abs($entered_grn->this_quantity_inv), user_price_dec()), true);
if ($mode == 1)
{
if ($mode == 1)
{
@@
-470,7
+470,7
@@
function display_grn_items(&$supp_trans, $mode=0)
}
end_row();
}
end_row();
- $total_grn_value += round($entered_grn->chg_price * abs($entered_grn->this_quantity_inv),
+ $total_grn_value += round
2
($entered_grn->chg_price * abs($entered_grn->this_quantity_inv),
user_price_dec());
$i++;
user_price_dec());
$i++;