Commit 9be63347 authored by mbriand's avatar mbriand
Browse files

Limite pas utilisateur pour les produits

parent 26c73566
...@@ -553,9 +553,12 @@ class comptoir extends stdentity ...@@ -553,9 +553,12 @@ class comptoir extends stdentity
$max = $prod->can_be_sold($this->client); $max = $prod->can_be_sold($this->client);
if ($max >= 0){ if ($max >= 0){
foreach($_SESSION["Comptoirs"][$this->id]["panier"] as $id) if (isset($_SESSION["Comptoirs"][$this->id]["panier"]))
if ($id == $prod->id) {
$max --; foreach($_SESSION["Comptoirs"][$this->id]["panier"] as $id)
if ($id == $prod->id)
$max --;
}
if ( $max <= 0 ) if ( $max <= 0 )
return; return;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment