'; //------------------------------------------------------------------------------------------------- start_form(); start_table("$table_style2 width=40%"); if ($selected_id != -1) { if ($Mode == 'Edit') { //editing an existing area $sql = "SELECT * FROM ".TB_PREF."recurrent_invoices WHERE id='$selected_id'"; $result = db_query($sql,"could not get recurrent invoice"); $myrow = db_fetch($result); $_POST['description'] = $myrow["description"]; $_POST['order_no'] = $myrow["order_no"]; $_POST['debtor_no'] = $myrow["debtor_no"]; $_POST['group_no'] = $myrow["group_no"]; $_POST['days'] = $myrow["days"]; $_POST['monthly'] = $myrow["monthly"]; $_POST['begin'] = sql2date($myrow["begin"]); $_POST['end'] = sql2date($myrow["end"]); } hidden("selected_id", $selected_id); } text_row_ex(_("Description:"), 'description', 50); templates_list_row(_("Template:"), 'order_no'); customer_list_row(_("Customer:"), 'debtor_no', null, " ", true); if ($_POST['debtor_no'] > 0) customer_branches_list_row(_("Branch:"), $_POST['debtor_no'], 'group_no', null, false); else sales_groups_list_row(_("Sales Group:"), 'group_no', null, " "); small_amount_row(_("Days:"), 'days', 0, null, null, 0); small_amount_row(_("Monthly:"), 'monthly', 0, null, null, 0); date_row(_("Begin:"), 'begin'); date_row(_("End:"), 'end', null, null, 0, 0, 5); end_table(1); submit_add_or_update_center($selected_id == -1, '', true); end_form(); end_page(); ?>