* Copyright (C) 2004-2005 Laurent Destailleur * Copyright (C) 2005 Simon Tosser * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ * $Source$ */ /** \file htdocs/admin/delais.php \brief Page d'administration des d?lais de retard \version $Revision$ */ require("./pre.inc.php"); $langs->load("admin"); $langs->load("orders"); $langs->load("propal"); $langs->load("contracts"); $langs->load("bills"); $langs->load("banks"); if (!$user->admin) accessforbidden(); if ( (isset($_POST["action"]) && $_POST["action"] == 'update') || (isset($_POST["action"]) && $_POST["action"] == 'updateedit') ) { //Conversion des jours en secondes dolibarr_set_const($db, "MAIN_DELAY_ACTIONS_TODO",$_POST["ActionsToDo"]); dolibarr_set_const($db, "MAIN_DELAY_ORDERS_TO_PROCESS",$_POST["OrdersToProcess"]); dolibarr_set_const($db, "MAIN_DELAY_PROPALS_TO_CLOSE",$_POST["PropalsToClose"]); dolibarr_set_const($db, "MAIN_DELAY_PROPALS_TO_BILL",$_POST["PropalsToBill"]); dolibarr_set_const($db, "MAIN_DELAY_NOT_ACTIVATED_SERVICES",$_POST["BoardNotActivatedServices"]); dolibarr_set_const($db, "MAIN_DELAY_RUNNING_SERVICES",$_POST["BoardRunningServices"]); dolibarr_set_const($db, "MAIN_DELAY_SUPPLIER_BILLS_TO_PAY",$_POST["SupplierBillsToPay"]); dolibarr_set_const($db, "MAIN_DELAY_CUSTOMER_BILLS_UNPAYED",$_POST["CustomerBillsUnpayed"]); dolibarr_set_const($db, "MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE",$_POST["TransactionsToConciliate"]); dolibarr_set_const($db, "MAIN_DELAY_MEMBERS",$_POST["Members"]); if ($_POST['action'] != 'updateedit') { Header("Location: delais.php"); } } llxHeader(); print_fiche_titre($langs->trans("DelaysOfToleranceBeforeWarning"),'','setup'); print $langs->transnoentities("DelaysOfToleranceDesc",img_warning())."
\n"; print "
\n"; $form = new Form($db); $countrynotdefined=''.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')'; if ((isset($_GET["action"]) && $_GET["action"] == 'edit') || (isset($_POST["action"]) && $_POST["action"] == 'updateedit') ) { /* * Edition des param?tres */ print ' '; print '
'; print ''; $var=true; print ''; print ''; // if (1 == 1) { $var=!$var; print ''; print ''; print ''; } if ($conf->commande->enabled) { $var=!$var; print ''; print ''; print ''; } if ($conf->propal->enabled) { $var=!$var; print ''; print ''; print ''; } if ($conf->propal->enabled) { $var=!$var; print ''; print ''; print ''; } if ($conf->service->enabled) { $var=!$var; print ''; print ''; print ''; } if ($conf->service->enabled) { $var=!$var; print ''; print ''; print ''; } if ($conf->fournisseur->enabled) { $var=!$var; print ''; print ''; print ''; } if ($conf->facture->enabled) { $var=!$var; print ''; print ''; print ''; } if ($conf->banque->enabled) { $var=!$var; print ''; print ''; print ''; } if ($conf->adherent->enabled) { $var=!$var; print ''; print ''; print ''; } print '
'.$langs->trans("DolibarrWorkBoard").''.$langs->trans("Value").'
'.img_object('','task').''.$langs->trans("DelaysOfToleranceActionsToDo").''; print ' ' . $langs->trans("days") . '
'.img_object('','order').''.$langs->trans("DelaysOfToleranceOrdersToProcess").''; print ' ' . $langs->trans("days") . '
'.img_object('','propal').''.$langs->trans("DelaysOfTolerancePropalsToClose").''; print ' ' . $langs->trans("days") . '
'.img_object('','propal').''.$langs->trans("DelaysOfTolerancePropalsToBill").''; print ' ' . $langs->trans("days") . '
'.img_object('','service').''.$langs->trans("DelaysOfToleranceNotActivatedServices").''; print ' ' . $langs->trans("days") . '
'.img_object('','service').''.$langs->trans("DelaysOfToleranceRunningServices").''; print ' ' . $langs->trans("days") . '
'.img_object('','bill').''.$langs->trans("DelaysOfToleranceSupplierBillsToPay").''; print ' ' . $langs->trans("days") . '
'.img_object('','bill').''.$langs->trans("DelaysOfToleranceCustomerBillsUnpayed").''; print ' ' . $langs->trans("days") . '
'.img_object('','account').''.$langs->trans("DelaysOfToleranceTransactionsToConciliate").''; print ' ' . $langs->trans("days") . '
'.img_object('','user').''.$langs->trans("DelaysOfToleranceMembers").''; print ' ' . $langs->trans("days") . '
'; print '
'; print '
'; print '
'; } else { /* * Affichage des parametres */ print ''; print ''; $var=true; $var=!$var; if (1== 1) { print ''; print ''; print ''; } if ($conf->commande->enabled) { $var=!$var; print ''; print ''; print ''; } if ($conf->propal->enabled) { $var=!$var; print ''; print ''; print ''; } if ($conf->propal->enabled) { $var=!$var; print ''; print ''; print ''; } if ($conf->service->enabled) { $var=!$var; print ''; print ''; print ''; } if ($conf->service->enabled) { $var=!$var; print ''; print ''; print ''; } if ($conf->fournisseur->enabled) { $var=!$var; print ''; print ''; print ''; } if ($conf->facture->enabled) { $var=!$var; print ''; print ''; print ''; } if ($conf->banque->enabled) { $var=!$var; print ''; print ''; print ''; } if ($conf->adherent->enabled) { $var=!$var; print ''; print ''; print ''; } print '
'.$langs->trans("DolibarrWorkBoard").''.$langs->trans("Value").'
'.img_object('','task').''.$langs->trans("DelaysOfToleranceActionsToDo").'' . ($conf->global->MAIN_DELAY_ACTIONS_TODO+0) . ' ' . $langs->trans("days") . '
'.img_object('','order').''.$langs->trans("DelaysOfToleranceOrdersToProcess").'' . ($conf->global->MAIN_DELAY_ORDERS_TO_PROCESS+0) . ' ' . $langs->trans("days") . '
'.img_object('','propal').''.$langs->trans("DelaysOfTolerancePropalsToClose").'' . ($conf->global->MAIN_DELAY_PROPALS_TO_CLOSE+0). ' ' . $langs->trans("days") . '
'.img_object('','propal').''.$langs->trans("DelaysOfTolerancePropalsToBill").'' . ($conf->global->MAIN_DELAY_PROPALS_TO_BILL+0) . ' ' . $langs->trans("days") . '
'.img_object('','service').''.$langs->trans("DelaysOfToleranceNotActivatedServices").'' . ($conf->global->MAIN_DELAY_NOT_ACTIVATED_SERVICES+0) . ' ' . $langs->trans("days") . '
'.img_object('','service').''.$langs->trans("DelaysOfToleranceRunningServices").'' . ($conf->global->MAIN_DELAY_RUNNING_SERVICES+0). ' ' . $langs->trans("days") . '
'.img_object('','bill').''.$langs->trans("DelaysOfToleranceSupplierBillsToPay").'' . ($conf->global->MAIN_DELAY_SUPPLIER_BILLS_TO_PAY+0) . ' ' . $langs->trans("days") . '
'.img_object('','bill').''.$langs->trans("DelaysOfToleranceCustomerBillsUnpayed").'' . ($conf->global->MAIN_DELAY_CUSTOMER_BILLS_UNPAYED+0) . ' ' . $langs->trans("days") . '
'.img_object('','account').''.$langs->trans("DelaysOfToleranceTransactionsToConciliate").'' . ($conf->global->MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE+0) . ' ' . $langs->trans("days") . '
'.img_object('','user').''.$langs->trans("DelaysOfToleranceMembers").'' . ($conf->global->MAIN_DELAY_MEMBERS+0) . ' ' . $langs->trans("days") . '
'; // Boutons d'action print '
'; print ''.$langs->trans("Edit").''; print '
'; } $db->close(); llxFooter('$Date$ - $Revision$'); ?>