diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php
index 5351a3f5e7b..040905ddf73 100644
--- a/htdocs/compta/bank/account.php
+++ b/htdocs/compta/bank/account.php
@@ -432,7 +432,7 @@ if ($id > 0 || ! empty($ref))
*/
$sql = "SELECT b.rowid, b.dateo as do, b.datev as dv,";
- $sql.= " b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type,";
+ $sql.= " b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type, b.fk_bordereau,";
$sql.= " ba.rowid as bankid, ba.ref as bankref, ba.label as banklabel";
if ($mode_search)
{
@@ -518,15 +518,21 @@ if ($id > 0 || ! empty($ref))
print "\n";
// Payment type
- print "
";
+ print ' | ';
$label=($langs->trans("PaymentTypeShort".$objp->fk_type)!="PaymentTypeShort".$objp->fk_type)?$langs->trans("PaymentTypeShort".$objp->fk_type):$objp->fk_type;
if ($objp->fk_type == 'SOLD') $label=' ';
+ if ($objp->fk_type == 'CHQ' && $objp->fk_bordereau > 0) {
+ dol_include_once('/compta/paiement/cheque/class/remisecheque.class.php');
+ $bordereaustatic = new RemiseCheque($db);
+ $bordereaustatic->id = $objp->fk_bordereau;
+ $label .= ' '.$bordereaustatic->getNomUrl(2);
+ }
print $label;
print " | \n";
// Num
- print ''.($objp->num_chq?$objp->num_chq:"")." | \n";
+ print ''.($objp->num_chq?$objp->num_chq:"")." | \n";
// Description
print '';
diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php
index 2f7db2cc226..7ccb75793aa 100644
--- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php
+++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php
@@ -764,7 +764,7 @@ class RemiseCheque extends CommonObject
/**
* Renvoie nom clicable (avec eventuellement le picto)
*
- * @param int $withpicto Inclut le picto dans le lien
+ * @param int $withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
* @param string $option Sur quoi pointe le lien
* @return string Chaine avec URL
*/
@@ -774,14 +774,13 @@ class RemiseCheque extends CommonObject
$result='';
- $number=$this->ref;
- if ($this->statut == 0) $number='(PROV'.$this->id.')';
-
$lien = '';
$lienfin='';
- if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCheckReceipt"),'payment').$lienfin.' ');
- $result.=$lien.$number.$lienfin;
+ if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCheckReceipt"),'payment').$lienfin);
+ if ($withpicto && $withpicto != 2) $result.=' ';
+ if ($withpicto != 2) $result.=$lien.$this->ref.$lienfin;
+
return $result;
}
|