* Copyright (C) 2010 Juanjo Menent * * 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, see . */ /** * \file htdocs/compta/bank/admin/bank.php * \ingroup bank * \brief Page to setup the bank module * \version $Id: bank.php,v 1.8 2011/07/31 22:23:31 eldy Exp $ */ require("../../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'); $langs->load("admin"); $langs->load("companies"); $langs->load("bills"); $langs->load("other"); $langs->load("banks"); if (!$user->admin) accessforbidden(); $typeconst=array('yesno','texte','chaine'); /* * Actions */ if ($_POST["action"] == 'set_BANK_CHEQUERECEIPT_FREE_TEXT') { dolibarr_set_const($db, "BANK_CHEQUERECEIPT_FREE_TEXT",$_POST["BANK_CHEQUERECEIPT_FREE_TEXT"],'chaine',0,'',$conf->entity); } //Order display of bank account if ($_GET["action"] == 'setbankorder') { if (dolibarr_set_const($db, "BANK_SHOW_ORDER_OPTION",$_GET["value"],'chaine',0,'',$conf->entity) > 0) { Header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { dol_print_error($db); } } /* * view */ llxHeader("",""); $html=new Form($db); $linkback=''.$langs->trans("BackToModuleList").''; print_fiche_titre($langs->trans("BankSetupModule"),$linkback,'setup'); print '
'; print ''; print ''; print ''; print ''; print ''; print "\n"; $var=true; $var=! $var; print ''; print ''; print ''; print '\n"; print '
'.$langs->trans("Parameters").'  
'; print $langs->trans("FreeLegalTextOnChequeReceipts").' ('.$langs->trans("AddCRIfTooLong").')
'; print ''; print '
'; print ''; print "
'; print "
"; /* $var=!$var; print ""; print ''; print ""; print ''; print $langs->trans("WatermarkOnDraftChequeReceipt").'
'; print ''; print ''; print ''; print "\n"; print ''; */ //Show bank account order print_titre($langs->trans("BankOrderShow")); print ''; print ''; print ''; print ''; print ''; print ''; print ''; print "\n"; $bankorder[0][0]=$langs->trans("BankOrderGlobal"); $bankorder[0][1]=$langs->trans("BankOrderGlobalDesc"); $bankorder[0][2]='BankCode DeskCode AccountNumber BankAccountNumberKey'; $bankorder[1][0]=$langs->trans("BankOrderES"); $bankorder[1][1]=$langs->trans("BankOrderESDesc"); $bankorder[1][2]='BankCode DeskCode BankAccountNumberKey AccountNumber'; $var = true; $i=0; while ($i < sizeof($bankorder)) { $var = !$var; print ''; print ''; print '\n"; if ($conf->global->BANK_SHOW_ORDER_OPTION == $i) { print ''; } else { print ''; } print ''; print "\n"; $i++; } print "
'.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Example").''.$langs->trans("Status").' 
'.$bankorder[$i][0]."\n"; print $bankorder[$i][1]; print ''; $tmparray=explode(' ',$bankorder[$i][2]); foreach($tmparray as $key => $val) { if ($key > 0) print ', '; print $langs->trans($val); } print "'; print img_picto($langs->trans("Activated"),'on'); print ''; print img_picto($langs->trans("Disabled"),'off'); print ' 
\n"; $db->close(); llxFooter('$Date: 2011/07/31 22:23:31 $ - $Revision: 1.8 $'); ?>