while ($myrow = db_fetch($result)) { alt_table_row_color($k); $type_text = $quick_entry_types[$myrow["type"]]; label_cell($myrow['description']); label_cell($type_text); edit_button_cell("Edit" . $myrow["id"], _("Edit")); delete_button_cell("Delete" . $myrow["id"], _("Delete")); end_row(); } end_table(1); //----------------------------------------------------------------------------------- div_start('qe'); start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { $myrow = get_quick_entry($selected_id); $_POST['id'] = $myrow["id"]; $_POST['description'] = $myrow["description"]; $_POST['type'] = $myrow["type"]; $_POST['base_desc'] = $myrow["base_desc"]; $_POST['bal_type'] = $myrow["bal_type"]; $_POST['base_amount'] = $myrow["bal_type"] ? $myrow["base_amount"] : price_format($myrow["base_amount"]); } hidden('selected_id', $selected_id); } text_row_ex(_("Description") . ':', 'description', 50, 60); quick_entry_types_list_row(_("Entry Type") . ':', 'type', null, true); if (get_post('type') == QE_JOURNAL) { yesno_list_row(_("Balance Based"), 'bal_type', null, _("Yes"), _("No"), true); } if (list_updated('bal_type') || list_updated('type')) {
hidden('PersonDetailID'); } $trans = get_customer_habit($_POST['person_id']); // take care of customers on hold if ($trans['dissallow_invoices'] != 0) { if ($payment) { $customer_error = true; display_error(_("This customer account is on hold.")); } else { display_warning(_("This customer account is on hold.")); } } break; case PT_QUICKENTRY: quick_entries_list_row(_("Type") . ":", 'person_id', null, $payment ? QE_PAYMENT : QE_DEPOSIT, true); $qid = get_quick_entry(get_post('person_id')); if (list_updated('person_id')) { unset($_POST['totamount']); // enable default $Ajax->activate('footer'); $Ajax->activate('totamount'); } amount_row($qid['base_desc'] . ":", 'totamount', price_format($qid['base_amount']), null, " " . submit('go', _("Go"), false, false, true)); break; case PT_EMPLOYEE: employee_list_row(_("Employee:"), 'person_id', null, false, true, false, true); break; case PT_IMC: //text_row("Sample", ''); sales_persons_list_row(_("IMC:"), 'person_id', null, false, true, false, true); break;