@extends('layouts.app') {{--Important Variables--}} @php $ParentRouteName = 'maintenance.bill_advance'; $moduleName = " Bill Advance"; $breadcrumbMainName = $moduleName; if($action == 'create'){ $form_action = route($ParentRouteName.'.store'); $createItemName = __('lang.create') . $moduleName; $breadcrumbCurrentName = " Create"; $submit_button_text = __('lang.save'); } else if($action == 'edit'){ $form_action = route($ParentRouteName.'.update',$bill_advance->id); $createItemName = __('lang.edit') . $moduleName; $breadcrumbCurrentName = " Edit"; $submit_button_text = __('lang.update'); } $breadcrumbMainIcon = "fas fa-barcode"; $breadcrumbCurrentIcon = "add_box"; @endphp @section('title') {{ $moduleName }}->{{ $createItemName }} @stop @section('top-bar') @include('includes.top-bar') @stop @section('left-sidebar') @include('includes.left-sidebar') @stop @section('content')

{{ $createItemName }} @if($action == 'edit') ( {{ $bill_advance->owner->name }} - {{ $bill_advance->owner->nid }}) @endif


{{ csrf_field() }}
@if($action == 'edit')
@endif
@if($action == 'edit')
{{ __('lang.bills') }} @if(count($bill_advance->bill_advance_items) ==0)
{{ __('lang.there_has_no_data') }}
@else @php $total_advance_amount = 0; @endphp @foreach ($bill_advance->bill_advance_items as $bill_advance_item ) @php $total_advance_amount += $bill_advance_item->advance_amount; if($bill_advance->bill_type == 'owner_bill' ){ $bill_type = 'Maintenance Bill'; $bill = App\Models\MntOwnerBill::find($bill_advance_item->bill_id); $route = route('maintenance.customer_bill.edit',$bill_advance_item->bill_id); } else if($bill_advance->bill_type == 'electricity_bill' ){ $bill_type = 'Electricity Bill'; $bill = App\Models\MntElectricityBill::find($bill_advance_item->bill_id); $route = route('maintenance.electricity.bill.edit',$bill_advance_item->bill_id); } else if($bill_advance->bill_type == 'water_bill' ){ $bill_type = 'Water Bill'; $bill = App\Models\MntWaterBill::find($bill_advance_item->bill_id); $route = route('maintenance.bill.water.edit',$bill_advance_item->bill_id); } @endphp @endforeach
{{ __('lang.s_no') }} {{ __('lang.type') }} {{ __('lang.bill_no') }} {{ __('lang.advance_amount') }}
{{ $loop->iteration }} {{ $bill_type }} {{ $bill->bill_no }} {{ $transaction->convert_money_format($bill_advance_item->advance_amount) }}
{{ __('lang.total') }} {{ $transaction->convert_money_format($total_advance_amount) }}
@endif
@endif
{{__('lang.back')}}
@stop @push('include-css') @endpush @push('include-js') @endpush