Files
2026-09-21 13:25:44 +01:00

85 lines
4.1 KiB
PHP
Executable File

@extends('m3::liberty-theme.layout.main')
@section('title')
Warehouse Performance Metrics report
@endsection
@section('content')
<div class="container-fluid px-4">
<h1 class="mt-4">Warehouse Performance Metrics report</h1>
<div class="card mb-4">
<div class="card-header">
<form class="needs-validation" enctype="multipart/form-data" method="GET" action="{{ route("m3.OrderLinesOfClosedOrder") }}">
<div class="row d-flex flex-row align-items-center">
@php
// $REPORTDATEDisp = old('REPORTDATEDisp') ?? \DateTime::createFromFormat('Ymd',$REPORTDATEDisp)->format('Y-m-d');
@endphp
{{-- <div class="col">
<label for="REPORTDATEDisp">Date</label>
<input type="date" class="form-control" id="REPORTDATEDisp" name="REPORTDATEDisp" value="{{ $REPORTDATEDisp }}" max={{ date('Y-m-d') }} required>
</div> --}}
<div class="col">
<label for="WHDDA" >Warehouse:</label>
<select class="form-select" id="WHDDA" tabindex="-1" disabled>
@foreach ($IC670M as $key => $IC670MR)
@php $currentWHDDA = trim($IC670MR->WDCO).trim($IC670MR->WDPL).trim($IC670MR->WDWHS); @endphp
<option value="{{ $currentWHDDA }}"
data-comp="{{ trim($IC670MR->WDCO) }}" data-pl="{{ trim($IC670MR->WDPL) }}" data-wh="{{ trim($IC670MR->WDWHS) }}"
{{ ($WHDDA!='' && $WHDDA==$currentWHDDA) ? "selected" : "" }}>
{{ trim(Str::upper($IC670MR->WDWNAM)) }}
</option>
@endforeach
</select>
</div>
<div class="col">
<label for="recipient-name">Division:</label>
<label for="COMPANY" class="visually-hidden">COMPANY</label>
<input type="text" class="form-control" id="COMPANY" required readonly>
</div>
<div class="col">
<label for="recipient-name">Plant:</label>
<label for="PLANT" class="visually-hidden">PLANT</label>
<input type="text" class="form-control" id="PLANT" required readonly>
</div>
<div class="col">
<label for="recipient-name">Warehouse:</label>
<label for="WHS" class="visually-hidden">WHS</label>
<input type="text" class="form-control" id="WHS" required readonly>
</div>
<div class="col">
{{-- <button type="submit" class="btn btn-primary mt-4" id="filterTop">Submit</button> --}}
</div>
</div>
</form>
</div>
<div class="card-body">
@foreach ($allReportsUrls as $fileName=>$reportsUrl)
@php
$fileNameOnly = basename($fileName);
@endphp
<a href='{{ route('m3.downloadFilesWhs', ['filename' => $fileName]) }}' >{{ $fileNameOnly }}</a><br>
@endforeach
</div>
</div>
</div>
@endsection
@section('scripts')
<script>
$(document).ready(function() {
// Update Division/WH/Plant on Warehouse change
$(document).on('change select','#WHDDA',function(){
$("#COMPANY").val($(this).find("option:selected").data("comp"));
$("#PLANT").val($(this).find("option:selected").data("pl"));
$("#WHS").val($(this).find("option:selected").data("wh"));
});
$('#WHDDA').trigger('change');
// $('#filterTop').trigger('click');
// @if (session('message')!='')
// alert("{{ session('message') }}");
// @endif
});
</script>
@endsection