+
+if ($selected_id != -1)
+{
+ display_heading(_("Quick Entry Lines") . " - " . $_POST['description']);
+ $result = get_quick_entry_lines($selected_id);
+ start_form();
+ start_table(TABLESTYLE2);
+ $dim = get_company_pref('use_dimension');
+ if ($dim == 2)
+ $th = array(_("Post"), _("Account/Tax Type"), _("Amount"), _("Dimension"), _("Dimension")." 2", "", "");
+ elseif ($dim == 1)
+ $th = array(_("Post"), _("Account/Tax Type"), _("Amount"), _("Dimension"), "", "");
+ else
+ $th = array(_("Post"), _("Account/Tax Type"), _("Amount"), "", "");
+
+ table_header($th);
+ $k = 0;
+ while ($myrow = db_fetch($result))
+ {
+ alt_table_row_color($k);
+
+ label_cell($quick_actions[$myrow['action']]);
+
+ $act_type = strtolower(substr($myrow['action'], 0, 1));
+
+ if ($act_type == 't')
+ {
+ label_cells($myrow['tax_name'], '');
+ }
+ else
+ {
+ label_cell($myrow['dest_id'].' '.$myrow['account_name']);
+ if ($act_type == '=')
+ label_cell('');
+ elseif ($act_type == '%')
+ label_cell(number_format2($myrow['amount'], user_exrate_dec()), "nowrap align=right ");
+ else
+ amount_cell($myrow['amount']);
+ }
+ if ($dim >= 1)
+ label_cell(get_dimension_string($myrow['dimension_id'], true));
+ if ($dim > 1)
+ label_cell(get_dimension_string($myrow['dimension2_id'], true));
+ edit_button_cell("BEd".$myrow["id"], _("Edit"));
+ delete_button_cell("BDel".$myrow["id"], _("Delete"));
+ end_row();
+ }
+ end_table(1);
+ hidden('selected_id', $selected_id);
+ hidden('selected_id2', $selected_id2);
+ hidden('description', $_POST['description']);
+ hidden('type', $_POST['type']);
+ end_form();
+ start_form();
+
+ div_start('edit_line');
+ start_table(TABLESTYLE2);
+
+ if ($selected_id2 != -1)
+ {
+ if ($Mode2 == 'BEd')
+ {
+ //editing an existing status code
+ $myrow = get_quick_entry_line($selected_id2);
+
+ $_POST['id'] = $myrow["id"];
+ $_POST['dest_id'] = $myrow["dest_id"];
+ $_POST['actn'] = $myrow["action"];
+ $_POST['amount'] = $myrow["amount"];
+ $_POST['dimension_id'] = $myrow["dimension_id"];
+ $_POST['dimension2_id'] = $myrow["dimension2_id"];
+ }
+ }
+
+ quick_actions_list_row(_("Posted").":",'actn', null, true);
+ if (list_updated('actn'))
+ $Ajax->activate('edit_line');
+
+ $actn = strtolower(substr($_POST['actn'],0,1));
+
+ if ($actn == 't')
+ {
+ //item_tax_types_list_row(_("Item Tax Type").":",'dest_id', null);
+ tax_types_list_row(_("Tax Type").":", 'dest_id', null);
+ }
+ else
+ {
+ gl_all_accounts_list_row(_("Account").":", 'dest_id', null, $_POST['type'] == QE_DEPOSIT || $_POST['type'] == QE_PAYMENT);
+ if ($actn != '=')
+ {
+ if ($actn == '%')
+ small_amount_row(_("Part").":", 'amount', price_format(0), null, "%", user_exrate_dec());
+ else
+ amount_row(_("Amount").":", 'amount', price_format(0));
+ }
+ }
+ if ($dim >= 1)
+ dimensions_list_row(_("Dimension").":", 'dimension_id', null, true, " ", false, 1);
+ if ($dim > 1)
+ dimensions_list_row(_("Dimension")." 2:", 'dimension2_id', null, true, " ", false, 2);
+
+ end_table(1);
+ if ($dim < 2)
+ hidden('dimension2_id', 0);
+ if ($dim < 1)
+ hidden('dimension_id', 0);
+ div_end();
+
+ hidden('selected_id', $selected_id);
+ hidden('selected_id2', $selected_id2);
+ hidden('description', $_POST['description']);
+ hidden('type', $_POST['type']);
+
+ submit_add_or_update_center2($selected_id2 == -1, '', true);
+
+ end_form();
+}