diff --git a/htdocs/takepos/receipt.php b/htdocs/takepos/receipt.php index b393e095dad..f60be35d0b3 100644 --- a/htdocs/takepos/receipt.php +++ b/htdocs/takepos/receipt.php @@ -79,7 +79,7 @@ if (!$user->hasRight('takepos', 'run')) { top_htmlhead('', '', 1); -if ((string) $place != '') { +if ((string) $place != '' && !empty($_SESSION["takeposterminal"])) { $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."facture"; $sql .= " WHERE ref = '(PROV-POS".$db->escape($_SESSION["takeposterminal"]."-".$place).")'"; $sql .= " AND entity IN (".getEntity('invoice').")";