109 lines
6.0 KiB
PHP
Executable File
109 lines
6.0 KiB
PHP
Executable File
@extends('m3::liberty-theme.layout.main')
|
|
@section('title')
|
|
Sentinel Doc Archive
|
|
@endsection
|
|
@section('content')
|
|
<!-- /.row -->
|
|
<div class="container-fluid px-4">
|
|
<h1 class="mt-4">Sentinel Doc Archive</h1>
|
|
<div class="card mb-4">
|
|
<div class="card-header">
|
|
<div class="row">
|
|
<div class="col-12 mt-1">
|
|
<form class="needs-validation" enctype="multipart/form-data" method="GET" action="{{ route("m3.M3GetPDFFromCache.index") }}">
|
|
{{-- @csrf --}}
|
|
<div class="mb-3 row">
|
|
<label for="inputPassword2" class="col-sm-1 col-form-label">Del. Note #</label>
|
|
<div class="col-sm-1">
|
|
<label for="SHMACPKR" class="visually-hidden">MACPKR</label>
|
|
<input type="text" class="form-control form-control-sm" name="MACPKR" id="SHMACPKR" value="{{$AYMACPKR}}">
|
|
</div>
|
|
<label for="recipient-name" class="col-sm-1 col-form-label">Warehouse:</label>
|
|
<div class="col-sm-2">
|
|
<label for="WHDDA" class="visually-hidden">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>
|
|
<label for="recipient-name" class="col-sm-1 col-form-label">Division:</label>
|
|
<div class="col-sm-1">
|
|
<label for="COMPANY" class="visually-hidden">COMPANY</label>
|
|
<input type="text" class="form-control" name="COMPANY" id="COMPANY" required readonly>
|
|
</div>
|
|
<label for="recipient-name" class="col-sm-1 col-form-label">Plant:</label>
|
|
<div class="col-sm-1">
|
|
<label for="PLANT" class="visually-hidden">PLANT</label>
|
|
<input type="text" class="form-control" name="PLANT" id="PLANT" required readonly>
|
|
</div>
|
|
<label for="recipient-name" class="col-sm-1 col-form-label">Warehouse:</label>
|
|
<div class="col-sm-1">
|
|
<label for="WHS" class="visually-hidden">WHS</label>
|
|
<input type="text" class="form-control" name="WHS" id="WHS" required readonly>
|
|
</div>
|
|
<div class="col-sm-1">
|
|
<button type="submit" class="btn btn-primary mb-3" id="filterTop">Submit</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
@if($aggmsg!="")
|
|
<div class="text-center"><b> {{ $aggmsg }}
|
|
(
|
|
@foreach($ICM688M1 as $key => $ICM688M1R)
|
|
<a href="M3GetPDFFromCache?MACPKR={{$ICM688M1R->A4MACPKR}}&COMPANY={{$COMPANY}}&PLANT={{$PLANT}}&WHS={{$WHS}}">{{$ICM688M1R->A4MACPKR}}</a>
|
|
@endforeach
|
|
) </b></div>
|
|
@endif
|
|
@if(count($trackingno)>0)
|
|
@foreach($trackingno as $key => $val)
|
|
@if(trim($carrier[$key])=="UPSG")
|
|
<div class="text-center"><b> UPSG <a href=https://www.ups.com/track?loc=en_US&tracknum={{$val}}>{{$val}}</a> </b></div>
|
|
@elseif(trim($carrier[$key])=="FEDG" || trim($carrier[$key])=="FXFE")
|
|
<div class="text-center"><b> Fedex <a href=https://www.fedex.com/fedextrack/?trknbr={{$val}}>{{$val}}</a> </b></div>
|
|
@endif
|
|
@endforeach
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="container-fluid table-responsive">
|
|
@if(count($PDFArray)>0)
|
|
{{-- {{ dump(count($PDFArray)); }} --}}
|
|
@foreach ($PDFArray as $pdf)
|
|
<iframe title="Embedded document" src="data:application/pdf;base64,{{ $pdf }}" style="width: 100%; height: 500px;"></iframe>
|
|
@endforeach
|
|
@endif
|
|
</div>
|
|
</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');
|
|
|
|
// Add event listeners to the date filter inputs
|
|
// $('#STARTDATE, #ENDDATE, #SHMACPKR').on('change', function () {
|
|
// $('#filterTop').on('click', function () {});
|
|
});
|
|
</script>
|
|
@endsection
|