X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Fpayment_terms.php;h=1dd5dc67d9b533af4a79efd18634046d4ebe76ec;hb=6db1cc793fa3d760f1ebff244af2ef8e8cb5d845;hp=6939c9bdce8e98b96167d90cd48e0710f5c3f256;hpb=a5242af68e65661edb7175412444dce536a7f311;p=fa-stable.git diff --git a/admin/payment_terms.php b/admin/payment_terms.php index 6939c9bd..1dd5dc67 100644 --- a/admin/payment_terms.php +++ b/admin/payment_terms.php @@ -9,7 +9,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ -$page_security = 10; +$page_security = 'SA_PAYTERMS'; $path_to_root=".."; include($path_to_root . "/includes/session.inc"); @@ -135,15 +135,20 @@ if ($Mode == 'Delete') if ($Mode == 'RESET') { $selected_id = -1; + $sav = get_post('show_inactive'); unset($_POST); + $_POST['show_inactive'] = $sav; } //------------------------------------------------------------------------------------------------- $sql = "SELECT * FROM ".TB_PREF."payment_terms"; +if (!check_value('show_inactive')) $sql .= " WHERE !inactive"; $result = db_query($sql,"could not get payment terms"); + start_form(); start_table($table_style); $th = array(_("Description"), _("Following Month On"), _("Due After (Days)"), "", ""); +inactive_control_column($th); table_header($th); $k = 0; //row colour counter @@ -172,6 +177,7 @@ while ($myrow = db_fetch($result)) label_cell($myrow["terms"]); label_cell($full_text); label_cell($after_text); + inactive_control_cell($myrow["terms_indicator"], $myrow["inactive"], 'payment_terms', "terms_indicator"); edit_button_cell("Edit".$myrow["terms_indicator"], _("Edit")); delete_button_cell("Delete".$myrow["terms_indicator"], _("Delete")); end_row(); @@ -179,14 +185,11 @@ while ($myrow = db_fetch($result)) } //END WHILE LIST LOOP -end_table(); -end_form(); -echo '
'; +inactive_control_row($th); +end_table(1); //------------------------------------------------------------------------------------------------- -start_form(); - start_table($table_style2); $day_in_following_month = $days_before_due = 0; @@ -203,6 +206,7 @@ if ($selected_id != -1) $_POST['terms'] = $myrow["terms"]; $days_before_due = $myrow["days_before_due"]; $day_in_following_month = $myrow["day_in_following_month"]; + unset($_POST['DayNumber']); } hidden('selected_id', $selected_id); } @@ -222,7 +226,7 @@ text_row_ex(_("Days (Or Day In Following Month):"), 'DayNumber', 3); end_table(1); -submit_add_or_update_center($selected_id == -1, '', true); +submit_add_or_update_center($selected_id == -1, '', 'both'); end_form();