diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index e579bc21640536ab94bc7ff4e3f56cab98ee09fd..81505af34ee8800cb484318d08ddd90811cf899d 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com> - * Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es> * @@ -142,7 +142,7 @@ if ($object->id > 0) /* * Facture - */ + */ print '<table class="border" width="100%">'; $linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>'; @@ -450,7 +450,7 @@ if ($object->id > 0) /* * Buttons - */ + */ print "\n<div class=\"tabsAction\">\n"; // Add a withdraw request @@ -467,7 +467,11 @@ if ($object->id > 0) } else { - if ($num == 0) print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("AlreadyPayed")).'">'.$langs->trans("MakeWithdrawRequest").'</a>'; + if ($num == 0) + { + if ($object->statut > 0) print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("AlreadyPayed")).'">'.$langs->trans("MakeWithdrawRequest").'</a>'; + else print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("Draft")).'">'.$langs->trans("MakeWithdrawRequest").'</a>'; + } else print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("RequestAlreadyDone")).'">'.$langs->trans("MakeWithdrawRequest").'</a>'; }