This commit is contained in:
Fahim 2021-08-31 16:50:51 +06:00
parent 462cf5e018
commit a645735f93
1 changed files with 5 additions and 3 deletions

View File

@ -115,9 +115,11 @@ class ProductCart extends Component
}
public function updateQuantity($row_id, $product_id) {
if ($this->check_quantity[$product_id] < $this->quantity[$product_id]) {
session()->flash('message', 'The requested quantity is not available in stock.');
return;
if ($this->cart_instance == 'sale' || $this->cart_instance == 'purchase_return') {
if ($this->check_quantity[$product_id] < $this->quantity[$product_id]) {
session()->flash('message', 'The requested quantity is not available in stock.');
return;
}
}
Cart::instance($this->cart_instance)->update($row_id, $this->quantity[$product_id]);