Fix display stock rights in takepos

only display if user have read right
This commit is contained in:
ptibogxiv 2020-10-04 14:27:03 +02:00 committed by GitHub
parent 257012aa19
commit 415deb1500
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1067,7 +1067,7 @@ if ($placeid > 0)
$htmlforlines .= '</td>';
$htmlforlines .= '<td class="right">'.vatrate($line->remise_percent, true).'</td>';
$htmlforlines .= '<td class="right">';
if (!empty($conf->stock->enabled))
if (!empty($conf->stock->enabled) && !empty($user->rights->stock->mouvement->lire))
{
$constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"];
$sql = "SELECT e.rowid, e.ref, e.lieu, e.fk_parent, e.statut, ps.reel, ps.rowid as product_stock_id, p.pmp";