diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index a1378749253..0549d70b10a 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -1397,6 +1397,9 @@ class Facture extends CommonInvoice
if (!empty($this->total_ttc))
$label .= '
'.$langs->trans('AmountTTC').': '.price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
if ($moretitle) $label .= ' - '.$moretitle;
+ if (isset($this->statut) && isset($this->alreadypaid)) {
+ $label .= '
'.$langs->trans("Status").": ".$this->getLibStatut(5, $this->alreadypaid);
+ }
}
$linkclose = ($target ? ' target="'.$target.'"' : '');
diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php
index b32d82a08cb..6da49bb1915 100644
--- a/htdocs/compta/facture/list.php
+++ b/htdocs/compta/facture/list.php
@@ -1041,6 +1041,8 @@ if ($resql)
$totalpay = price2num($facturestatic->total_ttc - $remaintopay);
}
+ $facturestatic->alreadypaid = $paiement;
+
print '
'.$langs->trans("ShowIntervention").'';
- if (!empty($this->ref))
- $label .= '
'.$langs->trans('Ref').': '.$this->ref;
+ $label .= '
'.$langs->trans('Ref').': '.$this->ref;
+ if (isset($this->statut)) {
+ $label .= '
'.$langs->trans("Status").": ".$this->getLibStatut(5);
+ }
$url = DOL_URL_ROOT.'/fichinter/card.php?id='.$this->id;
diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php
index 03000bdb44d..71e251fd9e7 100644
--- a/htdocs/fichinter/list.php
+++ b/htdocs/fichinter/list.php
@@ -204,7 +204,7 @@ foreach ($arrayfields as $tmpkey => $tmpval)
$sql = "SELECT";
$sql .= " f.ref, f.rowid, f.fk_statut, f.description, f.datec as date_creation, f.tms as date_update, f.note_private,";
if (empty($conf->global->FICHINTER_DISABLE_DETAILS) && $atleastonefieldinlines) $sql .= "fd.rowid as lineid, fd.description as descriptiondetail, fd.date as dp, fd.duree,";
-$sql .= " s.nom as name, s.rowid as socid, s.client";
+$sql .= " s.nom as name, s.rowid as socid, s.client, s.fournisseur, s.email, s.status as thirdpartystatus";
if (!empty($conf->projet->enabled)) {
$sql .= ", pr.rowid as projet_id, pr.ref as projet_ref, pr.title as projet_title";
}
@@ -479,6 +479,13 @@ if ($resql)
$objectstatic->ref = $obj->ref;
$objectstatic->statut = $obj->fk_statut;
+ $companystatic->name=$obj->name;
+ $companystatic->id=$obj->socid;
+ $companystatic->client=$obj->client;
+ $companystatic->fournisseur=$obj->fournisseur;
+ $companystatic->email=$obj->email;
+ $companystatic->status=$obj->thirdpartystatus;
+
print '
';
if (!empty($arrayfields['f.ref']['checked']))
@@ -521,9 +528,6 @@ if ($resql)
if (! empty($arrayfields['s.nom']['checked']))
{
print '| ';
- $companystatic->name=$obj->name;
- $companystatic->id=$obj->socid;
- $companystatic->client=$obj->client;
print $companystatic->getNomUrl(1, '', 44);
print ' | ';
if (! $i) $totalarray['nbfield']++;
diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php
index 6178bc5ae3c..6f5e3b6fc0a 100644
--- a/htdocs/fourn/class/fournisseur.facture.class.php
+++ b/htdocs/fourn/class/fournisseur.facture.class.php
@@ -2358,6 +2358,9 @@ class FactureFournisseur extends CommonInvoice
elseif ($this->type == self::TYPE_CREDIT_NOTE) $label = $langs->transnoentitiesnoconv("ShowInvoiceAvoir").': '.$this->ref;
elseif ($this->type == self::TYPE_DEPOSIT) $label = $langs->transnoentitiesnoconv("ShowInvoiceDeposit").': '.$this->ref;
if ($moretitle) $label .= ' - '.$moretitle;
+ if (isset($this->statut) && isset($this->alreadypaid)) {
+ $label .= '
'.$langs->trans("Status").": ".$this->getLibStatut(5, $this->alreadypaid);
+ }
$ref = $this->ref;
if (empty($ref)) $ref = $this->id;
diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php
index 6dc24c71b57..1fadd12b16d 100644
--- a/htdocs/fourn/facture/list.php
+++ b/htdocs/fourn/facture/list.php
@@ -849,6 +849,9 @@ if ($resql)
$totalpay = $paiement + $totalcreditnotes + $totaldeposits;
$remaintopay = $obj->total_ttc - $totalpay;
+ $facturestatic->alreadypaid = ($paiement ? $paiement : 0);
+
+
//If invoice has been converted and the conversion has been used, we dont have remain to pay on invoice
if ($facturestatic->type == FactureFournisseur::TYPE_CREDIT_NOTE) {
if ($facturestatic->isCreditNoteUsed()) {
@@ -1081,7 +1084,6 @@ if ($resql)
if (!empty($arrayfields['f.fk_statut']['checked']))
{
print '';
- // TODO $paiement is not yet defined
print $facturestatic->LibStatut($obj->paye, $obj->fk_statut, 5, $paiement, $obj->type);
print " | ";
if (!$i) $totalarray['nbfield']++;
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index ff6faad20a6..a664fe21db2 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -2417,7 +2417,9 @@ class Societe extends CommonObject
$label .= '
'.$langs->trans('CustomerAccountancyCode').': '.($this->code_compta ? $this->code_compta : $this->code_compta_client);
if (!empty($conf->accounting->enabled) && $this->fournisseur)
$label .= '
'.$langs->trans('SupplierAccountancyCode').': '.$this->code_compta_fournisseur;
-
+ if (isset($this->status)) {
+ $label .= '
'.$langs->trans("Status").": ".$this->getLibStatut(5);
+ }
$label .= '';
// Add type of canvas