forked from Wavyzz/dolibarr
FIX dasboard wrong for late invoice
This commit is contained in:
@@ -3212,7 +3212,7 @@ class Facture extends CommonInvoice
|
|||||||
|
|
||||||
$clause = " WHERE";
|
$clause = " WHERE";
|
||||||
|
|
||||||
$sql = "SELECT f.rowid, f.date_lim_reglement as datefin";
|
$sql = "SELECT f.rowid, f.date_lim_reglement as datefin,f.fk_statut";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
|
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||||
if (!$user->rights->societe->client->voir && !$user->societe_id)
|
if (!$user->rights->societe->client->voir && !$user->societe_id)
|
||||||
{
|
{
|
||||||
@@ -3242,6 +3242,7 @@ class Facture extends CommonInvoice
|
|||||||
while ($obj=$this->db->fetch_object($resql))
|
while ($obj=$this->db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$generic_facture->date_lim_reglement = $this->db->jdate($obj->datefin);
|
$generic_facture->date_lim_reglement = $this->db->jdate($obj->datefin);
|
||||||
|
$generic_facture->statut = $obj->fk_statut;
|
||||||
|
|
||||||
$response->nbtodo++;
|
$response->nbtodo++;
|
||||||
|
|
||||||
@@ -3249,7 +3250,7 @@ class Facture extends CommonInvoice
|
|||||||
$response->nbtodolate++;
|
$response->nbtodolate++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -3727,7 +3728,7 @@ class Facture extends CommonInvoice
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
|
|
||||||
// Paid invoices have status STATUS_CLOSED
|
// Paid invoices have status STATUS_CLOSED
|
||||||
if ($this->statut != Facture::STATUS_VALIDATED) return false;
|
if ($this->statut != Facture::STATUS_VALIDATED) return false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user