From 4333e96ecb49a6973d4f34a96410dc99b507b4b7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 4 Sep 2014 15:14:30 +0200 Subject: [PATCH] Fix: Reason to have button greyed is wrong --- htdocs/compta/facture/prelevement.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 8cc3ba278a4..d86b2148715 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -1,7 +1,7 @@ * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2010-2014 Juanjo Menent * @@ -142,7 +142,7 @@ if ($object->id > 0) /* * Facture - */ + */ print ''; $linkback = ''.$langs->trans("BackToList").''; @@ -396,7 +396,7 @@ if ($object->id > 0) print ''; print ''; } - + print ''; print ''; @@ -448,7 +448,7 @@ if ($object->id > 0) /* * Buttons - */ + */ print "\n
\n"; // Add a withdraw request @@ -465,7 +465,11 @@ if ($object->id > 0) } else { - if ($num == 0) print ''.$langs->trans("MakeWithdrawRequest").''; + if ($num == 0) + { + if ($object->statut > 0) print ''.$langs->trans("MakeWithdrawRequest").''; + else print ''.$langs->trans("MakeWithdrawRequest").''; + } else print ''.$langs->trans("MakeWithdrawRequest").''; }
'.price($object->total_localtax2).''.$langs->trans("Currency".$conf->currency).'
'.$langs->trans('AmountTTC').''.price($object->total_ttc).''.$langs->trans('Currency'.$conf->currency).'