82 lines
3.8 KiB
PHP
82 lines
3.8 KiB
PHP
@extends('layouts.app')
|
|
@section('title', __('accounting::lang.subsidiary_ledger'))
|
|
@section('content')
|
|
@include('accounting::layouts.nav')
|
|
<section class="content">
|
|
<div class="box box-primary">
|
|
<div class="box-header with-border text-center">
|
|
<h2 class="box-title">@lang('accounting::lang.subsidiary_ledger')</h2>
|
|
<p>@format_date($start_date) ~ @format_date($end_date)</p>
|
|
</div>
|
|
<div class="box-body">
|
|
<form method="GET" class="form-inline mb-3">
|
|
<div class="form-group">
|
|
<label>@lang('report.date_range'):</label>
|
|
<input type="text" name="start_date" class="form-control input-sm datepicker" value="{{ $start_date }}">
|
|
<input type="text" name="end_date" class="form-control input-sm datepicker" value="{{ $end_date }}">
|
|
</div>
|
|
<div class="form-group">
|
|
<select name="dimension_type" class="form-control" id="subsidiary_dimension_type">
|
|
@foreach($dimension_types as $type)
|
|
<option value="{{ $type }}" @if($dimension_type === $type) selected @endif>
|
|
@lang('accounting::lang.dimension_'.$type)
|
|
</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
<div class="form-group" id="contact_type_filter" @if($dimension_type !== 'contact') style="display:none" @endif>
|
|
<select name="contact_type" class="form-control">
|
|
<option value="">@lang('accounting::lang.all_contacts')</option>
|
|
@foreach($contact_types as $type)
|
|
<option value="{{ $type }}" @if(($contact_type ?? '') === $type) selected @endif>@lang('lang_v1.'.$type)</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
<button class="btn btn-primary">@lang('messages.filter')</button>
|
|
</form>
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>@lang('lang_v1.holding_code')</th>
|
|
<th>@lang('lang_v1.name')</th>
|
|
@if($dimension_type === 'contact')
|
|
<th>@lang('lang_v1.type')</th>
|
|
@endif
|
|
<th>@lang('accounting::lang.debit')</th>
|
|
<th>@lang('accounting::lang.credit')</th>
|
|
<th>@lang('accounting::lang.net_balance')</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse($rows as $row)
|
|
<tr>
|
|
<td>{{ $row->code }}</td>
|
|
<td>{{ $row->name }}</td>
|
|
@if($dimension_type === 'contact')
|
|
<td>@lang('lang_v1.'.$row->type)</td>
|
|
@endif
|
|
<td>@format_currency($row->total_debit)</td>
|
|
<td>@format_currency($row->total_credit)</td>
|
|
<td>@format_currency($row->net_balance)</td>
|
|
</tr>
|
|
@empty
|
|
<tr><td colspan="{{ $dimension_type === 'contact' ? 6 : 5 }}" class="text-center text-muted">@lang('accounting::lang.no_subsidiary_rows')</td></tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@endsection
|
|
|
|
@section('javascript')
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
$('.datepicker').datepicker({ autoclose: true, format: datepicker_date_format });
|
|
$('#subsidiary_dimension_type').on('change', function () {
|
|
$('#contact_type_filter').toggle($(this).val() === 'contact');
|
|
});
|
|
});
|
|
</script>
|
|
@endsection
|