ultimatepos/Modules/Accounting/Resources/views/holding/mapping_gaps.blade.php

57 lines
2.8 KiB
PHP

@extends('layouts.app')
@section('title', __('accounting::lang.location_mapping_health'))
@section('content')
@include('accounting::layouts.nav')
<section class="content-header">
<h1>@lang('accounting::lang.location_mapping_health')</h1>
<a href="{{ action([\Modules\Accounting\Http\Controllers\SettingsController::class, 'index']) }}" class="btn btn-default btn-sm">@lang('messages.back')</a>
</section>
<section class="content">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">@lang('accounting::lang.location_mapping_health_summary', ['complete' => $report['complete_locations'] ?? 0, 'total' => $report['total_locations'] ?? 0])</h3>
<div class="box-tools">
<form action="{{ route('accounting.syncLocationMappings') }}" method="POST" style="display:inline-block;">
@csrf
<button type="submit" class="btn btn-primary btn-sm">
<i class="fas fa-sync"></i> @lang('accounting::lang.sync_location_mappings')
</button>
</form>
</div>
</div>
<div class="box-body table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>@lang('business.location')</th>
<th>@lang('accounting::lang.scenario')</th>
<th>@lang('sale.status')</th>
<th>@lang('accounting::lang.missing_mappings')</th>
</tr>
</thead>
<tbody>
@forelse(($report['locations'] ?? []) as $locationReport)
@foreach($locationReport['scenarios'] as $scenario)
<tr>
<td>{{ $locationReport['location_name'] }}</td>
<td>{{ $scenario['label'] }}</td>
<td>
@if($scenario['complete'])
<span class="label label-success">@lang('accounting::lang.ready')</span>
@else
<span class="label label-warning">@lang('accounting::lang.not_ready')</span>
@endif
</td>
<td>{{ !empty($scenario['missing']) ? implode(', ', $scenario['missing']) : '-' }}</td>
</tr>
@endforeach
@empty
<tr><td colspan="4" class="text-center">@lang('accounting::lang.no_data')</td></tr>
@endforelse
</tbody>
</table>
</div>
</div>
</section>
@endsection