diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index e6a40e1b027..678f6db3909 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -503,9 +503,8 @@ if ($action == 'create' && !$error) print "\n"; } - //Mode liste -if (($action != 'create' && $action != 'add') || !$error) +if (($action != 'create' && $action != 'add') && !$error) { llxHeader(); ?> diff --git a/htdocs/fourn/commande/orderstoinvoice.php b/htdocs/fourn/commande/orderstoinvoice.php index 6cd0dfb02c2..3fbe10f9b01 100644 --- a/htdocs/fourn/commande/orderstoinvoice.php +++ b/htdocs/fourn/commande/orderstoinvoice.php @@ -259,7 +259,7 @@ $formfile = new FormFile($db); $companystatic = new Societe($db); // Mode creation -if ($action == 'create' && empty($mesgs)) { +if ($action == 'create' && !$error) { llxHeader(); print_fiche_titre($langs->trans('NewBill')); @@ -380,7 +380,7 @@ if ($action == 'create' && empty($mesgs)) { } // Mode liste -if (($action != 'create' && $action != 'add') || ! empty($mesgs)) { +if (($action != 'create' && $action != 'add') && !$error) { llxHeader(); ?>