+if ($selected_id != -1)
+{
+ display_heading(_("Quick Entry Lines") . " - " . $_POST['description']);
+ $result = get_quick_entry_lines($selected_id);
+ start_form();
+ start_table($table_style2);
+ $dim = get_company_pref('use_dimension');
+ if ($dim == 2)
+ $th = array(_("Account"), _("Use Tax"), _("Percent"), _("Amount"), _("Dimension"), _("Dimension")." 2", "", "");
+ else if ($dim == 1)
+ $th = array(_("Account"), _("Use Tax"), _("Percent"), _("Amount"), _("Dimension"), "", "");
+ else
+ $th = array(_("Account"), _("Use Tax"), _("Percent"), _("Amount"), "", "");
+ table_header($th);
+ $k = 0;
+ while ($myrow = db_fetch($result))
+ {
+ alt_table_row_color($k);
+ label_cell($myrow['account']." ".$myrow['account_name']);
+ $tax_text = ($myrow['tax_acc'] == 0 ? _("No") : _("Yes"));
+ label_cell($tax_text);
+ $pct_text = ($myrow['pct'] == 0 ? _("No") : _("Yes"));
+ label_cell($pct_text);
+ 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"));
+ edit_button_cell("BDel".$myrow["id"], _("Delete"));
+ end_row();
+ }
+ end_table();
+ hidden('selected_id', $selected_id);
+ hidden('selected_id2', $selected_id2);
+ hidden('description', $_POST['description']);
+ hidden('deposit', $_POST['deposit']);
+ hidden('bank_only', $_POST['bank_only']);
+ end_form();
+ start_form();
+
+ start_table($table_style2);
+
+ if ($selected_id2 != -1)
+ {
+ if ($Mode2 == 'BEd')
+ {
+ //editing an existing status code
+ $myrow = get_quick_entry_line($selected_id2);
+
+ $_POST['id'] = $myrow["id"];
+ $_POST['account'] = $myrow["account"];
+ $_POST['tax_acc'] = $myrow["tax_acc"];
+ $_POST['pct'] = $myrow["pct"];
+ $_POST['amount'] = $myrow["amount"];
+ $_POST['dimension_id'] = $myrow["dimension_id"];
+ $_POST['dimension2_id'] = $myrow["dimension2_id"];
+ }
+ }
+
+ gl_all_accounts_list_row(_("Account"), 'account', null, true);
+ yesno_list_row(_("Use Tax:"), 'tax_acc', null, "", "", false);
+ yesno_list_row(_("Use Percent:"), 'pct', null, "", "", false);
+ amount_row(_("Amount"), 'amount', null);
+ 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);
+ hidden('selected_id', $selected_id);
+ hidden('selected_id2', $selected_id2);
+ hidden('description', $_POST['description']);
+ hidden('deposit', $_POST['deposit']);
+ hidden('bank_only', $_POST['bank_only']);
+
+ submit_add_or_update_center2($selected_id2 == -1, '', true);
+
+ end_form();
+}