FIX: multicompany for discount

This commit is contained in:
ptibogxiv 2020-01-07 13:07:36 +01:00 committed by GitHub
parent 7350331865
commit e820af4aa0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -222,7 +222,7 @@ if ($socid > 0)
$sql.= " u.login, u.rowid as user_id";
$sql.= " FROM ".MAIN_DB_PREFIX."societe_remise as rc, ".MAIN_DB_PREFIX."user as u";
$sql.= " WHERE rc.fk_soc = " . $object->id;
$sql.= " AND rc.entity = " . $conf->entity;
$sql.= " AND rc.entity IN (".getEntity('discount').")";
$sql.= " AND u.rowid = rc.fk_user_author";
$sql.= " ORDER BY rc.datec DESC";
@ -281,7 +281,7 @@ if ($socid > 0)
$sql.= " u.login, u.rowid as user_id";
$sql.= " FROM ".MAIN_DB_PREFIX."societe_remise_supplier as rc, ".MAIN_DB_PREFIX."user as u";
$sql.= " WHERE rc.fk_soc = " . $object->id;
$sql.= " AND rc.entity = " . $conf->entity;
$sql.= " AND rc.entity IN (".getEntity('discount').")";
$sql.= " AND u.rowid = rc.fk_user_author";
$sql.= " ORDER BY rc.datec DESC";