Fix on addresses

This commit is contained in:
ludo
2023-11-13 00:02:21 +01:00
parent 4ce3d528dd
commit 9f90f983ab
29 changed files with 660 additions and 447 deletions

View File

@@ -16,7 +16,8 @@ class BasketController extends Controller
{
$offerId = $request->input('offer_id');
$quantity = $request->input('quantity') ?? 1;
$price = Offers::getPrice($offerId, $quantity)->price_taxed;
$offer = Offers::getPrice($offerId, $quantity);
$price = $offer ? $offer->price_taxed : 0;
return number_format($quantity * $price, 2);
}