59 lines
3.7 KiB
PHP
59 lines
3.7 KiB
PHP
@extends('layouts.app')
|
|
@section('title', __('accounting::lang.depreciation'))
|
|
@section('content')
|
|
@include('accounting::layouts.nav')
|
|
<section class="content-header"><h1>@lang('accounting::lang.depreciation')</h1></section>
|
|
<section class="content">
|
|
<div class="box box-warning">
|
|
<div class="box-header"><h3 class="box-title">@lang('accounting::lang.batch_depreciation_from_assets')</h3></div>
|
|
<form action="{{ route('accounting.batchDepreciation') }}" method="POST" class="box-body">
|
|
@csrf
|
|
<div class="row">
|
|
<div class="col-md-3"><input name="period_date" type="date" class="form-control" value="{{ date('Y-m-d') }}" required></div>
|
|
<div class="col-md-3">{!! Form::select('expense_account_id', $accounts, null, ['class'=>'form-control','placeholder'=>__('accounting::lang.expense_account'),'required']) !!}</div>
|
|
<div class="col-md-3">{!! Form::select('accumulated_account_id', $accounts, null, ['class'=>'form-control','placeholder'=>__('accounting::lang.accumulated_account'),'required']) !!}</div>
|
|
<div class="col-md-3"><button class="btn btn-warning">@lang('accounting::lang.run_batch_depreciation')</button></div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="box box-primary">
|
|
<form action="{{ url('accounting/depreciation') }}" method="POST" class="box-body">
|
|
@csrf
|
|
<div class="row">
|
|
<div class="col-md-2"><input name="period_label" class="form-control" placeholder="@lang('accounting::lang.period_label')" required></div>
|
|
<div class="col-md-2"><input name="period_date" type="date" class="form-control" required></div>
|
|
<div class="col-md-2"><input name="depreciation_amount" type="number" step="0.01" class="form-control" placeholder="@lang('accounting::lang.depreciation_amount')" required></div>
|
|
<div class="col-md-2">{!! Form::select('expense_account_id', $accounts, null, ['class'=>'form-control','placeholder'=>__('accounting::lang.expense_account'),'required']) !!}</div>
|
|
<div class="col-md-2">{!! Form::select('accumulated_account_id', $accounts, null, ['class'=>'form-control','placeholder'=>__('accounting::lang.accumulated_account'),'required']) !!}</div>
|
|
<div class="col-md-2"><button class="btn btn-primary">@lang('messages.save')</button></div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="box box-primary">
|
|
<div class="box-body table-responsive">
|
|
<table class="table table-bordered">
|
|
<thead><tr><th>@lang('accounting::lang.period_label')</th><th>@lang('accounting::lang.due_date')</th><th>@lang('sale.amount')</th><th>@lang('sale.status')</th><th>@lang('messages.action')</th></tr></thead>
|
|
<tbody>
|
|
@foreach($runs as $run)
|
|
<tr>
|
|
<td>{{ $run->period_label }}</td>
|
|
<td>{{ $run->period_date }}</td>
|
|
<td>@format_currency($run->depreciation_amount)</td>
|
|
<td>{{ $run->status }}</td>
|
|
<td>
|
|
@if($run->status === 'draft')
|
|
<form action="{{ route('accounting.postDepreciation', $run->id) }}" method="POST">@csrf
|
|
<button class="btn btn-xs btn-success">@lang('accounting::lang.post')</button>
|
|
</form>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
{{ $runs->links() }}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@endsection
|