@php $subtotalRaw = Cart::instance('pos_shopping')->subtotal(); $subtotalNum = (float) preg_replace('/[^\d.]/', '', (string) $subtotalRaw); $shippingNum = (float) (Session::get('pos_shipping') ?? 0); $couponDiscount = (float) (Session::get('pos_discount') ?? 0); $grandTotal = max(0, $subtotalNum + $shippingNum - $couponDiscount); @endphp Sub Total ৳{{ number_format($subtotalNum, 2) }} Shipping Fee ৳{{ number_format($shippingNum, 2) }} কুপন ডিস্কাউন্ট ৳{{ number_format($couponDiscount, 2) }} Grand Total ৳{{ number_format($grandTotal, 2) }}