@extends('layout.erp.app') @section('title', 'Show Purchase') @section('page')
Purchase Invoice From:
  • Invoice: NO-100{{ $purchase->id }}
  • Dhaka, Bangladesh
  • Phone: 01793 956 777
  • Email: mdaslamcric@gmail.com
Invoice To:
  • Supplier Name: {{ optional($purchase->supplier)->name }}
  • Address: {{ optional($purchase->supplier)->address }}
  • Email: {{ optional($purchase->supplier)->email }}
  • Phone: {{ optional($purchase->supplier)->phone }}
@php $total = 0; $total_discount = 0; @endphp @foreach ($purchasedetails as $purchasedetail) @php $subtotal = ($purchasedetail->price * $purchasedetail->qty) - $purchasedetail->discount; $total += $subtotal; $total_discount += $purchasedetail->discount; @endphp @endforeach @php $tax = $total * 0.05; $grandTotal = $total + $tax - $total_discount; @endphp
SL Product Qty Price Discount Subtotal
{{ $loop->iteration }} {{ optional($purchasedetail->products)->name }} {{ $purchasedetail->qty }} {{ number_format($purchasedetail->price, 2) }} {{ number_format($purchasedetail->discount, 2) }} {{ number_format($subtotal, 2) }}
Total {{ number_format($total, 2) }}
Tax (5%) {{ number_format($tax, 2) }}
Total Discount {{ number_format($total_discount, 2) }}
Grand Total {{ number_format($grandTotal, 2) }}
@endsection @section('script') @endsection