![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/syn.corals.io/Corals/modules/Syndicate/resources/views/fees/ |
@extends('layouts.crud.create_edit') @section('content_header') @component('components.content_header') @slot('page_title') {{ $title_singular }} @endslot @slot('breadcrumb') {{ Breadcrumbs::render('syndicate_fee_create_edit') }} @endslot @endcomponent @endsection @section('content') @parent <div class="row "> <div class="col-md-6"> @component('components.box') {!! CoralsForm::openForm($fee) !!} {!! CoralsForm::customFields($fee) !!} <div class="row"> <div class="col-md-4"> {!! CoralsForm::select("user_id", 'Syndicate::attributes.pharmacy.responsible_pharmacist' ,[], true,null, [ 'class'=>'select2-ajax', 'data'=>[ 'model'=>\Corals\Modules\Syndicate\Models\SyndicateUser::class, 'columns'=> json_encode(['name','email','last_name']), 'show_identifier'=>json_encode('true'), 'selected'=>json_encode([$fee->user_id]), ] ], 'select2') !!} </div> <div class="col-md-4"> {!! CoralsForm::select('type_code', 'Syndicate::attributes.fee.transaction_type',Syndicate::getFeeSetupType(), true, $fee->type_id, [], 'select2') !!} </div> </div> <div class="row"> <div class="col-md-4"> {!! CoralsForm::number('due', 'Syndicate::attributes.fee.due', true) !!} </div> <div class="col-md-4"> {!! CoralsForm::number('year', 'Syndicate::attributes.fee.year', true) !!} </div> </div> <div class="row"> <div class="col-md-4"> <label class="text-lg">{{trans('Syndicate::attributes.fee.paid').': '.$fee->paid}}</label> </div> </div> <div class="row"> <div class="col-md-8"> {!! CoralsForm::textarea('details', 'Syndicate::attributes.fee.details', false) !!} </div> </div> {!! CoralsForm::formButtons() !!} {!! CoralsForm::closeForm($fee) !!} @endcomponent </div> </div> @endsection @section('js') <script> $("#type_code").change(function () { let id = $(this).val(); $.ajax({ type: 'POST', url: '{{URL::to("syndicate/fee-data")}}', dataType: 'json', data: {id: id}, success: (response) => { $("#year").val(response.year); $("#due").val(response.amount); }, error: function () { console.log(this.error) } }) }); </script> @endsection