diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php
index 159d2f7e296..c7016cbdf21 100644
--- a/htdocs/admin/facture.php
+++ b/htdocs/admin/facture.php
@@ -36,7 +36,14 @@ $typeconst=array('yesno','texte','chaine');
if ($_GET["action"] == 'set')
{
- if (dolibarr_set_const($db, "FACTURE_ADDON",$_GET["value"])) $facture_addon_var = $_GET["value"];
+ if (dolibarr_set_const($db, "FACTURE_ADDON",$_GET["value"]))
+ $facture_addon_var = $_GET["value"];
+}
+
+if ($_GET["action"] == 'dateforce')
+{
+ dolibarr_set_const($db, "FAC_FORCE_DATE_VALIDATION",$_GET["value"]);
+ Header("Location: facture.php");
}
if ($_POST["action"] == 'setribchq')
@@ -65,14 +72,13 @@ if ($_POST["action"] == 'update' || $_POST["action"] == 'add')
if ($_GET["action"] == 'delete')
{
- if (! dolibarr_del_const($db, $_GET["rowid"]));
- {
- print $db->error();
- }
+ if (! dolibarr_del_const($db, $_GET["rowid"]));
+ {
+ print $db->error();
+ }
}
-
-llxHeader();
+llxHeader('','Fiche commande','FactureConfiguration');
$dir = "../includes/modules/facture/";
@@ -102,7 +108,7 @@ while (($file = readdir($handle))!==false)
{
if (is_dir($dir.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS')
{
- $var = !$var;
+ $var = !$var;
print '
| ';
echo "$file";
print " | \n";
@@ -132,6 +138,42 @@ closedir($handle);
print '';
+print " ";
+print_titre("Date des factures");
+
+print '';
+print '';
+print '| '.$langs->trans("Description").' | ';
+print ''.$langs->trans("Activated").' | ';
+print ' | ';
+print " \n";
+
+print '| ';
+echo "Forcer la définition de la date des factures lors de la validation";
+
+print ' | ';
+
+if (defined("FAC_FORCE_DATE_VALIDATION") && FAC_FORCE_DATE_VALIDATION == "1")
+{
+ print ' ';
+ print ' | ';
+ print ''.$langs->trans("Désactiver").'';
+}
+else
+{
+ print ' ';
+ print ' | ';
+ print ''.$langs->trans("Activate").'';
+}
+print " | \n";
+
+
+
+
+print ' ';
+
+
+
/*
* PDF
*/
@@ -301,89 +343,6 @@ print " | L'option 'franchise' est utilis
print "";
print "";
-
-/*
- * Autres constantes
- */
-print ' ';
-print_titre("Autres constantes relatives aux factures");
-
-print '';
-print '';
-print '| '.$langs->trans("Name").' | ';
-print ''.$langs->trans("Value").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Note").' | ';
-print ''.$langs->trans("Actiion").' | ';
-print " \n";
-
-
-# Affiche lignes des constantes
-$form = new Form($db);
-$exclude="'FACTURE_ADDON','FACTURE_ADDON_PDF','FACTURE_CHQ_NUMBER','FACTURE_RIB_NUMBER','FACTURE_TVAOPTION'"; # Lignes exclues car affichées précédemment
-
-$sql = "SELECT rowid, name, value, type, note FROM llx_const ";
-$sql.= "WHERE name like 'FAC%' ";
-$sql.= "AND name not in ($exclude)";
-$sql.= "ORDER BY name ASC";
-$result = $db->query($sql);
-
-if ($result)
-{
- $num = $db->num_rows();
- $i = 0;
- $var=True;
-
- while ($i < $num)
- {
- $obj = $db->fetch_object( $i);
- $var=!$var;
-
- print '';
- $i++;
- }
-}
-
-print " \n";
-
-print " \n";
-
$db->close();
llxFooter("Dernière modification $Date$ révision $Revision$");
|