From f922ad5ff1ef1bb026c93bcd21f575bd70124d67 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 9 Apr 2010 08:58:31 +0000 Subject: [PATCH] Fix: error if used a futur date --- htdocs/fourn/commande/fiche.php | 4 ++++ htdocs/fourn/fournisseur.commande.class.php | 1 + 2 files changed, 5 insertions(+) diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 90e4dbdb2a9..1ca9c78ad2b 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -355,6 +355,10 @@ if ($_POST["action"] == 'livraison' && $user->rights->fournisseur->commande->rec Header("Location: fiche.php?id=".$id); exit; } + else if($result == -3) + { + $mesg='
'.$langs->trans("NotAuthorized").'
'; + } else { dol_print_error($db,$commande->error); diff --git a/htdocs/fourn/fournisseur.commande.class.php b/htdocs/fourn/fournisseur.commande.class.php index b738ae9b9b1..7ad16054373 100644 --- a/htdocs/fourn/fournisseur.commande.class.php +++ b/htdocs/fourn/fournisseur.commande.class.php @@ -1158,6 +1158,7 @@ class CommandeFournisseur extends Commande else { dol_syslog("CommandeFournisseur::Livraison Not Authorized"); + $result = -3; } return $result ; }