Add link to RemiseCheque in account lines
This commit is contained in:
parent
efff92fe1c
commit
196bce7e11
@ -432,7 +432,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$sql = "SELECT b.rowid, b.dateo as do, b.datev as dv,";
|
$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";
|
$sql.= " ba.rowid as bankid, ba.ref as bankref, ba.label as banklabel";
|
||||||
if ($mode_search)
|
if ($mode_search)
|
||||||
{
|
{
|
||||||
@ -518,15 +518,21 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
// Payment type
|
// Payment type
|
||||||
print "<td nowrap>";
|
print '<td class="nowrap">';
|
||||||
$label=($langs->trans("PaymentTypeShort".$objp->fk_type)!="PaymentTypeShort".$objp->fk_type)?$langs->trans("PaymentTypeShort".$objp->fk_type):$objp->fk_type;
|
$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 == '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 $label;
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
// Num
|
// Num
|
||||||
print '<td nowrap>'.($objp->num_chq?$objp->num_chq:"")."</td>\n";
|
print '<td class="nowrap">'.($objp->num_chq?$objp->num_chq:"")."</td>\n";
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
print '<td>';
|
print '<td>';
|
||||||
|
|||||||
@ -764,7 +764,7 @@ class RemiseCheque extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Renvoie nom clicable (avec eventuellement le picto)
|
* 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
|
* @param string $option Sur quoi pointe le lien
|
||||||
* @return string Chaine avec URL
|
* @return string Chaine avec URL
|
||||||
*/
|
*/
|
||||||
@ -774,14 +774,13 @@ class RemiseCheque extends CommonObject
|
|||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
|
|
||||||
$number=$this->ref;
|
|
||||||
if ($this->statut == 0) $number='(PROV'.$this->id.')';
|
|
||||||
|
|
||||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/paiement/cheque/fiche.php?id='.$this->id.'">';
|
$lien = '<a href="'.DOL_URL_ROOT.'/compta/paiement/cheque/fiche.php?id='.$this->id.'">';
|
||||||
$lienfin='</a>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCheckReceipt"),'payment').$lienfin.' ');
|
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCheckReceipt"),'payment').$lienfin);
|
||||||
$result.=$lien.$number.$lienfin;
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
|
if ($withpicto != 2) $result.=$lien.$this->ref.$lienfin;
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user