{{-- --}} @php($totalBill=0) @php($totalDiscount=0) @php($totalPayment=0) @foreach($payments as $payment) @php($sl = $loop->iteration) {{-- --}} {{-- --}} @endforeach
Sl Date Type Supplier Mobile Product DescriptionQuantityBill(Tk) Discount(Tk) Paid(Tk) Option
{{ numberFormat($sl) }} {{ dateFormat($payment->created_at,'d/m/Y') }} @if($payment->row_id!=null) {{ 'Purchase' }} @else {{ 'Paid' }} @endif {{ $payment->client_id!=null? $payment->client->name : '' }} {{ $payment->client_id!=null? $payment->client->mobile : '' }} @if($payment->row_id != null) @php($j=0) @foreach($payment->purchase->details as $detail) @php($j++) {{ $detail->product->name }} ({{ numberFormat($detail->quantity,3) }} {{ $detail->product->unit->code }})-(Rate-Tk.{{ numberFormat($detail->rate) }}) {!! ($jpurchase->details) and $j>=1)? '
':'' !!} @endforeach {{-- @php($totalBill +=$payment->purchase->total)--}} @php($totalBill +=$payment->purchase->product_cost) @php($totalDiscount +=$payment->purchase->discount) @endif
{{ $payment->row_id != null? numberFormat($payment->purchase->total,2) : '' }}{{ $payment->row_id != null? numberFormat($payment->purchase->product_cost,2) : '' }} {{ $payment->row_id != null? numberFormat($payment->purchase->discount,2) : '' }} {{ numberFormat($payment->amount,2) }} {{-- --}} {{-- --}}
Total {{ numberFormat($totalBill,2) }} {{ numberFormat($totalDiscount,2) }} {{ numberFormat($payments->sum('amount'),2) }}