diff --git a/htdocs/compta/paiement/fiche.php b/htdocs/compta/paiement/fiche.php index 9d758c9cfbd..9d944003eb6 100644 --- a/htdocs/compta/paiement/fiche.php +++ b/htdocs/compta/paiement/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 Laurent Destailleur +/* Copyright (C) 2004 Rodolphe Quiedeville + * Copyright (C) 2004-2005 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,7 +21,7 @@ * */ -/*! \file htdocs/compta/paiement/fiche.php +/** \file htdocs/compta/paiement/fiche.php \ingroup facture \brief Onglet paiement d'un paiement \version $Revision$ @@ -37,6 +37,8 @@ $user->getrights('facture'); $langs->load("bills"); $langs->load("companies"); + + if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes' && $user->rights->facture->creer) { $paiement = new Paiement($db); @@ -57,6 +59,7 @@ if ($_POST["action"] == 'confirm_valide' && $_POST["confirm"] == 'yes' && $user- } } + /* * * @@ -83,7 +86,7 @@ $html = new Form($db); * Confirmation de la suppression du paiement * */ - if ($_GET["action"] == 'delete') +if ($_GET["action"] == 'delete') { print '
'; $html->form_confirm("fiche.php?id=$paiement->id","Supprimer le paiement","Etes-vous sūr de vouloir supprimer ce paiement ?","confirm_delete"); @@ -91,7 +94,7 @@ $html = new Form($db); } - if ($_GET["action"] == 'valide') +if ($_GET["action"] == 'valide') { print '
'; $html->form_confirm("fiche.php?id=$paiement->id","Valider le paiement","Etes-vous sūr de vouloir valider ce paiment, auncune modification n'est possible une fois le paiement validé ?","confirm_valide"); @@ -105,11 +108,16 @@ print ''; print ''; print "
'; +if ($paiement->bank_account) { + // Si compte renseigné, on affiche libelle + $bank=new Account($db); + $bank->fetch($paiement->bank_account); + print $langs->trans("BankAccount").' : '.$bank->label.'
'; +} print $langs->trans("Date").' : '.dolibarr_print_date($paiement->date)."
"; print $langs->trans("Type").' : '.$paiement->type_libelle."
"; if ($paiement->numero) { print $langs->trans("Numero").' : '.$paiement->numero."
"; } print $langs->trans("Amount").' : '.$paiement->montant." ".$conf->monnaie."
"; - print '
";