New: Show invoice ref in boxes for supplier invoices.

This commit is contained in:
Laurent Destailleur 2014-04-26 23:15:45 +02:00
parent 97fce71218
commit 5f1e690039
2 changed files with 20 additions and 12 deletions

View File

@ -64,7 +64,7 @@ class box_factures_fourn extends ModeleBoxes
if ($user->rights->fournisseur->facture->lire)
{
$sql = "SELECT s.nom, s.rowid as socid,";
$sql.= " f.rowid as facid, f.ref_supplier, f.amount,";
$sql.= " f.rowid as facid, f.ref, f.ref_supplier, f.amount,";
$sql.= " f.paye, f.fk_statut,";
$sql.= ' f.datef as df,';
$sql.= ' f.datec as datec,';
@ -102,25 +102,29 @@ class box_factures_fourn extends ModeleBoxes
'url' => DOL_URL_ROOT."/fourn/facture/fiche.php?facid=".$objp->facid);
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
'text' => $objp->ref_supplier,
'text' => ($objp->ref?$objp->ref:$objp->facid),
'text2'=> $late,
'url' => DOL_URL_ROOT."/fourn/facture/fiche.php?facid=".$objp->facid);
$this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"',
$this->info_box_contents[$i][2] = array('td' => 'align="left"',
'text' => $objp->ref_supplier,
'url' => DOL_URL_ROOT."/fourn/facture/fiche.php?facid=".$objp->facid);
$this->info_box_contents[$i][3] = array('td' => 'align="left" width="16"',
'logo' => 'company',
'url' => DOL_URL_ROOT."/fourn/fiche.php?socid=".$objp->socid);
$this->info_box_contents[$i][3] = array('td' => 'align="left"',
$this->info_box_contents[$i][4] = array('td' => 'align="left"',
'text' => $objp->nom,
'url' => DOL_URL_ROOT."/fourn/fiche.php?socid=".$objp->socid);
$this->info_box_contents[$i][4] = array('td' => 'align="right"',
$this->info_box_contents[$i][5] = array('td' => 'align="right"',
'text' => dol_print_date($datec,'day'));
$fac = new FactureFournisseur($db);
$fac->fetch($objp->facid);
$alreadypaid=$fac->getSommePaiement();
$this->info_box_contents[$i][5] = array('td' => 'align="right" width="18"',
$this->info_box_contents[$i][6] = array('td' => 'align="right" width="18"',
'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3,$alreadypaid,$objp->type));
$i++;

View File

@ -61,7 +61,7 @@ class box_factures_fourn_imp extends ModeleBoxes
if ($user->rights->fournisseur->facture->lire)
{
$sql = "SELECT s.nom, s.rowid as socid,";
$sql.= " f.rowid as facid, f.ref_supplier, f.date_lim_reglement as datelimite,";
$sql.= " f.rowid as facid, f.ref, f.ref_supplier, f.date_lim_reglement as datelimite,";
$sql.= " f.amount, f.datef as df,";
$sql.= " f.paye, f.fk_statut, f.type";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
@ -98,25 +98,29 @@ class box_factures_fourn_imp extends ModeleBoxes
'url' => DOL_URL_ROOT."/fourn/facture/fiche.php?facid=".$objp->facid);
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
'text' => $objp->ref_supplier,
'text' => ($objp->ref?$objp->ref:$objp->facid),
'text2'=> $late,
'url' => DOL_URL_ROOT."/fourn/facture/fiche.php?facid=".$objp->facid);
$this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"',
$this->info_box_contents[$i][2] = array('td' => 'align="left"',
'text' => $objp->ref_supplier,
'url' => DOL_URL_ROOT."/fourn/facture/fiche.php?facid=".$objp->facid);
$this->info_box_contents[$i][3] = array('td' => 'align="left" width="16"',
'logo' => 'company',
'url' => DOL_URL_ROOT."/fourn/fiche.php?socid=".$objp->socid);
$this->info_box_contents[$i][3] = array('td' => 'align="left"',
$this->info_box_contents[$i][4] = array('td' => 'align="left"',
'text' => $objp->nom,
'url' => DOL_URL_ROOT."/fourn/fiche.php?socid=".$objp->socid);
$this->info_box_contents[$i][4] = array('td' => 'align="right"',
$this->info_box_contents[$i][5] = array('td' => 'align="right"',
'text' => dol_print_date($datelimite,'day'));
$fac = new FactureFournisseur($db);
$fac->fetch($objp->facid);
$alreadypaid=$fac->getSommePaiement();
$this->info_box_contents[$i][5] = array('td' => 'align="right" width="18"',
$this->info_box_contents[$i][6] = array('td' => 'align="right" width="18"',
'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3,$alreadypaid,$objp->type));
$i++;