Merge pull request #20879 from altairisfr/takepos_hide_stock

NEW: TAKEPOS - add constant to hide stock on cart lines
This commit is contained in:
Laurent Destailleur 2022-05-21 00:47:41 +02:00 committed by GitHub
commit 4378ec2e2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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