Merge pull request #16880 from frederic34/patch-4

fix stats
This commit is contained in:
Laurent Destailleur 2021-03-20 11:58:01 +01:00 committed by GitHub
commit 779f706d32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,7 @@
* Copyright (C) 2017 Rui Strecht <rui.strecht@aliartalentos.com>
* Copyright (C) 2018 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2019-2020 Josep Lluís Amador <joseplluis@lliuretic.cat>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2019-2021 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2020 Open-Dsi <support@open-dsi.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -4247,7 +4247,7 @@ class Societe extends CommonObject
$table = 'supplier_proposal';
}
$sql = "SELECT rowid, total_ht, total as total_ttc, fk_statut as status FROM ".MAIN_DB_PREFIX.$table." as f";
$sql = "SELECT rowid, total_ht, total_ttc, fk_statut as status FROM ".MAIN_DB_PREFIX.$table." as f";
$sql .= " WHERE fk_soc = ".$this->id;
if ($mode == 'supplier') {
$sql .= " AND entity IN (".getEntity('supplier_proposal').")";