@extends('layouts.admin.master') @section('title', 'Order Invoice') @section('content')
Order Invoice
{{-- --}}
@csrf
@if (count($orderDetails) != 0) @php $count = 1; $totalAmount = 0; $focDiscount = 0; $totalItemDiscountAmt = 0; @endphp @foreach ($orderDetails as $orderDetail) @if ($orderDetail['is_foc'] == 0) @elseif ($orderDetail['is_foc'] == 1) @endif @php $count++; if ($orderDetail['is_foc'] == 0) { $totalAmount += $orderDetail['item_price'] * $orderDetail['quantity']; } @endphp @endforeach @endif
No Item Name Order Date Order Time Unit Selling Price Promotion Price Qty FOC Ordered By
{{ $count }} {{ $orderDetail['item_name'] }} {{ date('d-M-y', strtotime($orderDetail['created_at'])) }} {{ date('h:i A', strtotime($orderDetail['created_at'])) }} {{ $orderDetail['unit_name'] }} {{ number_format($orderDetail['item_price']) }} MMK @if ($orderDetail['promotion_price'] == null) No Promo @php $totalItemDiscountAmt += $orderDetail['item_price'] * $orderDetail['quantity']; @endphp @elseif ($orderDetail['promotion_price'] != null) {{ number_format($orderDetail['promotion_price']) }} MMK @php $totalItemDiscountAmt += $orderDetail['promotion_price'] * $orderDetail['quantity']; @endphp @endif {{ $orderDetail['quantity'] }} {{ $orderDetail['name'] }}
{{-- --}}
@endsection