From 36c0d76dc9c355b1e1e90e37da13b205c3619416 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Jun 2006 21:04:12 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20Un=20avoir=20est=20en=20fait=20une=20fac?= =?UTF-8?q?ture=20n=E9gative.=20Les=20avoirs=20on=20le=20meme=20module=20d?= =?UTF-8?q?e=20num=E9rotation=20que=20les=20factures.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/admin/avoir.php | 84 +--------------------------------------- htdocs/admin/facture.php | 1 + 2 files changed, 2 insertions(+), 83 deletions(-) diff --git a/htdocs/admin/avoir.php b/htdocs/admin/avoir.php index e04dd601b0c..5662a9f7f7a 100644 --- a/htdocs/admin/avoir.php +++ b/htdocs/admin/avoir.php @@ -31,6 +31,7 @@ require("./pre.inc.php"); $langs->load("admin"); +$langs->load("companies"); $langs->load("bills"); $langs->load("other"); @@ -88,20 +89,6 @@ if ($_GET["action"] == 'setdoc') } } -if ($_GET["action"] == 'setmod') -{ - // \todo Verifier si module numerotation choisi peut etre activé - // par appel methode canBeActivated - - - - if (dolibarr_set_const($db, "AVOIR_ADDON",$_GET["value"])) - { - // la constante qui a été lue en avant du nouveau set - // on passe donc par une variable pour avoir un affichage cohérent - $conf->global->AVOIR_ADDON = $_GET["value"]; - } -} /* @@ -126,75 +113,6 @@ $h++; dolibarr_fiche_head($head, $hselected, $langs->trans("ModuleSetup")); -/* - * Module numérotation - */ - -print_titre($langs->trans("DiscountsNumberingModules")); - -print ''; -print ''; -print '\n"; -print '\n"; -print '\n"; -print ''; -print ''; -print ''."\n"; - -clearstatcache(); - -$handle = opendir($dir); - -$var=true; -if ($handle) -{ - $var=true; - while (($file = readdir($handle))!==false) - { - if (substr($file, 0, 10) == 'mod_avoir_' && substr($file, strlen($file)-3, 3) == 'php') - { - $file = substr($file, 0, strlen($file)-4); - - require_once(DOL_DOCUMENT_ROOT ."/avoir/modules/".$file.".php"); - - $module = new $file; - - $var=!$var; - print '\n"; - - // Affiche example - print ''; - - print ''; - - // Info - $htmltooltip=''; - $nextval=$module->getNextValue(); - if ($nextval != $langs->trans("NotAvailable")) - { - $htmltooltip=''.$langs->trans("NextValue").': '.$nextval; - } - print ''; - - print "\n"; - } - } - closedir($handle); -} -print "
'.$langs->trans("Name")."'.$langs->trans("Description")."'.$langs->trans("Example")."'.$langs->trans("Activated").''.$langs->trans("Info").'
'.$module->nom."\n"; - print "\n ".$module->info()."'.$module->getExample().''; - if ($conf->global->FACTURE_ADDON == "$file") - { - print img_tick($langs->trans("Activated")); - } - else - { - print ''.$langs->trans("Default").''; - } - print 'tooltip_properties($htmltooltip).'>'; - print ($htmltooltip?img_help(0):''); - print '

\n"; - /* * Modeles de documents diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index 9e23814e9c5..5ee1415a672 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -32,6 +32,7 @@ require("./pre.inc.php"); $langs->load("admin"); +$langs->load("companies"); $langs->load("bills"); $langs->load("other");