Code cleanup (fixed parametr lists in gl_all_accounts_list_row and calls to subledger...
[fa-stable.git] / gl / includes / ui / gl_journal_ui.inc
index 67cbb15573112811d2fcff02df48a53c6eeff200..060524102a1fbafa49c2242418eae2a68481a745 100644 (file)
@@ -79,6 +79,16 @@ function display_order_header(&$Order)
        }
 
        check_row(_('Include in tax register:'), 'taxable_trans', null, true);
+        // Query the user to retain the reconciled status
+        if (!$new) {
+            $result = get_bank_trans(ST_JOURNAL, $Order->order_id);
+            $row = db_fetch($result);
+            if ($row
+                && $row['reconciled']) {
+                check_row(_('Reconciled:'), 'reconciled', 1, true);
+                hidden('reconciled_date', $row['reconciled']);
+            }
+        }
        end_outer_table(1);
 }
 
@@ -101,7 +111,7 @@ function display_gl_items($title, &$order)
        if ($dim == 2)
                $th = array(_("Account Code"), _("Account Description"), _("Dimension")." 1",
                        _("Dimension")." 2", _("Debit"), _("Credit"), _("Memo"), "");
-       else if ($dim == 1)
+       elseif ($dim == 1)
                $th = array(_("Account Code"), _("Account Description"), _("Dimension"),
                        _("Debit"), _("Credit"), _("Memo"), "");
        else
@@ -218,8 +228,7 @@ function gl_edit_item_controls(&$order, $dim, $sub_accounts, $Index=null)
                if (is_subledger_account(get_post('code_id')))
                {       // for home currency postings show all customers
                        $sel_cur = get_post('currency', $order->currency);
-                       subledger_list_cells(null, 'person_id', get_post('code_id'), null, false, false,
-                               get_company_currency() == $sel_cur  ? null : $sel_cur);
+                       subledger_list_cells(null, 'person_id', get_post('code_id'), null);
                } elseif ($order->has_sub_accounts())
                        label_cell('');
                if ($dim >= 1) 
@@ -236,8 +245,7 @@ function gl_edit_item_controls(&$order, $dim, $sub_accounts, $Index=null)
                {
                        // for home currency postings show all customers
                        $sel_cur = get_post('currency', $order->currency);
-                       subledger_list_cells(null, 'person_id', get_post('code_id'), null, false, false,
-                               get_company_currency() == $sel_cur  ? null : $sel_cur);
+                       subledger_list_cells(null, 'person_id', get_post('code_id'), null);
                }
                elseif ($order->has_sub_accounts())
                        label_cell('');
@@ -246,6 +254,7 @@ function gl_edit_item_controls(&$order, $dim, $sub_accounts, $Index=null)
                        dimensions_list_cells(null, 'dimension_id', null, true, " ", false, 1);
                if ($dim > 1)
                        dimensions_list_cells(null, 'dimension2_id', null, true, " ", false, 2);
+               $_POST['LineMemo'] = "";                        
        }
 
        if (get_post('_code_id_update'))