55 lines
3.3 KiB
PHP
55 lines
3.3 KiB
PHP
@extends('layouts.app')
|
|
@section('title', __('accounting::lang.fiscal_periods'))
|
|
@section('content')
|
|
@include('accounting::layouts.nav')
|
|
<section class="content-header"><h1>@lang('accounting::lang.fiscal_periods')</h1></section>
|
|
<section class="content">
|
|
<div class="box box-primary">
|
|
<div class="box-header"><h3 class="box-title">@lang('accounting::lang.add_fiscal_period')</h3></div>
|
|
<form action="{{ url('accounting/fiscal-periods') }}" method="POST" class="box-body">
|
|
@csrf
|
|
<div class="row">
|
|
<div class="col-md-3"><input type="text" name="name" class="form-control" placeholder="@lang('accounting::lang.period_name')" required></div>
|
|
<div class="col-md-3"><input type="date" name="start_date" class="form-control" required></div>
|
|
<div class="col-md-3"><input type="date" name="end_date" class="form-control" required></div>
|
|
<div class="col-md-3"><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_name')</th><th>@lang('report.start_date')</th><th>@lang('report.end_date')</th><th>@lang('sale.status')</th><th>@lang('messages.action')</th></tr></thead>
|
|
<tbody>
|
|
@foreach($periods as $period)
|
|
<tr>
|
|
<td>{{ $period->name }}</td>
|
|
<td>{{ $period->start_date->format('Y-m-d') }}</td>
|
|
<td>{{ $period->end_date->format('Y-m-d') }}</td>
|
|
<td>{{ $period->is_closed ? __('accounting::lang.closed') : __('accounting::lang.open') }}</td>
|
|
<td>
|
|
@if(! $period->is_closed)
|
|
<form action="{{ route('accounting.closeFiscalPeriod', $period->id) }}" method="POST">
|
|
@csrf
|
|
<div class="form-inline" style="margin-bottom:6px;">
|
|
{!! Form::select('retained_earnings_account_id', $accounts, null, ['class'=>'form-control input-sm','placeholder'=>__('accounting::lang.retained_earnings_account'),'style'=>'min-width:180px']) !!}
|
|
<label style="margin:0 8px;">
|
|
<input type="checkbox" name="create_next_period" value="1"> @lang('accounting::lang.create_next_period')
|
|
</label>
|
|
<button class="btn btn-xs btn-warning">@lang('accounting::lang.close_period')</button>
|
|
</div>
|
|
<small class="text-muted">@lang('accounting::lang.close_period_help')</small>
|
|
</form>
|
|
@else
|
|
<span class="label label-success">@lang('accounting::lang.period_closed')</span>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@endsection
|