@extends('layouts.main') @section('content') Print

@include("mainsale._address")
{{now()->format("d M Y")}}
Printed by: {{ auth()->user()->name }}

NB: All Amounts are in UGX


TO:

{{$customer->name}}
{{$customer->phone_number}}
{{$customer->address}}

TRANSACTION STATEMENT


Order
Particulars
Amount
Discount
Bad debts
Payments
Amount Paid
Balance

@php $total_amount = $total_paid = $total_discount = $total_bad_debt = $total_balance = 0; @endphp @foreach ($main_sales as $main_sale) @php $cost = $main_sale->cost($main_sale->id); $paid = $main_sale->paid($main_sale->id); $discount = $main_sale->discount($main_sale->id); $bad_debt = $main_sale->baddebt($main_sale->id); $balance = $main_sale->balance($main_sale->id); $total_amount += $cost; $total_paid += $paid; $total_discount += $discount; $total_bad_debt += $bad_debt; $total_balance += $balance; @endphp
No. {{$main_sale->id}}
{{Carbon\Carbon::parse($main_sale->created_at )->format("d M Y")}}
@foreach ($main_sale->sale as $sell) @endforeach
Item Qty Price
{!! $sell->stock->category->name.'
'.$sell->stock->name !!}
{{ number_format($sell->size) }} {{ number_format($sell->amount) }}
{{ number_format($cost) }}
{{ number_format($discount) }}
{{ number_format($bad_debt) }}
@if($main_sale->salespayment->count() > 0) @foreach ($main_sale->salespayment as $payment) @endforeach
Date Amount MoP
{{Carbon\Carbon::parse($payment->created_at )->format("d M Y")}} {{ number_format($payment->amount) }} {{$payment->source}}
@endif
{{ number_format($paid) }}
{{ number_format($balance) }}

@endforeach
Total
{{ number_format($total_amount) }}
{{ number_format($total_discount) }}
{{ number_format($total_bad_debt) }}
{{ number_format($total_paid) }}
{{ number_format($total_balance) }}

@if($total_balance > 0)

AMOUNT DUE: UGX {{ number_format($total_balance) }}

@include("mainsale._payment_method") @endif

THANK YOU FOR DOING BUSINESS WITH US.

@endsection @section('styles') @endsection @push('scripts') @endpush