Fixed net value calculations for GRN leading to unbalanced clearing account.
[fa-stable.git] / gl / includes / ui / gl_bank_ui.inc
index 7ea96e1f6c4f53de415b714c98d4bb6f9222c43c..981569c420943b06583a958f3daa11ad14bdd664 100644 (file)
@@ -17,7 +17,7 @@ function display_bank_header(&$order)
        $customer_error = false;
        div_start('pmt_header');
 
-       start_outer_table(TABLESTYLE2, "width=90%"); // outer table
+       start_outer_table(TABLESTYLE2, "width='90%'"); // outer table
 
        table_section(1);
        
@@ -146,7 +146,7 @@ function display_gl_items($title, &$order)
        display_heading($title);
 
     div_start('items_table');
-       start_table(TABLESTYLE, "colspan=7 width=95%");
+       start_table(TABLESTYLE, "width='95%'");
 
        if ($dim == 2)
                $th = array(_("Account Code"), _("Account Description"), _("Dimension")." 1",
@@ -305,7 +305,7 @@ function gl_options_controls($order)
        if ($person_curr != $bank_curr)
        {
                $_POST['settled_amount'] =
-                       price_format($order->gl_items_total() / get_exchange_rate_from_to($bank_curr, $person_curr, get_post('date_')));
+                       price_format(abs($order->gl_items_total() / get_exchange_rate_from_to($bank_curr, $person_curr, get_post('date_'))));
                amount_row($type == PT_CUSTOMER ? _("Settled AR Amount:") :  _("Settled AP Amount:"),
                         'settled_amount', null, null, $person_curr, user_price_dec());
        }