diff --git a/htdocs/compta/paiement/liste.php b/htdocs/compta/paiement/liste.php index 914d85c33fb..3dfc8a09138 100644 --- a/htdocs/compta/paiement/liste.php +++ b/htdocs/compta/paiement/liste.php @@ -18,14 +18,13 @@ * * $Id$ * $Source$ - * */ /** - \file htdocs/compta/paiement/liste.php - \ingroup compta - \brief Page liste des paiements des factures clients - \version $Revision$ + \file htdocs/compta/paiement/liste.php + \ingroup compta + \brief Page liste des paiements des factures clients + \version $Revision$ */ require("./pre.inc.php"); @@ -58,9 +57,12 @@ if (! $sortfield) $sortfield="p.rowid"; $sql = "SELECT p.rowid,".$db->pdate("p.datep")." as dp, p.amount,"; $sql.= " p.statut, p.num_paiement,"; -$sql.= " c.libelle as paiement_type"; +$sql.= " c.libelle as paiement_type,"; +$sql.= " ba.rowid as bid, ba.label"; $sql.= " FROM ".MAIN_DB_PREFIX."paiement as p,"; $sql.= " ".MAIN_DB_PREFIX."c_paiement as c"; +$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON p.fk_bank = b.rowid"; +$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid"; $sql.= " WHERE p.fk_paiement = c.id"; if ($_GET["search_montant"]) @@ -68,8 +70,8 @@ if ($_GET["search_montant"]) $sql .=" AND p.amount=".ereg_replace(",",".",$_GET["search_montant"]); } - -if ($_GET["orphelins"]) { // Options qui ne sert qu'au debogage +if ($_GET["orphelins"]) // Option qui ne sert qu'au debogage +{ // Paiements liés à aucune facture (pour aide au diagnostic) $sql = "SELECT p.rowid,".$db->pdate("p.datep")." as dp, p.amount,"; $sql.= " p.statut, p.num_paiement,"; @@ -98,9 +100,10 @@ if ($resql) print '
| '.img_object($langs->trans("ShowPayment"),"payment").''; + print ' | '.img_object($langs->trans("ShowPayment"),"payment").''; print ' '.$objp->rowid.' | '; - print ''.dolibarr_print_date($objp->dp)." | \n"; - print "$objp->paiement_type $objp->num_paiement | \n"; + print ''.dolibarr_print_date($objp->dp).' | '; + print ''.$objp->paiement_type.' '.$objp->num_paiement.' | '; + print ''.$objp->label.' | '; print ''.price($objp->amount).' | '; print ''; if ($objp->statut == 0) { - print 'A valider'; + print ''.$langs->trans("ToValidate").''; } else { |