diff --git a/htdocs/compta/paymentbybanktransfer/index.php b/htdocs/compta/paymentbybanktransfer/index.php
index 7331aee48fa..adab830546a 100644
--- a/htdocs/compta/paymentbybanktransfer/index.php
+++ b/htdocs/compta/paymentbybanktransfer/index.php
@@ -101,7 +101,7 @@ print '
';
/*
* Invoices waiting for withdraw
*/
-$sql = "SELECT f.ref, f.rowid, f.total_ttc, f.fk_statut, f.paye, f.type,";
+$sql = "SELECT f.ref, f.rowid, f.total_ttc, f.fk_statut, f.paye, f.type, f.datef, f.date_lim_reglement,";
$sql .= " pfd.date_demande, pfd.amount,";
$sql .= " s.nom as name, s.email, s.rowid as socid, s.tva_intra, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6";
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f,";
@@ -141,9 +141,13 @@ if ($resql) {
$invoicestatic->id = $obj->rowid;
$invoicestatic->ref = $obj->ref;
- $invoicestatic->statut = $obj->fk_statut;
+ $invoicestatic->status = $obj->fk_statut;
+ $invoicestatic->statut = $obj->fk_statut; // For backward comaptibility
$invoicestatic->paye = $obj->paye;
$invoicestatic->type = $obj->type;
+ $invoicestatic->date = $db->jdate($obj->datef);
+ $invoicestatic->date_echeance = $db->jdate($obj->date_lim_reglement);
+ $invoicestatic->total_ttc = $obj->total_ttc;
$alreadypayed = $invoicestatic->getSommePaiement();
$thirdpartystatic->id = $obj->socid;
diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php
index bc0c7b9e232..ca81a778fee 100644
--- a/htdocs/fourn/class/fournisseur.facture.class.php
+++ b/htdocs/fourn/class/fournisseur.facture.class.php
@@ -2782,6 +2782,9 @@ class FactureFournisseur extends CommonInvoice
if (!empty($this->date)) {
$label .= '
'.$langs->trans('Date').': '.dol_print_date($this->date, 'day');
}
+ if (!empty($this->date_echeance)) {
+ $label .= '
'.$langs->trans('DateDue').': '.dol_print_date($this->date_echeance, 'day');
+ }
if (!empty($this->total_ht)) {
$label .= '
'.$langs->trans('AmountHT').': '.price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency);
}