X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fincludes%2Fui%2Fgl_journal_ui.inc;h=5a27c53cd2f15721e70ca4837be20820f1233c6f;hb=6571578cace314a46f71d9cda50c45bbde0e2abe;hp=e769d36fdacb172e0b15fc5d4d73330d8c906137;hpb=e91772a2716825a6aeb358d1defba47d5f3892c1;p=fa-stable.git diff --git a/gl/includes/ui/gl_journal_ui.inc b/gl/includes/ui/gl_journal_ui.inc index e769d36f..5a27c53c 100644 --- a/gl/includes/ui/gl_journal_ui.inc +++ b/gl/includes/ui/gl_journal_ui.inc @@ -16,7 +16,7 @@ include_once($path_to_root . "/includes/ui/items_cart.inc"); function display_order_header(&$Order) { - global $table_style2; + global $table_style2, $Ajax; $qes = has_quick_entries(QE_JOURNAL); @@ -84,9 +84,9 @@ function display_gl_items($title, &$order) $k = 0; $id = find_submit('Edit'); - foreach ($order->gl_items as $item) + foreach ($order->gl_items as $line => $item) { - if ($id != $item->index) + if ($id != $line) { alt_table_row_color($k); @@ -107,15 +107,15 @@ function display_gl_items($title, &$order) } label_cell($item->reference); - edit_button_cell("Edit$item->index", _("Edit"), + edit_button_cell("Edit$line", _("Edit"), _('Edit journal line')); - delete_button_cell("Delete$item->index", _("Delete"), + delete_button_cell("Delete$line", _("Delete"), _('Remove line from journal')); end_row(); } else { - gl_edit_item_controls($order, $dim, $item->index); + gl_edit_item_controls($order, $dim, $line); } } @@ -129,6 +129,7 @@ function display_gl_items($title, &$order) label_cell(_("Total"), "align=right colspan=" . $colspan); amount_cell($order->gl_items_total_debit()); amount_cell(abs($order->gl_items_total_credit())); + label_cell('', "colspan=3"); end_row(); } @@ -163,7 +164,7 @@ function gl_edit_item_controls(&$order, $dim, $Index=null) $_POST['description'] = $item->description; $_POST['LineMemo'] = $item->reference; - hidden('Index', $item->index); + hidden('Index', $id); hidden('code_id', $item->code_id); label_cell($_POST['code_id']); label_cell($item->description);