Update societe.class.php

Ajoute la sélection de l'entité avec Multicompagny pour les encours clients.
This commit is contained in:
mapiolca 2019-01-04 17:57:16 +01:00 committed by GitHub
parent 5094b6bcfc
commit aa10d345bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3874,6 +3874,7 @@ class Societe extends CommonObject
*/
$sql = "SELECT rowid, total_ttc FROM ".MAIN_DB_PREFIX."facture as f";
$sql .= " WHERE fk_soc = ". $this->id;
$sql .= " AND entity IN (".getEntity('invoice').")";
$sql .= " AND paye = 0";
$sql .= " AND fk_statut <> 0"; // Not a draft
//$sql .= " AND (fk_statut <> 3 OR close_code <> 'abandon')"; // Not abandonned for undefined reason