Merge pull request #19696 from atm-maxime/fix_supinv_unpaidboard

Fix #19404 : only validated invoice must be considered in unpaid indicator
This commit is contained in:
Laurent Destailleur 2021-12-30 13:00:09 +01:00 committed by GitHub
commit ac7d08d3e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2418,7 +2418,7 @@ class FactureFournisseur extends CommonInvoice
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
}
$sql .= ' WHERE ff.paye=0';
$sql .= ' AND ff.fk_statut > 0';
$sql .= ' AND ff.fk_statut = '.self::STATUS_VALIDATED;
$sql .= " AND ff.entity = ".$conf->entity;
if ($user->socid) {
$sql .= ' AND ff.fk_soc = '.$user->socid;