Skip to content
Snippets Groups Projects
Commit 81e203ee authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Ref was not visible.

parent c186f132
No related branches found
No related tags found
No related merge requests found
<?php <?php
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Eric Seigne <erics@rycks.com> * Copyright (C) 2003 Eric Seigne <erics@rycks.com>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2014 Jean Heimburger <jean@tiaris.info> * Copyright (C) 2014 Jean Heimburger <jean@tiaris.info>
...@@ -394,7 +394,7 @@ if ($object->fetch($id)) ...@@ -394,7 +394,7 @@ if ($object->fetch($id))
if ($user->rights->fournisseur->facture->lire) if ($user->rights->fournisseur->facture->lire)
{ {
// TODO move to DAO class // TODO move to DAO class
$sql = 'SELECT f.rowid,f.libelle,f.ref_supplier,f.fk_statut,f.datef as df,f.total_ttc as amount,f.paye,'; $sql = 'SELECT f.rowid,f.libelle,f.ref,f.ref_supplier,f.fk_statut,f.datef as df,f.total_ttc as amount,f.paye,';
$sql.= ' SUM(pf.amount) as am'; $sql.= ' SUM(pf.amount) as am';
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as f'; $sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as f';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON f.rowid=pf.fk_facturefourn'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON f.rowid=pf.fk_facturefourn';
...@@ -425,7 +425,13 @@ if ($object->fetch($id)) ...@@ -425,7 +425,13 @@ if ($object->fetch($id))
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';
print '<td>'; print '<td>';
print '<a href="facture/card.php?facid='.$obj->rowid.'">'; print '<a href="facture/card.php?facid='.$obj->rowid.'">';
print img_object($langs->trans('ShowBill'),'bill').' '.$obj->ref_supplier.'</a> '.dol_trunc($obj->libelle,14).'</td>'; $facturestatic->id=$obj->rowid;
$facturestatic->ref=($obj->ref?$obj->ref:$obj->rowid).($obj->ref_supplier?' - '.$obj->ref_supplier:'');
//$facturestatic->ref_supplier=$obj->ref_supplier;
print $facturestatic->getNomUrl(1);
//print img_object($langs->trans('ShowBill'),'bill').' '.($obj->ref?$obj->ref:$obj->rowid).' - '.$obj->ref_supplier.'</a>';
print ' '.dol_trunc($obj->libelle,14);
print '</td>';
print '<td align="center" class="nowrap">'.dol_print_date($db->jdate($obj->df),'day').'</td>'; print '<td align="center" class="nowrap">'.dol_print_date($db->jdate($obj->df),'day').'</td>';
print '<td align="right" class="nowrap">'.price($obj->amount).'</td>'; print '<td align="right" class="nowrap">'.price($obj->amount).'</td>';
print '<td align="right" class="nowrap">'; print '<td align="right" class="nowrap">';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment