@php $totalQuantity = 0; @endphp
Purchase Invoice
@if(count($purchase->purchaseOrderDetails) > 0) @php $t_selling_price = 0; $t_purchase_price = 0; $t_quantity = 0; @endphp @foreach($purchase->purchaseOrderDetails as $key => $purchaseOrderDetail) @php $t_selling_price += $purchaseOrderDetail->total_selling_amount; $t_purchase_price += $purchaseOrderDetail->total_amount; $t_quantity += $purchaseOrderDetail->quantity; @endphp @endforeach
SL Product Name Unit Price Quantity Unit Selling Price Total Selling Price Total
{{ $loop->iteration }} {{ $purchaseOrderDetail->product->name ?? '' }} {{ $purchaseOrderDetail->unit_price }} {{ $purchaseOrderDetail->quantity }} {{ \App\Helpers\Helper::number_bn_format($purchaseOrderDetail->unit_selling_price) }}/- tk {{ \App\Helpers\Helper::number_bn_format($purchaseOrderDetail->total_selling_amount) }}/- tk {{ \App\Helpers\Helper::number_bn_format($purchaseOrderDetail->total_amount) }}/- tk
Total {{ \App\Helpers\Helper::number_bn_format($t_purchase_price) }}/- tk
Total Selling Price {{\App\Helpers\Helper::number_bn_format($t_selling_price)}}/- tk
Sub Total {{\App\Helpers\Helper::number_bn_format($t_purchase_price)}}/- tk
Discount {{\App\Helpers\Helper::number_bn_format($purchase->discount)}}/- tk
Grand Total {{\App\Helpers\Helper::number_bn_format($purchase->grand_total_amount)}}/- tk
Paid {{\App\Helpers\Helper::number_bn_format($purchase->paid_amount)}}/- tk
Due {{\App\Helpers\Helper::number_bn_format($purchase->due_amount)}}/- tk
@endif