@extends('layouts.horizontal', ['title' => 'Advance Receipt', 'topbarTitle' => 'Print Receipt', 'nonav' => true]) @section('css') @endsection @section('content')
dark logo
{!! $visit_advance[0]->business_address !!}
Phone: {{ $visit_advance[0]->business_phone }}
{{ $visit_advance[0]->customer_name }}
{{ $visit_advance[0]->customer_cell }}
Advance Receipt

Visit ID: #{{ $visit_advance[0]->id_customer_visits }}

Agent: {{ $visit_advance[0]->visit_created_by }}
Visit Created On: {{ $visit_advance[0]->formatted_visit_date }}
@php $row=1; $total=0; $totalAdv=0; $balance=0; @endphp @foreach($visit_services as $service) @php $row++; $total = $total + $service->s_rate; @endphp @endforeach @if($visit_advance[0]->discount > 0) @php $payable = $total - $visit_advance[0]->discount @endphp @else @php $payable = $total; @endphp @endif @foreach($visit_advance as $adv) @php $totalAdv = $totalAdv + $adv->advance_amount @endphp @endforeach @php $balance = $payable - $totalAdv @endphp
# Type Category Service Price
{{ $row }} {{ $service->s_type }} {{ $service->s_category }} {{ $service->service_name }} {{ $service->s_rate != null ? number_format($service->s_rate,2) : "0.00" }}
Total: {{ number_format($total,2) }}
Discount: - {{ number_format($visit_advance[0]->discount,2) }}
Payable: {{ number_format($payable,2) }}
{{ "Advance: ".$adv->formatted_advance_date.' '.strtoupper($adv->advance_mode) }} {{ number_format($adv->advance_amount,2) }}
Balance: {{ number_format($balance,2) }}

THANK YOU FOR YOUR VISIT! It has been our pleasure to serve you, and we hope we see you again soon.

@if($visit_advance[0]->invoice_terms == 'Yes')

Terms : {!! $visit_advance[0]->payment_terms !!}

@endif
@endsection