Fixed numeric fields to accept user native number format.
[fa-stable.git] / gl / includes / ui / gl_deposit_ui.inc
index 3f65b68c531c47ff3dfa9ddc89c970abf040f07b..e1dece6bcaf9e8549b26ea284a2bd3678ba8add4 100644 (file)
@@ -166,7 +166,7 @@ function gl_edit_item_controls(&$order, $dim, $Index=null)
                if (!isset($_POST['dimension2_id']))
                        $_POST['dimension2_id'] = $order->gl_items[$Index]->dimension2_id;
                if (!isset($_POST['amount']) || ($_POST['amount'] == ""))
-                       $_POST['amount'] = -$order->gl_items[$Index]->amount;
+                       $_POST['amount'] = -price_format($order->gl_items[$Index]->amount);
                if (!isset($_POST['description']) || ($_POST['description'] == ""))
                        $_POST['description'] = $order->gl_items[$Index]->description;
                if (!isset($_POST['LineMemo']) || ($_POST['LineMemo'] == ""))
@@ -184,7 +184,7 @@ function gl_edit_item_controls(&$order, $dim, $Index=null)
        }
        else
        {
-               $_POST['amount'] = 0;
+               $_POST['amount'] = price_format(0);
                $_POST['dimension_id'] = 0;
                $_POST['dimension2_id'] = 0;
                $_POST['LineMemo'] = "";