mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-12 19:21:33 +00:00
206 lines
9.4 KiB
PHP
Executable File
206 lines
9.4 KiB
PHP
Executable File
@extends('layouts.main')
|
|
|
|
@push('styles')
|
|
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
|
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
|
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
|
@endpush
|
|
|
|
@section('content')
|
|
<div class="row bg-title">
|
|
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
|
<h4 class="page-title">{{ __('fixed_assets.fixed_assets') }}</h4>
|
|
</div>
|
|
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
|
<ol class="breadcrumb">
|
|
<li><a href="{{ route('home') }}">{{ __('fixed_assets.dashboard') }}</a></li>
|
|
<li><a href="{{ route('fixed_assets.index') }}">{{ __('fixed_assets.fixed_assets') }}</a></li>
|
|
<li class="active">{{ __('fixed_assets.add') }}</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
|
|
@include('flash::message')
|
|
@if ($errors->any())
|
|
<div class="alert alert-danger">
|
|
<ul>
|
|
@foreach ($errors->all() as $error)
|
|
<li>{{ $error }}</li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
@endif
|
|
|
|
@include('finance::fixed_assets.menu')
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div class="white-box">
|
|
{{ Form::open(['route' => 'fixed_assets.store','data-toggle'=>'validator']) }}
|
|
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="form-group">
|
|
{{ Form::label('name', __('fixed_assets.asset_name')) }}
|
|
{{ Form::text('name', '', ['class'=>'form-control compulsory','required']) }}
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('serial_number', __('fixed_assets.serial_number')) }}
|
|
{{ Form::text('serial_number', '', ['class'=>'form-control']) }}
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('cost_price', __('fixed_assets.cost_price') ." / Asset Value") }}
|
|
{{ Form::number('cost_price', '', ['class'=>'form-control compulsory', 'id'=>'cost_price', 'required']) }}
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('acquisition_date', __('fixed_assets.acquisition_date')) }}
|
|
<div class="input-group">
|
|
{{ Form::text('acquisition_date','',['class' => 'form-control compulsory','required'=>'true','readonly'=>'true','id'=>'datepicker-autoclose']) }}
|
|
<span class="input-group-addon" required><i class="icon-calender"></i></span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('depreciation', __('fixed_assets.depreciation')) }}
|
|
{{ Form::number('depreciation', '', ['class'=>'form-control', 'step' => 'any']) }}
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('item_condition',__('fixed_assets.item_condition')) }}
|
|
<br>
|
|
<div>
|
|
{{ Form::radio('item_condition', 1, false, ["required"]) }} New
|
|
{{ Form::radio('item_condition', 0, false, ["required"]) }} Used
|
|
</div>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('supplier', __('fixed_assets.supplier')) }}
|
|
{{ Form::select('supplier', $suppliers, null, ['class'=>'form-control compulsory', 'required']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('fixed_asset_account', __('fixed_assets.fixed_asset_account')) }}
|
|
{{ Form::select('fixed_asset_account', $fixed_asset_chart_of_accounts, null, ['class'=>'form-control compulsory', 'required']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
<div class="form-group">
|
|
{{ Form::label('warranty_expiration_date',__('fixed_assets.warranty_expiry')) }}
|
|
<div class="input-group">
|
|
{{ Form::text('warranty_expiration_date','',['class' => 'form-control','readonly'=>'true','id'=>'datepicker-autoclose2']) }}
|
|
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
|
</div>
|
|
</div>
|
|
|
|
@php $payment_type = array(''=>'-select-','cash'=>'Cash / EFT / CHEQUE', 'bill'=>'Bill', 'asset_exists'=>'Already Existing Asset'); @endphp
|
|
<div class="form-group">
|
|
{{ Form::label('payment_type', 'Payment Type') }}
|
|
{{ Form::select('payment_type', $payment_type, null, ['class'=>'form-control compulsory', 'required', 'id'=>'payment_type']) }}
|
|
</div>
|
|
|
|
<div id="cash_div" style="display: none">
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('bank_account_id', __('fixed_assets.bank_account')) }}
|
|
{{ Form::select('bank_account_id', $bank_chart_of_accounts, null, ['class'=>'form-control']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('amount_paid', 'Amount Paid') }}
|
|
{{ Form::number('amount_paid', 0, ['class'=>'form-control compulsory', 'required', 'id'=>'amount_paid', 'onkeyup'=>'get_balance()']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('balance', 'balance') }}
|
|
{{ Form::number('balance', 0, ['class'=>'form-control', 'readonly', 'id'=>'balance']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="bill_div" style="display: none">
|
|
<div class="form-group">
|
|
{{ Form::label('payable_account', 'Payable Account') }}
|
|
{{ Form::select('payable_account', $payable_accounts, 14, ['class'=>'form-control']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('description', __('fixed_assets.description')) }}
|
|
{{ Form::textArea('description', '', ['class'=>'form-control', 'rows' => 4]) }}
|
|
</div>
|
|
|
|
<button class="btn btn-rounded btn-success pull-right" onclick="return confirm('Are you sure you wish to purchase this asset ?')">{{ __('fixed_assets.create_fixed_asset') }}</button>
|
|
</div>
|
|
</div>
|
|
{{ Form::close() }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|
|
@push('scripts')
|
|
|
|
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
|
|
|
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
|
|
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
|
|
<script src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
|
|
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
|
|
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
|
|
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
|
|
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
|
|
|
|
<!-- data time piker dependency -->
|
|
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
|
<!-- -->
|
|
|
|
<script>
|
|
$('.table').DataTable({
|
|
dom: 'Bfrtip',
|
|
buttons: [
|
|
'copy', 'csv', 'excel', 'pdf', 'print'
|
|
]
|
|
});
|
|
|
|
$('#datepicker-autoclose,#datepicker-autoclose2').datepicker({
|
|
autoclose: true,
|
|
todayHighlight: true,
|
|
format: 'dd-mm-yyyy',
|
|
setDate: new Date(),
|
|
readOnly: true
|
|
});
|
|
$('#payment_type').change(function() {
|
|
if (this.value === 'cash') {
|
|
$('#cash_div').show();
|
|
$('#bill_div').hide();
|
|
} else if (this.value === 'bill') {
|
|
$('#cash_div').hide()
|
|
$('#bill_div').show()
|
|
} else {
|
|
$('#cash_div').hide()
|
|
$('#bill_div').hide()
|
|
}
|
|
});
|
|
|
|
function get_balance() {
|
|
var bill_div = $('#bill_div');
|
|
let cost_price = $('#cost_price').val();
|
|
let amount_paid = $('#amount_paid').val();
|
|
let balance = parseInt(cost_price) - parseInt(amount_paid);
|
|
$('#balance').val(balance);
|
|
|
|
(balance > 0) ? bill_div.show(): bill_div.hide();
|
|
}
|
|
</script>
|
|
@endpush |