FIX : need to filter on aa.entity for same accounting accounts available in several entities

This commit is contained in:
gauthier 2018-06-14 11:56:22 +02:00
parent 09c92b7cc8
commit e9d65ea751

View File

@ -235,6 +235,7 @@ if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_STANDARD . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
}
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
$sql .= " AND aa.entity = " . $conf->entity;
// Add where from hooks
$parameters=array();
@ -439,4 +440,4 @@ if ($result) {
}
llxFooter();
$db->close();
$db->close();