@extends('web.home.layout.master') @section('content')
@if(session('new_order'))

Thank You, Eco-Champion! 🌍💚

Your order was successfully placed using your accumulated Recycling Points. We deeply appreciate your commitment to sustainability and for trusting American Plastic. You make a real difference!

Recycling Points Applied

Your eco-balance has been updated automatically.

Points Order Details

@php $latestOrder = $orders->first(); $batchTotalPoints = $totalamount; @endphp
Order Reference {{ $latestOrder->order_id }}
Date {{ $latestOrder->created_at->format('d M Y') }}
Quantity {{ $latestOrder->quantity }} item(s)
Order Status Processing
Grand Total (Points) {{ number_format($totalamount, 0) }} PTS
@endif

Points Order Summary

@if($orders->count() > 0)
@php $totalProductPoints = $orders->sum('total'); $totalTaxPoints = $orders->sum('tax_amount'); $totalShippingPoints = $orders->sum('service_fee'); $totalDiscountPoints = $orders->sum('discount_amount'); @endphp @foreach($orders as $order) @php $itemPoints = $order->total + $order->tax_amount + $order->service_fee - $order->discount_amount; @endphp @endforeach @if($totalTaxPoints > 0) @endif @if($totalShippingPoints > 0) @endif @if($totalDiscountPoints > 0) @endif
Order Reference Date Items Status Points Used
{{ $order->order_id }} {{ $order->created_at->format('d M Y') }} {{ $order->quantity }} item(s) Processing {{ number_format($itemPoints, 0) }} PTS
Subtotal Points: {{ number_format($totalProductPoints, 0) }} PTS
Tax (18%): {{ number_format($totalTaxPoints, 0) }} PTS
Shipping Fee: {{ number_format($totalShippingPoints, 0) }} PTS
Discount: - {{ number_format($totalDiscountPoints, 0) }} PTS
@else

You haven't placed any points orders yet.

Start Shopping
@endif
@endsection