@extends('layouts.admin') @section('content') @php $readonly=''; @endphp @if($action=='View') @php $readonly='readonly'; @endphp @endif

{{ __($title) }}

@if($action == 'Edit')
{{ method_field('PUT') }} @else @endif @csrf
@if(old('title')) @php $title = old('title'); @endphp @elseif(isset($record->title) && $record->title != '') @php $title = $record->title; @endphp @else @php $title = ''; @endphp @endif @error('title') {{ $message }} @enderror
@if(old('code')) @php $code = old('code'); @endphp @elseif(isset($record->code) && $record->code != '') @php $code = $record->code; @endphp @else @php $code = ''; @endphp @endif
@error('code') {{ $message }} @enderror
@if(old('type')) @php $type = old('type'); @endphp @elseif(isset($record->type) && $record->type != '') @php $type = $record->type; @endphp @else @php $type = ''; @endphp @endif @error('type') {{ $message }} @enderror
@if(old('discount_type')) @php $discount_type = old('discount_type'); @endphp @elseif(isset($record->discount_type) && $record->discount_type != '') @php $discount_type = $record->discount_type; @endphp @else @php $discount_type = ''; @endphp @endif @error('discount_type') {{ $message }} @enderror
@if(old('amount')) @php $amount = old('amount'); @endphp @elseif(isset($record->amount) && $record->amount != '') @php $amount = $record->amount; @endphp @else @php $amount = ''; @endphp @endif @error('amount') {{ $message }} @enderror
@if(old('limit')) @php $limit = old('limit'); @endphp @elseif(isset($record->limit) && $record->limit != '') @php $limit = $record->limit; @endphp @else @php $limit =''; @endphp @endif @error('limit') {{ $message }} @enderror
@if (isset($record)) @php $start_date=date('Y-m-d',strtotime($record->start_date)) @endphp @elseif(old('start_date')) @php $start_date=old('start_date') @endphp @else @php $start_date='' @endphp @endif @error('start_date') {{ $message }} @enderror
@if (isset($record)) @php $end_date=date('Y-m-d',strtotime($record->end_date)) @endphp @elseif(old('end_date')) @php $end_date=old('end_date') @endphp @else @php $end_date='' @endphp @endif @error('end_date') {{ $message }} @enderror
@if (isset($record)) @php $description=$record->description @endphp @elseif(old('description')) @php $description=old('description') @endphp @else @php $description='' @endphp @endif @error('description') {{ $message }} @enderror
@if(isset($record->active)) @php $active = $record->active; @endphp @else @php $active = 1; @endphp @endif
@if(isset($record->partialPayment)) @php $partialPayment = $record->partialPayment; @endphp @else @php $partialPayment = 1; @endphp @endif
@if($action!='View') @endif {!! ($action!='View') ? 'Cancel' : 'Back' !!}
@endsection @push('scripts') @endpush