diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index 8897d98cb1a..5432dfdab5a 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -1177,6 +1177,10 @@ class Facture extends CommonInvoice
if ($user->rights->facture->lire) {
$label = '' . $langs->trans("ShowInvoice") . '';
+ if ($this->type == self::TYPE_REPLACEMENT) $label='' . $langs->transnoentitiesnoconv("ShowInvoiceReplace") . '';
+ if ($this->type == self::TYPE_CREDIT_NOTE) $label='' . $langs->transnoentitiesnoconv("ShowInvoiceAvoir") . '';
+ if ($this->type == self::TYPE_DEPOSIT) $label='' . $langs->transnoentitiesnoconv("ShowInvoiceDeposit") . '';
+ if ($this->type == self::TYPE_SITUATION) $label='' . $langs->transnoentitiesnoconv("ShowInvoiceSituation") . '';
if (! empty($this->ref))
$label .= '
'.$langs->trans('Ref') . ': ' . $this->ref;
if (! empty($this->ref_client))
@@ -1191,10 +1195,6 @@ class Facture extends CommonInvoice
$label.= '
' . $langs->trans('LT2') . ': ' . price($this->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency);
if (! empty($this->total_ttc))
$label.= '
' . $langs->trans('AmountTTC') . ': ' . price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
- if ($this->type == self::TYPE_REPLACEMENT) $label=$langs->transnoentitiesnoconv("ShowInvoiceReplace").': '.$this->ref;
- if ($this->type == self::TYPE_CREDIT_NOTE) $label=$langs->transnoentitiesnoconv("ShowInvoiceAvoir").': '.$this->ref;
- if ($this->type == self::TYPE_DEPOSIT) $label=$langs->transnoentitiesnoconv("ShowInvoiceDeposit").': '.$this->ref;
- if ($this->type == self::TYPE_SITUATION) $label=$langs->transnoentitiesnoconv("ShowInvoiceSituation").': '.$this->ref;
if ($moretitle) $label.=' - '.$moretitle;
}
diff --git a/htdocs/core/boxes/box_factures.php b/htdocs/core/boxes/box_factures.php
index a5da051d9d7..9b457bab856 100644
--- a/htdocs/core/boxes/box_factures.php
+++ b/htdocs/core/boxes/box_factures.php
@@ -72,9 +72,11 @@ class box_factures extends ModeleBoxes
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
- $facturestatic=new Facture($db);
+ $facturestatic = new Facture($db);
$societestatic = new Societe($db);
+ $langs->load("bills");
+
$text = $langs->trans("BoxTitleLast".($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE?"":"Modified")."CustomerBills",$max);
$this->info_box_head = array(
'text' => $text,
@@ -88,9 +90,7 @@ class box_factures extends ModeleBoxes
$sql.= ", f.total_ttc";
$sql.= ", f.datef as df";
$sql.= ", f.paye, f.fk_statut, f.datec, f.tms";
- $sql.= ", s.nom as name";
- $sql.= ", s.rowid as socid";
- $sql.= ", s.code_client";
+ $sql.= ", s.rowid as socid, s.nom as name, s.code_client, s.email, s.tva_intra, s.code_compta, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6";
$sql.= ", f.date_lim_reglement as datelimite";
$sql.= " FROM (".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f";
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
@@ -117,6 +117,7 @@ class box_factures extends ModeleBoxes
$datelimite = $db->jdate($objp->datelimite);
$date = $db->jdate($objp->df);
$datem = $db->jdate($objp->tms);
+
$facturestatic->id = $objp->facid;
$facturestatic->ref = $objp->facnumber;
$facturestatic->type = $objp->type;
@@ -129,7 +130,14 @@ class box_factures extends ModeleBoxes
$societestatic->id = $objp->socid;
$societestatic->name = $objp->name;
$societestatic->code_client = $objp->code_client;
-
+ $societestatic->tva_intra = $objp->tva_intra;
+ $societestatic->email = $objp->email;
+ $societestatic->idprof1 = $objp->idprof1;
+ $societestatic->idprof2 = $objp->idprof2;
+ $societestatic->idprof3 = $objp->idprof3;
+ $societestatic->idprof4 = $objp->idprof4;
+ $societestatic->idprof5 = $objp->idprof5;
+ $societestatic->idprof6 = $objp->idprof6;
$late = '';
if ($facturestatic->hasDelay()) {