M3 Integration fixes
This commit is contained in:
Executable
Executable
+9
@@ -0,0 +1,9 @@
|
||||
@extends('m3::layouts.master')
|
||||
|
||||
@section('content')
|
||||
<h1>Hello World</h1>
|
||||
|
||||
<p>
|
||||
This view is loaded from module: {!! config('m3.name') !!}
|
||||
</p>
|
||||
@endsection
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Module M3</title>
|
||||
|
||||
{{-- Laravel Mix - CSS File --}}
|
||||
{{-- <link rel="stylesheet" href="{{ mix('css/m3.css') }}"> --}}
|
||||
|
||||
</head>
|
||||
<body>
|
||||
@yield('content')
|
||||
|
||||
{{-- Laravel Mix - JS File --}}
|
||||
{{-- <script src="{{ mix('js/m3.js') }}"></script> --}}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,92 @@
|
||||
@php
|
||||
# Get Current USER
|
||||
$loggedUser = strtoUpper(m3_user());
|
||||
|
||||
$admin_users = $power_users = $csr = $execUser = "";
|
||||
$UserCO = $UserWHS = $UserPL = '';
|
||||
$WDWNAM = '';
|
||||
$IC670MAllWHS = collect();
|
||||
$m3Connection = config('m3.connection', 'pgsql');
|
||||
$getUsers = [];
|
||||
if (\Illuminate\Support\Facades\Schema::connection($m3Connection)->hasTable('icm428m')) {
|
||||
$getUsers = DB::connection($m3Connection)
|
||||
->table('icm428m')
|
||||
->select('R428US', 'R428ADMUSR', 'R428PWRUSR', 'R428CO', 'R428PL', 'R428WH', 'R42811A', 'R42821A')
|
||||
->where('R428US', $loggedUser)
|
||||
->get();
|
||||
}
|
||||
|
||||
foreach ($getUsers as $key=>$user) {
|
||||
if(trim($user->R428ADMUSR)=="Y") {
|
||||
# Different logic from Qinclude version : this not an Array
|
||||
$admin_users=trim($user->R428ADMUSR);
|
||||
}
|
||||
if(trim($user->R428PWRUSR)=="Y") {
|
||||
# Different logic from Qinclude version : this not an Array
|
||||
$power_users=trim($user->R428PWRUSR);
|
||||
}
|
||||
if(trim($user->R42811A)=="C") {
|
||||
$csr="Y";
|
||||
}
|
||||
if(trim($user->R42821A)=="Y") {
|
||||
$execUser="Y";
|
||||
}
|
||||
$UserCO = $user->R428CO;
|
||||
$UserWHS = $user->R428WH;
|
||||
$UserPL = $user->R428PL;
|
||||
}
|
||||
|
||||
# Get current WHS
|
||||
if ($UserCO !== '' && $UserPL !== '' && $UserWHS !== '' && \Illuminate\Support\Facades\Schema::connection($m3Connection)->hasTable('ic670m')) {
|
||||
$IC670M = DB::connection(config('m3.connection', 'pgsql'))->table('ic670m')
|
||||
->select('WDWNAM')
|
||||
->where('WDCO', $UserCO)
|
||||
->where('WDPL', $UserPL)
|
||||
->where('WDWHS', $UserWHS)
|
||||
->first();
|
||||
$WDWNAM = isset($IC670M->WDWNAM) ? trim($IC670M->WDWNAM) : '';
|
||||
$IC670MAllWHS = DB::connection(config('m3.connection', 'pgsql'))->table('ic670m')->get();
|
||||
}
|
||||
|
||||
# Get the current route information
|
||||
$route = app('request')->route();
|
||||
// dump($route);
|
||||
$pdfURL = str_ends_with($route?->uri() ?? '', 'M3GetPDFFromCache');
|
||||
// dump("CSR:".$csr .' SDA:'.$pdfURL);
|
||||
|
||||
$callingProgramPacking = app('request')->request->get('callingProgram')=='Packing' ? true : false;
|
||||
// dump($callingProgramPacking);
|
||||
@endphp
|
||||
|
||||
<x-layouts.app :title="trim($__env->yieldContent('title', 'M3'))">
|
||||
<div class="m3-core-page" data-m3-module>
|
||||
@include('m3::liberty-theme.partials.styles')
|
||||
<link href="{{ route('m3.assets', ['path' => 'liberty-theme/css/m3-core-shell.css']) }}" rel="stylesheet" />
|
||||
|
||||
<div class="m3-core-header">
|
||||
<div>
|
||||
<p class="m3-core-eyebrow">M3 INTEGRATION</p>
|
||||
<h1 class="m3-core-title">@yield('title', 'M3')</h1>
|
||||
@if($WDWNAM !== '')
|
||||
<p class="m3-core-context">{{ $WDWNAM }}</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="m3-core-actions">@yield('btn')</div>
|
||||
</div>
|
||||
|
||||
@hasSection('breadcrumb')
|
||||
<div class="m3-core-breadcrumb">@yield('breadcrumb')</div>
|
||||
@endif
|
||||
|
||||
<section class="m3-core-content">
|
||||
@if($csr === '' || ($csr === 'Y' && $pdfURL))
|
||||
@yield('content')
|
||||
@else
|
||||
<div class="m3-core-alert">403 - Unauthorized</div>
|
||||
@endif
|
||||
</section>
|
||||
|
||||
@include('m3::liberty-theme.partials.scripts')
|
||||
@yield('scripts')
|
||||
</div>
|
||||
</x-layouts.app>
|
||||
@@ -0,0 +1,67 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Solon Sentinel Portal - Scan Boxes To Pallet
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="container-fluid px-4">
|
||||
<h1 class="mt-4">Scan Boxes To Pallet</h1>
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<form id="palletForm" method="GET" action="{{ route('m3.BoxPackToPallet.getboxes') }}">
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<label for="R659PALT" class="col-form-label text-nowrap">Scan Pallet</label>
|
||||
<input type="text"
|
||||
id="R659PALT"
|
||||
class="form-control"
|
||||
name="R659PALT"
|
||||
placeholder="S000000000000"
|
||||
maxlength="12"
|
||||
value=""
|
||||
style="max-width: 220px;">
|
||||
<div id="palletError" class="text-danger small" style="display:none;"></div>
|
||||
<button type="submit" class="btn btn-primary text-nowrap">Scan Pallet</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('#palletForm').on('submit', function (e) {
|
||||
const val = $('#R659PALT').val().trim();
|
||||
const $error = $('#palletError');
|
||||
|
||||
if (!val.startsWith('S')) {
|
||||
e.preventDefault();
|
||||
$error.text('Pallet must start with "S".').show();
|
||||
$('#R659PALT').addClass('is-invalid');
|
||||
return;
|
||||
}
|
||||
|
||||
if (val.length > 12) {
|
||||
e.preventDefault();
|
||||
$error.text('Pallet must be 12 characters max.').show();
|
||||
$('#R659PALT').addClass('is-invalid');
|
||||
return;
|
||||
}
|
||||
|
||||
$error.hide();
|
||||
$('#R659PALT').removeClass('is-invalid');
|
||||
});
|
||||
|
||||
// Clear error on input
|
||||
$('#R659PALT').on('input', function () {
|
||||
$('#palletError').hide();
|
||||
$(this).removeClass('is-invalid');
|
||||
});
|
||||
|
||||
$('#R659PALT').on('change', function () {
|
||||
$('#palletForm').submit();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
+331
@@ -0,0 +1,331 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
|
||||
@section('title')
|
||||
Solon Sentinel Portal - Load Boxes on Pallets
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid px-4">
|
||||
<h4 class="mt-4">Load Boxes on Pallets</h4>
|
||||
|
||||
<div class="row mb-2">
|
||||
{{-- ── Pallet Header Card ─────────────────────────────── --}}
|
||||
<div class="col-6">
|
||||
<div class="card mb-3 border-primary h-100">
|
||||
<div class="card-header bg-primary text-white fw-bold d-flex justify-content-between align-items-center">
|
||||
<span>Pallet Information</span>
|
||||
<span><a class="btn btn-info" href="{{ route('m3.BoxPackToPallet') }}">Next Pallet</a></span>
|
||||
</div>
|
||||
<div class="card-body py-2">
|
||||
<div class="row g-2 align-items-center">
|
||||
<div class="col-auto">
|
||||
<span class="text-muted small">Pallet #</span>
|
||||
<span id="hdr-pallet" class="fs-5 fw-bold ms-1">{{ $R659PALT }}</span>
|
||||
</div>
|
||||
<div class="col-auto border-start ps-3">
|
||||
<span class="text-muted small">User</span>
|
||||
<span id="hdr-user" class="ms-1">
|
||||
{{ $palletHeader->R659USER ?? (m3_user() !== '' ? Str::upper(m3_user()) : '—') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-auto border-start ps-3">
|
||||
<span class="text-muted small">Date</span>
|
||||
<span id="hdr-date" class="ms-1">
|
||||
{{ $palletHeader ? $palletHeader->R659DATE : '—' }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-auto border-start ps-3">
|
||||
<span class="text-muted small">Time</span>
|
||||
<span id="hdr-time" class="ms-1">
|
||||
{{ $palletHeader ? $palletHeader->R659TIME : '—' }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{-- ── Scan Input Card ────────────────────────────────── --}}
|
||||
<div class="col-6">
|
||||
<div class="card mb-4 border-secondary h-100">
|
||||
<div class="card-header fw-semibold d-flex justify-content-between align-items-center">
|
||||
<span>Scan Box Barcode</span>
|
||||
{{-- <span id="scan-alert-badge" class="badge bg-danger d-none">Danger</span> --}}
|
||||
</div>
|
||||
<div class="card-body py-2">
|
||||
<div class="d-flex align-items-center gap-2 flex-wrap">
|
||||
<div>
|
||||
<div class="input-group">
|
||||
<div class="input-group-text">Box #</div>
|
||||
<label for="scan-input" class="visually-hidden">Scan or type box #</label>
|
||||
<input type="text" id="scan-input" class="form-control" maxlength="12"
|
||||
placeholder="Scan or type box #" autocomplete="off" autofocus style="width: 180px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-auto">
|
||||
<button id="btn-scan" class="btn btn-success">
|
||||
<i class="fas fa-barcode me-1"></i> Add Box
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
{{-- <div id="scan-alert-1" class="d-none align-self-center"></div> --}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{{-- ── Boxes DataTable Card ────────────────────────────── --}}
|
||||
<div class="card mb-4">
|
||||
<div class="card-header fw-semibold d-flex justify-content-between align-items-center">
|
||||
<span>Boxes on Pallet</span>
|
||||
<span id="box-count" class="badge bg-secondary">0 boxes</span>
|
||||
</div>
|
||||
<div class="card-body p-1">
|
||||
<div class="table-responsive">
|
||||
<table id="boxes-table" class="table table-striped table-hover mb-0 w-100">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Box #</th>
|
||||
<th>Carrier</th>
|
||||
<th>Conveyor</th>
|
||||
<th>Country</th>
|
||||
<th>Status</th>
|
||||
<th>User</th>
|
||||
<th>Date</th>
|
||||
<th>Time</th>
|
||||
<th class="text-center">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
const PALT = '{{ $R659PALT ?? '' }}';
|
||||
const GET_URL = '{{ route('m3.BoxPackToPallet.getboxes') }}';
|
||||
const SCAN_URL = '{{ route('m3.BoxPackToPallet.scanboxes') }}';
|
||||
const DEL_URL = '{{ route('m3.BoxPackToPallet.deletebox') }}';
|
||||
|
||||
// Seed from PHP on first load — avoids a redundant AJAX call on page load
|
||||
const initialData = @json($boxes ?? []);
|
||||
|
||||
// ── DataTable init ────────────────────────────────────────
|
||||
const dt = $('#boxes-table').DataTable({
|
||||
data: initialData,
|
||||
columns: [{
|
||||
data: 'R659BOX'
|
||||
},
|
||||
{
|
||||
data: 'AYSPR15A01',
|
||||
defaultContent: '—'
|
||||
},
|
||||
{
|
||||
data: 'CONVEYOR_NAME',
|
||||
defaultContent: '—'
|
||||
},
|
||||
{
|
||||
data: 'A4SHSHCT',
|
||||
defaultContent: '—'
|
||||
},
|
||||
{
|
||||
data: 'R659LOADED',
|
||||
render: val => (val ?? '').toString().trim() ?
|
||||
'<span class="badge bg-success">Loaded</span>' :
|
||||
'<span class="badge bg-warning text-dark">Pending</span>'
|
||||
},
|
||||
{
|
||||
data: 'R659USER'
|
||||
},
|
||||
{
|
||||
data: 'R659DATE',
|
||||
render: val => val
|
||||
},
|
||||
{
|
||||
data: 'R659TIME',
|
||||
render: val => val
|
||||
},
|
||||
{
|
||||
data: null,
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
className: 'text-center',
|
||||
render: row => {
|
||||
const loaded = (row.R659LOADED ?? '').toString().trim();
|
||||
if (loaded) return '—';
|
||||
return `<button class="btn btn-danger btn-sm btn-delete"
|
||||
data-box="${row.R659BOX}">
|
||||
<i class="fas fa-trash-alt"></i>
|
||||
</button>`;
|
||||
}
|
||||
},
|
||||
],
|
||||
order: [],
|
||||
pageLength: 25,
|
||||
responsive: true,
|
||||
select: false,
|
||||
buttons: false,
|
||||
dom: "<'row mt-2'<'col-sm-12 col-md-2'l><'col-sm-12 col-md-3'f>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row mt-2'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||
// Override columnDefs to remove the checkbox class
|
||||
columnDefs: [{
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
targets: -1
|
||||
}]
|
||||
});
|
||||
|
||||
// Update count badge on init
|
||||
updateCount();
|
||||
|
||||
// ── Refresh table via AJAX (after scan or delete) ─────────
|
||||
function reloadBoxes() {
|
||||
$.get(GET_URL, {
|
||||
R659PALT: PALT
|
||||
}, function(res) {
|
||||
if (res.success) {
|
||||
dt.clear().rows.add(res.data).draw();
|
||||
updateCount();
|
||||
}
|
||||
}).fail(function() {
|
||||
showAlert('danger', 'Failed to refresh boxes.');
|
||||
});
|
||||
}
|
||||
|
||||
// ── Scan / Add box ────────────────────────────────────────
|
||||
function doScan() {
|
||||
const box = $('#scan-input').val().trim().toUpperCase();
|
||||
if (!box) return;
|
||||
|
||||
$('#btn-scan').prop('disabled', true).html(
|
||||
'<span class="spinner-border spinner-border-sm"></span>');
|
||||
|
||||
$.post(SCAN_URL, {
|
||||
R659PALT: PALT,
|
||||
R659BOX: box,
|
||||
_token: '{{ csrf_token() }}'
|
||||
})
|
||||
.done(function(res) {
|
||||
showAlert('success', res.message);
|
||||
dt.clear().rows.add(res.data).draw();
|
||||
updateCount();
|
||||
$('#scan-input').val('').focus();
|
||||
})
|
||||
.fail(function(xhr) {
|
||||
showAlert('danger', xhr.responseJSON?.message ?? 'Scan failed.');
|
||||
$('#scan-input').select().focus();
|
||||
})
|
||||
.always(function() {
|
||||
$('#btn-scan').prop('disabled', false).html(
|
||||
'<i class="fas fa-barcode me-1"></i> Add Box');
|
||||
});
|
||||
}
|
||||
|
||||
$('#btn-scan').on('click', doScan);
|
||||
$('#scan-input').on('change', function(e) {
|
||||
// if (e.key === 'Enter') doScan();
|
||||
doScan();
|
||||
});
|
||||
|
||||
// ── Delete box ────────────────────────────────────────────
|
||||
$('#boxes-table').on('click', '.btn-delete', function() {
|
||||
const box = $(this).data('box');
|
||||
|
||||
Swal.fire({
|
||||
title: 'Remove Box?',
|
||||
text: `Remove box ${box} from pallet ${PALT}?`,
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, remove it',
|
||||
}).then(result => {
|
||||
if (!result.isConfirmed) return;
|
||||
|
||||
$.post(DEL_URL, {
|
||||
R659PALT: PALT,
|
||||
R659BOX: box,
|
||||
_token: '{{ csrf_token() }}'
|
||||
})
|
||||
.done(function(res) {
|
||||
showAlert('success', res.message);
|
||||
dt.clear().rows.add(res.data).draw();
|
||||
updateCount();
|
||||
})
|
||||
.fail(function(xhr) {
|
||||
showAlert('danger', xhr.responseJSON?.message ?? 'Delete failed.');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// ── Helpers ───────────────────────────────────────────────
|
||||
function updateCount() {
|
||||
const n = dt.data().length;
|
||||
$('#box-count').text(n + ' box' + (n !== 1 ? 'es' : ''));
|
||||
}
|
||||
|
||||
function playDing() {
|
||||
const ctx = new AudioContext();
|
||||
const oscillator = ctx.createOscillator();
|
||||
const gainNode = ctx.createGain();
|
||||
|
||||
oscillator.connect(gainNode);
|
||||
gainNode.connect(ctx.destination);
|
||||
|
||||
oscillator.type = 'sine';
|
||||
oscillator.frequency.setValueAtTime(880, ctx.currentTime); // A5 note
|
||||
|
||||
// Fade out for a natural "ding" decay
|
||||
gainNode.gain.setValueAtTime(1, ctx.currentTime);
|
||||
gainNode.gain.exponentialRampToValueAtTime(0.001, ctx.currentTime + 1.5);
|
||||
|
||||
oscillator.start(ctx.currentTime);
|
||||
oscillator.stop(ctx.currentTime + 1.5);
|
||||
}
|
||||
|
||||
function showAlert(type, msg) {
|
||||
let iconType;
|
||||
|
||||
// Map your badge types to SweetAlert icons
|
||||
if (type === 'success') iconType = 'success';
|
||||
else if (type === 'danger') iconType = 'error';
|
||||
else if (type === 'warning') iconType = 'warning';
|
||||
else iconType = 'info';
|
||||
|
||||
if (type === 'danger' || type === 'warning') {
|
||||
playDing();
|
||||
|
||||
Swal.fire({
|
||||
icon: iconType,
|
||||
title: msg,
|
||||
showConfirmButton: true,
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) $('#scan-input').select().focus();
|
||||
});
|
||||
} else {
|
||||
Swal.fire({
|
||||
toast: true,
|
||||
position: 'bottom-end',
|
||||
icon: iconType,
|
||||
title: msg,
|
||||
showConfirmButton: false,
|
||||
timer: 3000,
|
||||
timerProgressBar: true
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
document.body.classList.toggle('sb-sidenav-toggled');
|
||||
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,277 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Solon Sentinel Portal - M3 Delivery Methods
|
||||
@endsection
|
||||
@section('content')
|
||||
<!-- /.row -->
|
||||
<div class="container-fluid px-4">
|
||||
<h1 class="mt-4">M3 Delivery Methods Maintenance</h1>
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
@if($power_user->R428PWRUSR=="Y")
|
||||
<button name="M3DeliveryAdd" type="button" class="btn btn-sm btn-info M3DeliveryAdd_click" id="M3DeliveryAdd_click"
|
||||
data-AT9DPW="{{$power_user->R428CO.$power_user->R428PL.$power_user->R428WH}}">Add Record</button>
|
||||
@endif
|
||||
</div>
|
||||
{{-- // AVCO AVCO CHARACTER 3 No ' ' Division
|
||||
// AVWHS AVWHS CHARACTER 3 No ' ' Warehouse
|
||||
// AVPLANT AVPLANT CHARACTER 3 No ' ' Plant
|
||||
// AVDELMETH AVDELMETH CHARACTER 4 No ' ' Delivery method
|
||||
// AVSHPVIA AVSHPVIA CHARACTER 4 No ' ' Sentinel ship via
|
||||
// AVSHSRT AVSHSRT CHARACTER 6 No ' ' Sentinel route
|
||||
// AVSHORCL AVSHORCL CHARACTER 3 No ' ' Sentinel intl code --}}
|
||||
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover" id="datatablesSimple5" style="width:80%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th>Delivery method</th>
|
||||
<th>Ship Via</th>
|
||||
<th>Route</th>
|
||||
<th>Intl code</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($ICM664M as $key=>$val)
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
@if($power_user->R428PWRUSR=="Y")
|
||||
<button name="M3DeliveryEdit{{trim($val->AVDELMETH)}}" type="submit" class="btn btn-sm btn-info M3DeliveryEdit_click" id="M3DeliveryEdit_click"
|
||||
data-AVDELMETH="{{$val->AVDELMETH}}" data-AVSHPVIA="{{trim($val->AVSHPVIA)}}" data-AVSHSRT="{{trim($val->AVSHSRT)}}"
|
||||
data-AVSHORCL="{{trim($val->AVSHORCL)}}"
|
||||
>Edit</button>
|
||||
@endif
|
||||
</td>
|
||||
<td> {{ $val->AVDELMETH }} </td>
|
||||
<td> {{ $val->AVSHPVIA }} </td>
|
||||
<td> {{ $val->AVSHSRT }} </td>
|
||||
<td> {{ $val->AVSHORCL }} </td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<!-- endif-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
<!-- @include('m3::liberty-theme.partials.modals.blank') -->
|
||||
@include('m3::liberty-theme.partials.modals.M3DeliveryAdd')
|
||||
@include('m3::liberty-theme.partials.modals.M3DeliveryEdit')
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
// DataTable init
|
||||
var myTable = $('#datatablesSimple5').DataTable({
|
||||
"aaSorting": [],
|
||||
"lengthMenu": [ [15,35,50,-1], [15,35,50,"All"] ],
|
||||
"sPaginationType": "full_numbers",
|
||||
"dom": 'Bfrtip', // Needs button container
|
||||
"responsive": true,
|
||||
"orderCellsTop": true,
|
||||
"order": [ [2, 'asc'] ],
|
||||
"pageLength": 15,
|
||||
"columnDefs": [
|
||||
{
|
||||
orderable: true,
|
||||
searchable: true,
|
||||
targets: -1
|
||||
}
|
||||
],
|
||||
|
||||
});
|
||||
|
||||
//
|
||||
// Open Modal M3Delivery Edit
|
||||
//
|
||||
// AVCO AVCO CHARACTER 3 No ' ' Division
|
||||
// AVWHS AVWHS CHARACTER 3 No ' ' Warehouse
|
||||
// AVPLANT AVPLANT CHARACTER 3 No ' ' Plant
|
||||
// AVDELMETH AVDELMETH CHARACTER 4 No ' ' Delivery method
|
||||
// AVSHPVIA AVSHPVIA CHARACTER 4 No ' ' Sentinel ship via
|
||||
// AVSHSRT AVSHSRT CHARACTER 6 No ' ' Sentinel route
|
||||
// AVSHORCL AVSHORCL CHARACTER 3 No ' ' Sentinel intl code
|
||||
|
||||
$(document).on('click', '#M3DeliveryEdit_click', function() {
|
||||
// console.log($(this));
|
||||
$("#AVDELMETH").val($(this).data("avdelmeth"));
|
||||
$("#AVSHPVIA").val($(this).data("avshpvia"));
|
||||
$("#AVSHSRT").val($(this).data("avshsrt"));
|
||||
$("#AVSHORCL").val($(this).data("avshorcl"));
|
||||
|
||||
$("#OLD_AVDELMETH").val($(this).data("avdelmeth"));
|
||||
$("#OLD_AVSHPVIA").val($(this).data("avshpvia"));
|
||||
$("#OLD_AVSHSRT").val($(this).data("avshsrt"));
|
||||
$("#OLD_AVSHORCL").val($(this).data("avshorcl"));
|
||||
|
||||
$('#M3DeliveryEdit').modal('show');
|
||||
});
|
||||
|
||||
//
|
||||
// Open Modal M3Delivery Add
|
||||
//
|
||||
$(document).on('click', '#M3DeliveryAdd_click', function() {
|
||||
// console.log($(this));
|
||||
$('#M3DeliveryAdd').modal('show');
|
||||
});
|
||||
|
||||
|
||||
// Clear values on Edit form when Close is clicked
|
||||
$(document).on('click', '#closeEdit', function() {
|
||||
document.getElementById("frmEdit").reset();
|
||||
});
|
||||
|
||||
// Clear values on Add form when Close is clicked
|
||||
$(document).on('click', '#closeAdd', function() {
|
||||
document.getElementById("frmAdd").reset();
|
||||
});
|
||||
|
||||
//
|
||||
// Save M3Delivery Edit
|
||||
//
|
||||
$(document).on('click', '#submitM3DeliveryEdit', function() {
|
||||
|
||||
var changes_detected = 0;
|
||||
var errors_found = 0;
|
||||
|
||||
// Retrieve the values we need to pass on
|
||||
var NEW_AVDELMETH = $("#AVDELMETH").val();
|
||||
var NEW_AVSHPVIA = $("#AVSHPVIA").val();
|
||||
var NEW_AVSHSRT = $("#AVSHSRT").val();
|
||||
var NEW_AVSHORCL = $("#AVSHORCL").val();
|
||||
var NEW_AVCO = $("#AVCO").val();
|
||||
var NEW_AVPLANT = $("#AVPLANT").val();
|
||||
var NEW_AVWHS = $("#AVWHS").val();
|
||||
|
||||
// Retrieve old values
|
||||
var OLD_AVDELMETH = $("#OLD_AVDELMETH").val();
|
||||
var OLD_AVSHPVIA = $("#OLD_AVSHPVIA").val();
|
||||
var OLD_AVSHSRT = $("#OLD_AVSHSRT").val();
|
||||
var OLD_AVSHORCL = $("#OLD_AVSHORCL").val();
|
||||
|
||||
if(NEW_AVSHPVIA!=OLD_AVSHPVIA || NEW_AVSHSRT!=OLD_AVSHSRT || NEW_AVSHORCL!=OLD_AVSHORCL) {
|
||||
changes_detected = 1;
|
||||
}
|
||||
if (changes_detected==0) {
|
||||
$('#M3DeliveryEdit').modal('show');
|
||||
alert("No changes have been detected. Please try again");
|
||||
} else {
|
||||
|
||||
if(errors_found==0) {
|
||||
|
||||
var csrf = document.querySelector('meta[name="csrf-token"]').content;
|
||||
var form_post = {
|
||||
'AVDELMETH': NEW_AVDELMETH,
|
||||
'AVSHPVIA': NEW_AVSHPVIA,
|
||||
'AVSHSRT': NEW_AVSHSRT,
|
||||
'AVSHORCL': NEW_AVSHORCL,
|
||||
'AVCO': NEW_AVCO,
|
||||
'AVPLANT': NEW_AVPLANT,
|
||||
'AVWHS': NEW_AVWHS,
|
||||
'_token': csrf
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
url:'/M3Delivery/saveM3DeliveryEdit',
|
||||
data: form_post,
|
||||
success:function(data) {
|
||||
if (data=="success") {
|
||||
//$('#blank-modal').modal('hide');
|
||||
$('#M3DeliveryEdit').modal('hide');
|
||||
// alert("should reload here");
|
||||
location.reload();
|
||||
} else {
|
||||
$("#AVDELMETH").val(NEW_AVDELMETH);
|
||||
$("#AVSHPVIA").val(NEW_AVSHPVIA);
|
||||
$("#AVSHSRT").val(NEW_AVSHSRT);
|
||||
$("#AVSHORCL").val(NEW_AVSHORCL);
|
||||
$("#AVCO").val(NEW_AVCO);
|
||||
$("#AVPLANT").val(NEW_AVPLANT);
|
||||
$("#AVWHS").val(NEW_AVWHS);
|
||||
$("#OLD_AVDELMETH").val(OLD_AVDELMETH);
|
||||
$("#OLD_AVSHPVIA").val(OLD_AVSHPVIA);
|
||||
$("#OLD_AVSHSRT").val(OLD_AVSHSRT);
|
||||
$("#OLD_AVSHORCL").val(OLD_AVSHORCL);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//
|
||||
// Save M3Delivery Add
|
||||
//
|
||||
$(document).on('click', '#submitM3DeliveryAdd', function() {
|
||||
|
||||
var errors_found = 0;
|
||||
|
||||
// Retrieve the values we need to pass on
|
||||
var NEW_AVDELMETH = $("#addAVDELMETH").val();
|
||||
var NEW_AVSHPVIA = $("#addAVSHPVIA").val();
|
||||
var NEW_AVSHSRT = $("#addAVSHSRT").val();
|
||||
var NEW_AVSHORCL = $("#addAVSHORCL").val();
|
||||
var NEW_AVCO = $("#addAVCO").val();
|
||||
var NEW_AVPLANT = $("#addAVPLANT").val();
|
||||
var NEW_AVWHS = $("#addAVWHS").val();
|
||||
|
||||
var csrf = document.querySelector('meta[name="csrf-token"]').content;
|
||||
var form_post = {
|
||||
'AVDELMETH': NEW_AVDELMETH,
|
||||
'AVSHPVIA': NEW_AVSHPVIA,
|
||||
'AVSHSRT': NEW_AVSHSRT,
|
||||
'AVSHORCL': NEW_AVSHORCL,
|
||||
'AVCO': NEW_AVCO,
|
||||
'AVPLANT': NEW_AVPLANT,
|
||||
'AVWHS': NEW_AVWHS,
|
||||
'_token': csrf
|
||||
};
|
||||
|
||||
if(errors_found==0) {
|
||||
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
url:'/M3Delivery/saveM3DeliveryAdd',
|
||||
data: form_post,
|
||||
success:function(data) {
|
||||
if (data=="success") {
|
||||
$('#M3DeliveryAdd').modal('hide');
|
||||
location.reload();
|
||||
} else {
|
||||
$("#addAVDELMETH").val(NEW_AVDELMETH);
|
||||
$("#addAVSHPVIA").val(NEW_AVSHPVIA);
|
||||
$("#addAVSHSRT").val(NEW_AVSHSRT);
|
||||
$("#addAVSHORCL").val(NEW_AVSHORCL);
|
||||
|
||||
if (data=="exists") {
|
||||
alert("Delivery Method entered already exists. Please try again.");
|
||||
$("#addAVDELMETH").val('');
|
||||
$("#addAVSHPVIA").val('');
|
||||
$("#addAVSHSRT").val('');
|
||||
$("#addAVSHORCL").val('');
|
||||
$('#M3DeliveryAdd').modal('show');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//});
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,854 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Transaction log for M3/Sentinel interface
|
||||
@endsection
|
||||
@section('content')
|
||||
<!-- /.row -->
|
||||
<div class="container-fluid px-4">
|
||||
<h1 class="mt-4">Transaction log for M3/Sentinel interface</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" id="formFilters">
|
||||
<div class="mb-3 row align-items-center">
|
||||
{{-- Show errors --}}
|
||||
@php $showerrors = old('SHOWERRORS') ?? $showerrors; @endphp
|
||||
<div class="col-auto">
|
||||
<label class=" form-check-label" for="flexSwitchCheckDefault">Show errors</label>
|
||||
<div class="form-check form-switch">
|
||||
<label for="SHOWERRORS" class="visually-hidden">SHOWERRORS</label>
|
||||
<input class="form-check-input" type="checkbox" id="SHOWERRORS" name="SHOWERRORS"
|
||||
value="Y" {{ $showerrors == 'Y' ? 'checked' : '' }}>
|
||||
</div>
|
||||
</div>
|
||||
{{-- MACPKR --}}
|
||||
<div class="col-auto">
|
||||
<label for="inputPassword2" class="col-form-label">Delivery Note</label>
|
||||
<label for="SHMACPKR" class="visually-hidden">SHMACPKR</label>
|
||||
<input type="text" class="form-control form-control-sm" name="SHMACPKR"
|
||||
id="SHMACPKR" value="{{ old('SHMACPKR') ?? $macpkr }}" maxlength="11">
|
||||
</div>
|
||||
{{-- Start Date --}}
|
||||
<div class="col-auto">
|
||||
<label for="exampleFormControlInput1" class="col-form-label">Start Date</label>
|
||||
<label for="STARTDATE" class="visually-hidden">STARTDATE</label>
|
||||
<input type="date" class="form-control form-control-sm" id="STARTDATE"
|
||||
name="STARTDATE"
|
||||
value="{{ old('STARTDATE') ?? today()->subDays(1)->format('Y-m-d') }}" required>
|
||||
</div>
|
||||
{{-- End Date --}}
|
||||
<div class="col-auto">
|
||||
<label for="exampleFormControlInput1" class="col-form-label">End Date</label>
|
||||
<label for="ENDDATE" class="visually-hidden">ENDDATE</label>
|
||||
<input type="date" class="form-control form-control-sm" id="ENDDATE" name="ENDDATE"
|
||||
value="{{ old('ENDDATE') ?? date('Y-m-d') }}" required>
|
||||
</div>
|
||||
{{-- SHSOURCE --}}
|
||||
<div class="col-auto">
|
||||
<label for="SHSOURCE" class="col-form-label">Source</label>
|
||||
@php
|
||||
$transxTypes = Config::get('arrays.transxTypes');
|
||||
$shsource = old('SHSOURCE') ?? $shsource;
|
||||
@endphp
|
||||
{{-- transxTypes --}}
|
||||
<select class="form-select" name="SHSOURCE" id="SHSOURCE">
|
||||
<option value="">Select Source...</option>
|
||||
@foreach ($transxTypes as $key => $transxType)
|
||||
<option value="{{ $key }}" {{ $shsource == $key ? 'selected' : '' }}>
|
||||
{{ $transxType }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="SKIPDATES" name="SKIPDATES" value="{{ $skipdates }}">
|
||||
|
||||
<div class="col-auto align-self-end">
|
||||
<button type="button" class="btn btn-sm btn-primary" id="filterTop">Submit</button>
|
||||
</div>
|
||||
<div class="col-auto align-self-end">
|
||||
<a type="button" class="btn btn-sm btn-danger" id="refresh">Refresh</a>
|
||||
</div>
|
||||
<div class="col-auto align-self-end">
|
||||
<button type="button" class="btn btn-sm btn-warning mt-4" id="exportExcel">Download
|
||||
Excel</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
{{-- Form for Export --}}
|
||||
<form enctype="multipart/form-data" method="POST" action="{{ route('m3.exporttoExcel699') }}"
|
||||
id="exporttoExcelForm">
|
||||
@csrf
|
||||
<input type="hidden" name="SHMACPKR" id="SHMACPKR1" value="">
|
||||
<input type="hidden" name="SHSOURCE" id="SHSOURCE1" value="">
|
||||
<input type="hidden" name="STARTDATE" id="STARTDATE1" value="">
|
||||
<input type="hidden" name="ENDDATE" id="ENDDATE1" value="">
|
||||
<input type="hidden" name="SHOWERRORS" id="SHOWERRORS1" value="">
|
||||
<input type="hidden" name="SKIPDATES" id="SKIPDATES1" value="{{ $skipdates }}">
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-12 mt-1">
|
||||
{{-- Header Title --}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="container-fluid table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover" id="datatablesSimple5"
|
||||
style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Delivery Note</th>
|
||||
<th>Order #</th>
|
||||
<th>Customer</th>
|
||||
<th>Date</th>
|
||||
<th>Error</th>
|
||||
<th>Error description</th>
|
||||
<th>Request Type</th>
|
||||
<th>Source of transaction</th>
|
||||
<th>User</th>
|
||||
<th>Request or Response Data</th>
|
||||
<th>Error message</th>
|
||||
<th>Division</th>
|
||||
<th>Warehouse</th>
|
||||
<th>Acknowledge/Retry Date</th>
|
||||
<th>Acknowledged/Retried by User</th>
|
||||
<th>Internal Box Number</th>
|
||||
<th>Link to SPD</th>
|
||||
<th>Note</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
var transTypes = JSON.parse('{!! json_encode($transxTypes) !!}');
|
||||
// console.log(transTypes);
|
||||
var usersList = JSON.parse('{!! json_encode($ICM428MCOL) !!}');
|
||||
|
||||
// DataTables Init
|
||||
let copyButtonTrans = 'Copy'
|
||||
let csvButtonTrans = 'CSV'
|
||||
let excelButtonTrans = 'Excel'
|
||||
let pdfButtonTrans = 'PDF'
|
||||
let colvisButtonTrans = 'Columns'
|
||||
let selectAllButtonTrans = 'Select All'
|
||||
let selectNoneButtonTrans = 'Deselect All'
|
||||
|
||||
let languages = {
|
||||
'en': 'https://cdn.datatables.net/plug-ins/1.10.19/i18n/English.json'
|
||||
};
|
||||
|
||||
$.extend(true, $.fn.dataTable.Buttons.defaults.dom.button, {
|
||||
className: 'btn'
|
||||
})
|
||||
// End Datatables
|
||||
|
||||
$(document).ready(function() {
|
||||
// DataTables Columns
|
||||
var columnDefs = [{
|
||||
data: "SHMACPKR",
|
||||
name: "SHMACPKR",
|
||||
render: function(data, type, row) {
|
||||
return '<a class="link-primary getmackpkr" href="#" data-macpkr="' + row.SHMACPKR
|
||||
.trim() + '">' + row.SHMACPKR.trim() + '</a>';
|
||||
}
|
||||
},
|
||||
{
|
||||
data: "A4ONO",
|
||||
name: "A4ONO",
|
||||
render: function(data, type, row) {
|
||||
if (data != null) {
|
||||
return data;
|
||||
} else {
|
||||
return row.A1ONO;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
data: "A4SHSHNM",
|
||||
name: "A4SHSHNM",
|
||||
render: function(data, type, row) {
|
||||
if (data != null) {
|
||||
return data;
|
||||
} else {
|
||||
return row.A1SHSHNM;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
data: "SHDATETIME",
|
||||
name: "SHDATETIME",
|
||||
type: 'date'
|
||||
},
|
||||
{
|
||||
data: "SHERROR",
|
||||
name: "SHERROR",
|
||||
render: function(data, type, row) {
|
||||
// return data;
|
||||
|
||||
newData = data == 'X' && (row.SHTYPE.trim() == 'M3-QtyChg') ?
|
||||
'<button type="button" class="btn btn-sm btn-warning ml-1 acknowledge" data-shsource="' +
|
||||
row.SHSOURCE.trim() +
|
||||
'" data-macpkr="' + row.SHMACPKR.trim() + '" data-shco="' + row.SHCO.trim() +
|
||||
'" data-shwhs="' + row.SHWHS.trim() + '" ' +
|
||||
' data-shdt="' + row.SHDT.trim() + '" data-shtime="' + row.SHTIME.trim() +
|
||||
'" data-shtype="' + row.SHTYPE.trim() + '">Acknowledge</button>' :
|
||||
data;
|
||||
|
||||
closeBtn = (data == 'X' && (row.SHTYPE.trim() == 'M3-Err-out' || row.SHTYPE
|
||||
.trim() == 'M3-Res-out' || row.SHTYPE.trim() == 'M3-Req-out' || row.SHTYPE
|
||||
.trim() == 'M3-General')) ||
|
||||
(data == 'X' && row.SHSOURCE.trim() == 'M3ReceiverAPI' && (row.SHTYPE.trim() ==
|
||||
'M3-Lis-in' || row.SHTYPE.trim() == 'M3-Lis-JSN')) ||
|
||||
(data == 'X' && row.SHTYPE.trim().toUpperCase() == 'M3-LIS-SPL' && (row.SHSOURCE
|
||||
.trim() == 'ICM710E12' || row.SHSOURCE.trim() == 'ICM710E13' ||
|
||||
row.SHSOURCE.trim() == 'M3ReceiverAPI' || row.SHSOURCE.trim() ==
|
||||
'ICM710E')) ||
|
||||
(data == 'X' && row.SHTYPE.trim() == 'M3-Res-out' && row.SHSOURCE.trim() ==
|
||||
'M3InventoryReportReplen') ?
|
||||
'<button type="button" class="btn btn-sm btn-danger closeErr" data-shsource="' +
|
||||
row.SHSOURCE.trim() +
|
||||
'" data-macpkr="' + row.SHMACPKR.trim() + '" data-shco="' + row.SHCO.trim() +
|
||||
'" data-shwhs="' + row.SHWHS.trim() + '" ' +
|
||||
' data-shdt="' + row.SHDT.trim() + '" data-shtime="' + row.SHTIME.trim() +
|
||||
'" data-shtype="' + row.SHTYPE.trim() +
|
||||
'" title="Close"><i class="fa fa-times" aria-hidden="true"></i></button> ' :
|
||||
'';
|
||||
|
||||
return (data == 'X' && row.SHSOURCE.trim() == 'CloseShipmentCoChargeAPI') || (
|
||||
data == 'X' && row.SHSOURCE.trim() == 'TransferAPIURL' && row.SHTYPE
|
||||
.trim() == 'M3-Res-out') ?
|
||||
'<button type="button" class="btn btn-sm btn-warning retryAPICall" data-shsource="' +
|
||||
row.SHSOURCE.trim() +
|
||||
'" data-macpkr="' + row.SHMACPKR.trim() + '" data-shco="' + row.SHCO.trim() +
|
||||
'" data-shwhs="' + row.SHWHS.trim() + '" ' +
|
||||
' data-shdt="' + row.SHDT.trim() + '" data-shtime="' + row.SHTIME.trim() +
|
||||
'" data-shtype="' + row.SHTYPE.trim() +
|
||||
'" title="Retry"><i class="fas fa-redo-alt"></i></button> ' + closeBtn :
|
||||
data == 'X' && row.SHTYPE.trim().toUpperCase() == 'M3-LIS-SPL' && (row.SHSOURCE
|
||||
.trim() == 'ICM710E12' || row.SHSOURCE.trim() == 'ICM710E13' ||
|
||||
row.SHSOURCE.trim() == 'M3ReceiverAPI' || row.SHSOURCE.trim() == 'ICM710E'
|
||||
) ||
|
||||
(data == 'X' && row.SHSOURCE.trim() == 'M3ReceiverAPI' && (row.SHTYPE.trim() ==
|
||||
'M3-Lis-in' || row.SHTYPE.trim() == 'M3-Lis-JSN')) ||
|
||||
(data == 'X' && row.SHSOURCE.trim() == 'M3InventoryReportListURL') ||
|
||||
(data == 'X' && row.SHSOURCE.trim() == 'TransferAPIURL' && row.SHTYPE.trim() ==
|
||||
'M3-Err-out') ||
|
||||
(data == 'X' && row.SHTYPE.trim() == 'M3-Res-out' && row.SHSOURCE.trim() ==
|
||||
'M3InventoryReportReplen') ?
|
||||
closeBtn :
|
||||
data == 'Z' ?
|
||||
'<b>Closed</b>' :
|
||||
newData;
|
||||
}
|
||||
},
|
||||
{
|
||||
data: "SHDATA",
|
||||
name: "SHDATA",
|
||||
type: 'html',
|
||||
render: function(data, type, row) {
|
||||
var firstOccurrenceIndex = data.indexOf('{') > 0 ? data.indexOf('{') : 0;
|
||||
var TotalLength = data.length;
|
||||
var errorDesc = firstOccurrenceIndex > 0 && TotalLength > 200 ? data.substring(0,
|
||||
firstOccurrenceIndex) : data.substring(0, 200);
|
||||
// console.log(errorDesc);
|
||||
return errorDesc;
|
||||
}
|
||||
},
|
||||
{
|
||||
data: "SHTYPE",
|
||||
name: "SHTYPE"
|
||||
},
|
||||
{
|
||||
data: "SHSOURCE",
|
||||
name: "SHSOURCE",
|
||||
render: function(data, type, row) {
|
||||
var key = data.trim();
|
||||
return transTypes[key] != null ? transTypes[key] : data.trim();
|
||||
}
|
||||
},
|
||||
{
|
||||
data: "R428FIRST",
|
||||
name: "R428FIRST",
|
||||
render: function(data, type, row) {
|
||||
return data != null ? (data.trim() + ' ' + row.R428FAMILY.trim()).toUpperCase() : (
|
||||
row.SHUSER.trim()).toUpperCase();
|
||||
}
|
||||
},
|
||||
{
|
||||
data: "SHDATA",
|
||||
name: "SHDATA",
|
||||
type: 'html',
|
||||
render: function(data, type, row) {
|
||||
return data;
|
||||
}
|
||||
},
|
||||
{
|
||||
data: "SHCODE",
|
||||
name: "SHCODE"
|
||||
},
|
||||
{
|
||||
data: "SHCO",
|
||||
name: "SHCO"
|
||||
},
|
||||
{
|
||||
data: "SHWHS",
|
||||
name: "SHWHS"
|
||||
},
|
||||
{
|
||||
data: "SHACKDATE",
|
||||
name: "SHACKDATE",
|
||||
render: function(data, type, row) {
|
||||
return data + ' ' + row.SHACKTIME;
|
||||
}
|
||||
},
|
||||
{
|
||||
data: "SHACKUSER",
|
||||
name: "SHACKUSER",
|
||||
render: function(data, type, row) {
|
||||
var key = data.trim();
|
||||
var currUser = key;
|
||||
// console.log(key);
|
||||
if (key != '') {
|
||||
usersList.forEach(element => {
|
||||
// console.log(element.R428US+' '+key);
|
||||
if (element.R428US == key) {
|
||||
currUser = element.R428FIRST + ' ' + element.R428FAMILY;
|
||||
// console.log(currUser);
|
||||
}
|
||||
});
|
||||
}
|
||||
return currUser;
|
||||
}
|
||||
},
|
||||
{
|
||||
data: "SHINTBOX",
|
||||
name: "SHINTBOX"
|
||||
},
|
||||
{
|
||||
data: "SHMACPKR",
|
||||
name: "SHMACPKR",
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
render: function(data, type, row) {
|
||||
fullUrl = "{{ Request::url() }}";
|
||||
UrlPath = "{{ Request::path() }}";
|
||||
sendUrl = fullUrl.replace(UrlPath, "");
|
||||
return '<a class="btn btn-sm btn-secondary" href="' + sendUrl +
|
||||
'php/AllSentPkr.php?macpkr_input=' + row.SHMACPKR.trim() + '">SPD</a>';
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
data: "SHACKNOTE",
|
||||
name: "SHACKNOTE"
|
||||
}
|
||||
];
|
||||
|
||||
// DataTables init Config
|
||||
$.extend(true, $.fn.dataTable.defaults, {
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
ajax: {
|
||||
url: '{{ route('m3.M3ErrorsDisplayDT') }}',
|
||||
data: function(d) {
|
||||
d.STARTDATE = $('#STARTDATE').val().trim();
|
||||
d.ENDDATE = $('#ENDDATE').val().trim();
|
||||
d.SHMACPKR = $('#SHMACPKR').val().trim();
|
||||
d.SHSOURCE = $('#SHSOURCE').val().trim();
|
||||
d.SHOWERRORS = $('#SHOWERRORS').is(':checked') ? 'Y' : 'N';
|
||||
d.SKIPDATES = $('#SKIPDATES').val().trim();
|
||||
}
|
||||
},
|
||||
columns: columnDefs,
|
||||
responsive: true,
|
||||
fixedColumns: true,
|
||||
orderCellsTop: true,
|
||||
order: [
|
||||
[3, 'asc'] // Order By Date time
|
||||
],
|
||||
pageLength: 100,
|
||||
"lengthMenu": [
|
||||
[10, 25, 50, 100, 500],
|
||||
[10, 25, 50, 100, 500]
|
||||
],
|
||||
select: {
|
||||
style: 'multi+shift',
|
||||
selector: 'td:first-child'
|
||||
},
|
||||
language: {
|
||||
url: languages['{{ app()->getLocale() }}']
|
||||
},
|
||||
dom: "<'row'<'col-sm-12 col-md-2'l><'col-sm-12 col-md-7'B>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||
// <'col-sm-12 col-md-3'f>
|
||||
buttons: [{
|
||||
extend: 'selectAll',
|
||||
className: 'btn-primary mr-1',
|
||||
text: selectAllButtonTrans,
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
},
|
||||
action: function(e, dt) {
|
||||
e.preventDefault()
|
||||
dt.rows().deselect();
|
||||
dt.rows({
|
||||
search: 'applied'
|
||||
}).select();
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'selectNone',
|
||||
className: 'btn-primary mr-1',
|
||||
text: selectNoneButtonTrans,
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'copy',
|
||||
className: 'btn-default mr-1',
|
||||
text: copyButtonTrans,
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'csv',
|
||||
className: 'btn-default mr-1',
|
||||
text: csvButtonTrans,
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
className: 'btn-default mr-1',
|
||||
text: excelButtonTrans,
|
||||
exportOptions: {
|
||||
columns: ':visible',
|
||||
stripHtml: true
|
||||
},
|
||||
customize: function(xlsx, btnObj, tableInst) {
|
||||
var sheet = xlsx.xl.worksheets['sheet1.xml'];
|
||||
var cellIndexes = tableInst.cells(".bg-danger").indexes();
|
||||
for (var i = 0; i < cellIndexes.length; i++) {
|
||||
var cellIndex = cellIndexes[i];
|
||||
var tblRow = cellIndex['row'] + 3; // adjusted from 0 indexed
|
||||
var tblCol = cellIndex['column']; // adjusted from 0 indexed
|
||||
var xlCol = numberToLetters(tblCol);
|
||||
var excelCell = xlCol + tblRow;
|
||||
$('row c[r=' + excelCell + ']', sheet).attr('s', '11');
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'pdfHtml5',
|
||||
className: 'btn-default mr-1',
|
||||
text: pdfButtonTrans,
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'colvis',
|
||||
className: 'btn-default mr-1',
|
||||
text: colvisButtonTrans,
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
var myTable = $('#datatablesSimple5').DataTable({});
|
||||
|
||||
// Add event listeners to the date filter inputs
|
||||
$('#filterTop,#refresh').on('click', function() {
|
||||
var SHMACPKR = $('#SHMACPKR').val().trim();
|
||||
// Check SHMACPKR for invalid CHARS
|
||||
var numbersOnly = /^[0-9]+$/;
|
||||
if (!SHMACPKR.match(numbersOnly) && SHMACPKR != '') {
|
||||
alert('Only numeric values are allowed for Delivery Note ');
|
||||
$('#SHMACPKR').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Refresh the table data
|
||||
myTable.ajax.reload();
|
||||
});
|
||||
|
||||
// Retry Call API
|
||||
$(document).on('click', '.retryAPICall', function() {
|
||||
$('.retryAPICall').prop("disabled", true);
|
||||
|
||||
SHSOURCE = $(this).data('shsource');
|
||||
SHMACPKR = $(this).data('macpkr');
|
||||
SHCO = $(this).data('shco');
|
||||
SHWHS = $(this).data('shwhs');
|
||||
SHDT = $(this).data('shdt');
|
||||
SHTIME = $(this).data('shtime');
|
||||
SHTYPE = $(this).data('shtype');
|
||||
urlToCall = "";
|
||||
|
||||
fullUrl = "{{ Request::url() }}";
|
||||
UrlPath = "{{ Request::path() }}";
|
||||
sendUrl = fullUrl.replace(UrlPath, "");
|
||||
// console.log(sendUrl);
|
||||
// return false;
|
||||
|
||||
if (SHSOURCE == 'CloseShipmentCoChargeAPI') {
|
||||
urlToCall = sendUrl + "api/" + SHSOURCE + "?TRANSTYPE=P&COMPANY=" + SHCO + "&WHS=" +
|
||||
SHWHS + "&MANIFEST=" + SHMACPKR +
|
||||
"&SHDT=" + SHDT + "&SHTIME=" + SHTIME + "&SHTYPE=" + SHTYPE;
|
||||
} else if (SHSOURCE == 'TransferAPIURL') {
|
||||
urlToCall = sendUrl + "api/" + SHSOURCE + "?TRANSTYPE=R&COMPANY=" + SHCO + "&WHS=" +
|
||||
SHWHS + "&DELIVERYNO=" + SHMACPKR +
|
||||
"&SHDT=" + SHDT + "&SHTIME=" + SHTIME + "&SHTYPE=" + SHTYPE;
|
||||
}
|
||||
// else if (SHSOURCE=='M3ReceiverAPI') {
|
||||
// urlToCall = sendUrl+"api/m3receiver?TRANSTYPE=R&COMPANY="+SHCO+"&WHS="+SHWHS+"&DELIVERYNO="+SHMACPKR+
|
||||
// "&SHDT="+SHDT+"&SHTIME="+SHTIME+"&SHTYPE="+SHTYPE;
|
||||
// }
|
||||
// var urlToCall = "http://esn2.nventco.com:10024/api/"+SHSOURCE+"?TRANSTYPE=R";
|
||||
// console.log(urlToCall); return false;
|
||||
|
||||
// Call API
|
||||
if (urlToCall != '') {
|
||||
var settings = {
|
||||
"url": urlToCall,
|
||||
"method": "POST",
|
||||
"timeout": 0,
|
||||
"headers": {
|
||||
"Content-Type": "application/json",
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content'),
|
||||
},
|
||||
};
|
||||
|
||||
$.ajax(settings).done(function(response) {
|
||||
// console.log(response);
|
||||
if (response.code != '200') {
|
||||
Swal.fire('The retry resulted in another error: ' + response.message);
|
||||
} else {
|
||||
Swal.fire('The retry was Successful');
|
||||
}
|
||||
// Refresh the table data
|
||||
myTable.ajax.reload();
|
||||
$('.retryAPICall').prop("disabled", false);
|
||||
});
|
||||
} else {
|
||||
Swal.fire('It was not possible to issue the retry.');
|
||||
// console.log("URL Not Valid");
|
||||
$('.retryAPICall').prop("disabled", false);
|
||||
}
|
||||
});
|
||||
|
||||
// Acknowledge Call API
|
||||
$(document).on('click', '.acknowledge', function() {
|
||||
$('.acknowledge').prop("disabled", true);
|
||||
|
||||
SHSOURCE = $(this).data('shsource');
|
||||
SHMACPKR = $(this).data('macpkr');
|
||||
SHCO = $(this).data('shco');
|
||||
SHWHS = $(this).data('shwhs');
|
||||
SHDT = $(this).data('shdt');
|
||||
SHTIME = $(this).data('shtime');
|
||||
SHTYPE = $(this).data('shtype');
|
||||
urlToCall = "";
|
||||
// console.log(SHSOURCE);
|
||||
|
||||
fullUrl = "{{ Request::url() }}";
|
||||
UrlPath = "{{ Request::path() }}";
|
||||
sendUrl = fullUrl.replace(UrlPath, "");
|
||||
// console.log(sendUrl);
|
||||
|
||||
Swal.fire({
|
||||
title: 'Acknowledge',
|
||||
text: "Have you ensured that this qty adjustment has been manually posted in the ERP system to ensure that we do not over-invoice the customer?",
|
||||
// icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes',
|
||||
input: 'text',
|
||||
inputAttributes: {
|
||||
autocapitalize: 'off'
|
||||
},
|
||||
// icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes',
|
||||
inputValidator: (value) => {
|
||||
return new Promise((resolve) => {
|
||||
if (value !== '') {
|
||||
resolve();
|
||||
} else {
|
||||
resolve('You should fill a reason.');
|
||||
}
|
||||
})
|
||||
},
|
||||
preConfirm: (text) => {
|
||||
var form_post2 = {
|
||||
SHSOURCE: SHSOURCE,
|
||||
SHMACPKR: SHMACPKR,
|
||||
SHCO: SHCO,
|
||||
SHWHS: SHWHS,
|
||||
SHDT: SHDT,
|
||||
SHTIME: SHTIME,
|
||||
SHTYPE: SHTYPE,
|
||||
SHACKNOTE: text,
|
||||
_token: '{{ csrf_token() }}'
|
||||
};
|
||||
// console.log(form_post2);
|
||||
|
||||
$.ajax({
|
||||
url: "{{ route('m3.M3ErrorsDisplay699') }}",
|
||||
type: "POST",
|
||||
data: form_post2,
|
||||
success: function(response) {
|
||||
if (response.success == true) {
|
||||
// Refresh the table data
|
||||
myTable.ajax.reload();
|
||||
Swal.fire('Acknowledge call was Successful');
|
||||
$('.acknowledge').prop("disabled", false);
|
||||
} else {
|
||||
Swal.fire('Acknowledge Failed');
|
||||
$('.acknowledge').prop("disabled", false);
|
||||
}
|
||||
},
|
||||
error: function(error) {
|
||||
// console.log(error);
|
||||
// alert(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
//
|
||||
} else {
|
||||
$('.acknowledge').prop("disabled", false);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Close Call API
|
||||
$(document).on('click', '.closeErr', function() {
|
||||
$('.closeErr').prop("disabled", true);
|
||||
|
||||
SHSOURCE = $(this).data('shsource');
|
||||
SHMACPKR = $(this).data('macpkr');
|
||||
SHCO = $(this).data('shco');
|
||||
SHWHS = $(this).data('shwhs');
|
||||
SHDT = $(this).data('shdt');
|
||||
SHTIME = $(this).data('shtime');
|
||||
SHTYPE = $(this).data('shtype');
|
||||
|
||||
urlToCall = "";
|
||||
// console.log(SHTYPE);
|
||||
// console.log(SHSOURCE);
|
||||
|
||||
fullUrl = "{{ Request::url() }}";
|
||||
UrlPath = "{{ Request::path() }}";
|
||||
sendUrl = fullUrl.replace(UrlPath, "");
|
||||
// console.log(sendUrl);
|
||||
// return false;
|
||||
|
||||
if (SHTYPE == 'M3-LIS-SPL') {
|
||||
var message = 'Please ask ERP team to correct errors and resend this order';
|
||||
} else {
|
||||
var message =
|
||||
"Please explain what action was taken to ensure the ERP system was updated manually";
|
||||
}
|
||||
// Set Close All Button for Replen
|
||||
if (SHSOURCE == 'M3InventoryReportReplen') {
|
||||
var showCloseAll = true;
|
||||
var closethisErrorMsg = 'Close this error only';
|
||||
} else {
|
||||
var showCloseAll = false;
|
||||
var closethisErrorMsg = 'Close';
|
||||
}
|
||||
|
||||
if (SHSOURCE == 'M3ReceiverAPI') {
|
||||
var noteText = '';
|
||||
} else {
|
||||
var noteText = '';
|
||||
}
|
||||
|
||||
Swal.fire({
|
||||
title: 'Close',
|
||||
text: message,
|
||||
input: 'text',
|
||||
inputValue: noteText,
|
||||
inputAttributes: {
|
||||
autocapitalize: 'off'
|
||||
},
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: closethisErrorMsg,
|
||||
showDenyButton: showCloseAll,
|
||||
denyButtonText: `Close All similar errors`,
|
||||
inputValidator: (value) => {
|
||||
return new Promise((resolve) => {
|
||||
if (value !== '') {
|
||||
resolve();
|
||||
} else {
|
||||
resolve('You should fill a reason.');
|
||||
}
|
||||
})
|
||||
},
|
||||
preConfirm: (text) => {
|
||||
var form_post2 = {
|
||||
SHSOURCE: SHSOURCE,
|
||||
SHMACPKR: SHMACPKR,
|
||||
SHCO: SHCO,
|
||||
SHWHS: SHWHS,
|
||||
SHDT: SHDT,
|
||||
SHTIME: SHTIME,
|
||||
SHTYPE: SHTYPE,
|
||||
SHACKNOTE: text,
|
||||
CLOSESIM: 'N',
|
||||
_token: '{{ csrf_token() }}'
|
||||
};
|
||||
// console.log(form_post2);
|
||||
// return false;
|
||||
|
||||
$.ajax({
|
||||
url: "{{ route('m3.M3ErrorsDisplay699') }}",
|
||||
type: "POST",
|
||||
data: form_post2,
|
||||
success: function(response) {
|
||||
if (response.success == true) {
|
||||
// Refresh the table data
|
||||
myTable.ajax.reload();
|
||||
Swal.fire('Close call was Successful');
|
||||
$('.closeErr').prop("disabled", false);
|
||||
} else {
|
||||
Swal.fire('Close Failed');
|
||||
$('.closeErr').prop("disabled", false);
|
||||
}
|
||||
},
|
||||
error: function(error) {
|
||||
// console.log(error);
|
||||
// alert(error);
|
||||
}
|
||||
});
|
||||
},
|
||||
preDeny: () => {
|
||||
// Get the input value manually
|
||||
const text = Swal.getInput().value;
|
||||
|
||||
// Validate the input
|
||||
if (!text || text.trim() === '') {
|
||||
Swal.showValidationMessage('You should fill a reason.');
|
||||
return false; // Prevent the dialog from closing
|
||||
}
|
||||
var form_post2 = {
|
||||
SHSOURCE: SHSOURCE,
|
||||
SHMACPKR: SHMACPKR,
|
||||
SHCO: SHCO,
|
||||
SHWHS: SHWHS,
|
||||
SHDT: SHDT,
|
||||
SHTIME: SHTIME,
|
||||
SHTYPE: SHTYPE,
|
||||
SHACKNOTE: text,
|
||||
CLOSESIM: 'Y',
|
||||
_token: '{{ csrf_token() }}'
|
||||
};
|
||||
// console.log(form_post2);
|
||||
// return false;
|
||||
$.ajax({
|
||||
url: "{{ route('m3.M3ErrorsDisplay699') }}",
|
||||
type: "POST",
|
||||
data: form_post2,
|
||||
success: function(response) {
|
||||
if (response.success == true) {
|
||||
// Refresh the table data
|
||||
myTable.ajax.reload();
|
||||
Swal.fire('Close call was Successful');
|
||||
$('.closeErr').prop("disabled", false);
|
||||
} else {
|
||||
Swal.fire('Close Failed');
|
||||
$('.closeErr').prop("disabled", false);
|
||||
}
|
||||
},
|
||||
error: function(error) {
|
||||
// console.log(error);
|
||||
// alert(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {} else {
|
||||
// console.log("Canceled...");
|
||||
$('.closeErr').prop("disabled", false);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// Show all Macpkr on click
|
||||
$(document).on('click', '.getmackpkr', function() {
|
||||
mackpkr = $(this).data("macpkr");
|
||||
$('#SHMACPKR').val(mackpkr);
|
||||
// MAK Change Later
|
||||
$('#SHSOURCE').val("");
|
||||
|
||||
// Refresh the table data
|
||||
myTable.ajax.reload();
|
||||
});
|
||||
|
||||
// Prevent Form Submit
|
||||
$("#formFilters").keypress(function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
e.preventDefault();
|
||||
$('#filterTop').trigger('click');
|
||||
return false;
|
||||
}
|
||||
})
|
||||
|
||||
// Export To Excel exportExcel
|
||||
$(document).on('click', '#exportExcel', function() {
|
||||
var SHMACPKR = $('#SHMACPKR').val().trim();
|
||||
// Check SHMACPKR for invalid CHARS
|
||||
var numbersOnly = /^[0-9]+$/;
|
||||
if (!SHMACPKR.match(numbersOnly) && SHMACPKR != '') {
|
||||
alert('Only numeric values are allowed for Delivery Note ');
|
||||
$('#SHMACPKR').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
SHMACPKR = $("#SHMACPKR").val();
|
||||
SHSOURCE = $("#SHSOURCE").val();
|
||||
STARTDATE = $("#STARTDATE").val();
|
||||
ENDDATE = $("#ENDDATE").val();
|
||||
SHOWERRORS = $('#SHOWERRORS').is(':checked') ? 'Y' : 'N';
|
||||
|
||||
$("#SHMACPKR1").val(SHMACPKR);
|
||||
$("#SHSOURCE1").val(SHSOURCE);
|
||||
$("#STARTDATE1").val(STARTDATE);
|
||||
$("#ENDDATE1").val(ENDDATE);
|
||||
$("#SHOWERRORS1").val(SHOWERRORS);
|
||||
|
||||
$("#exporttoExcelForm").submit();
|
||||
|
||||
});
|
||||
|
||||
@if (session('message') != '')
|
||||
alert("{{ session('message') }}");
|
||||
@endif
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,107 @@
|
||||
@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">
|
||||
<select class="form-select" id="WHDDA" aria-label="WHDD" 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
|
||||
@@ -0,0 +1,92 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Solon Sentinel Portal - Manifest Orders
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="container-fluid px-4">
|
||||
<h1 class="mt-4">Manifest Orders</h1>
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
@php
|
||||
$fullUrl = Request::url();
|
||||
$UrlPath = Request::path();
|
||||
$sendUrl = str_replace($UrlPath, "", $fullUrl);
|
||||
@endphp
|
||||
<h6>
|
||||
Manifest #
|
||||
<a class="btn btn-link fw-bold mb-1" target="_blank" href="{{$sendUrl.'php/ClosedTrucksDetail.php?manifest='.$MF}}"> {{ $MF }} </a>
|
||||
<span class="ml-6">Carrier: {{ $carrier }} </span>
|
||||
</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered table-hover" id="datatablesSimple5">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Delivery note</th>
|
||||
<th>Order Number</th>
|
||||
<th>Customer</th>
|
||||
<th>Sentinel Picker Status</th>
|
||||
<th>Total weight</th>
|
||||
<th>Boxes/pallets</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach($ICM695M1 as $key=>$val)
|
||||
@php
|
||||
$A4PICKSTSTMP = isset($val->A4PICKSTS) ? trim($val->A4PICKSTS) : "";
|
||||
$A4PICKSTS = $A4PICKSTSTMP!="" && isset($status_ICM688M1_array[trim($val->A4PICKSTS)]) ?
|
||||
$status_ICM688M1_array[trim($val->A4PICKSTS)] : "";
|
||||
@endphp
|
||||
<tr>
|
||||
<td>
|
||||
<a class="btn btn-link" target="_blank" href="{{$sendUrl.'php/AllSentPkr.php?macpkr_input='.$val->AYMACPKR}}" >
|
||||
{{ $val->AYMACPKR }}
|
||||
</a>
|
||||
</td>
|
||||
<td> {{ $val->AYONO }} </td>
|
||||
<td> {{ $val->A4SHSHNM }} </td>
|
||||
<td> {{ $A4PICKSTS }} </td>
|
||||
<td> {{ number_format($val->TOTWEIGHT, 2) }} </td>
|
||||
<td> {{ $val->BOXPAL }} </td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
// DataTable init
|
||||
$('#datatablesSimple5').DataTable({
|
||||
"aaSorting": [],
|
||||
"lengthMenu": [ [100,200,500,-1], [100,200,500,"All"] ],
|
||||
"sPaginationType": "full_numbers",
|
||||
dom: "<'row mt-2'<'col-sm-12 col-md-2'l><'col-sm-12 col-md-6'B><'col-sm-12 col-md-3'f>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row mt-2'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||
"responsive": true,
|
||||
"orderCellsTop": true,
|
||||
"order": [ [0, 'asc'] ],
|
||||
pageLength: 25,
|
||||
"lengthMenu": [ [10,25,50,100,500], [10,25,50,100,500] ],
|
||||
"columnDefs": [
|
||||
{
|
||||
orderable: true,
|
||||
searchable: true,
|
||||
targets: -1
|
||||
}
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
+320
@@ -0,0 +1,320 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Closed order lines report
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="container-fluid px-4">
|
||||
<h1 class="mt-4">Closed order lines report</h1>
|
||||
<ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active" id="pills-home-tab" data-bs-toggle="pill" data-bs-target="#pills-home" type="button" role="tab" aria-controls="pills-home" aria-selected="true">Daily report</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="pills-profile-tab" data-bs-toggle="pill" data-bs-target="#pills-profile" type="button" role="tab" aria-controls="pills-profile" aria-selected="false">Download Reports</button>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content" id="pills-tabContent">
|
||||
<div class="tab-pane fade show active" id="pills-home" role="tabpanel" aria-labelledby="pills-home-tab">
|
||||
<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="recipient-name" >Warehouse:</label>
|
||||
<select class="form-select" id="WHDDA" aria-label="WHDD" 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">
|
||||
<div class="container-fluid table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover" id="datatableslinesCLosed" style="width:100%">
|
||||
<th scope="col"ead>
|
||||
<tr>
|
||||
<th scope="col"></th>
|
||||
<th scope="col">Close Date</th>
|
||||
<th scope="col">Delivery #</th>
|
||||
<th scope="col">Order #</th>
|
||||
|
||||
<th scope="col">Terms</th>
|
||||
<th scope="col">Weight</th>
|
||||
<th scope="col">Carrier</th>
|
||||
<th scope="col">Mode</th>
|
||||
|
||||
<th scope="col">Order Type</th>
|
||||
<th scope="col">Part #</th>
|
||||
<th scope="col">Reserved</th>
|
||||
<th scope="col">Packed</th>
|
||||
<th scope="col">Back Order Qty</th>
|
||||
<th scope="col">Value Packed $</th>
|
||||
<th scope="col">Customer name</th>
|
||||
{{-- <th scope="col">Date</th>
|
||||
<th scope="col">Time</th> --}}
|
||||
<th scope="col">Failure Reason</th>
|
||||
<th scope="col">Currency Code</th>
|
||||
<th scope="col">Freight</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($ICM688M2 as $key=>$ICM688M2R)
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>{{ $ICM688M2R->SHDT }} {{ $ICM688M2R->SHTIME }} </td>
|
||||
<td class="text-end"><a type="button" class="btn btn-link" target="_blank" href="/php/AllSentPkr.php?macpkr_input={{ $ICM688M2R->A5MACPKR }}">{{ $ICM688M2R->A5MACPKR }}</a></td>
|
||||
<td class="text-end"> {{ $ICM688M2R->A5ONO }} </td>
|
||||
|
||||
<td class="text-end"> {{ $ICM688M2R->A4OFSTRM }} </td>
|
||||
<td class="text-end"> {{ number_format($ICM688M2R->WEIGHT, 2, '.', ',') }} </td>
|
||||
<td class="text-end"> {{ $ICM688M2R->A4SCAC }} </td>
|
||||
<td class="text-end"> {{ $ICM688M2R->A4SHIPTYPE }} </td>
|
||||
|
||||
<td class="text-end"> {{ $ICM688M2R->A4REFORD }} </td>
|
||||
<td> {{ $ICM688M2R->A5PART }} </td>
|
||||
<td class="text-end"> {{ number_format($ICM688M2R->A5RSVQTY, 0, '.', ',') }} </td>
|
||||
<td class="text-end"> {{ number_format($ICM688M2R->A5PACKED, 0, '.', ',') }} </td>
|
||||
<td class="text-end"> {{ number_format($ICM688M2R->CALCULATED_COLUMN, 0, '.', ',') }} </td>
|
||||
<td class="text-end">{{ number_format($ICM688M2R->ANOTHER_CALCULATED_COLUMN, 2, '.', ',') }}</td>
|
||||
<td>{{ $ICM688M2R->A4SHSHNM }} </td>
|
||||
{{-- <td>{{ $ICM688M2R->SHDT }} </td>
|
||||
<td>{{ $ICM688M2R->SHTIME }} </td> --}}
|
||||
<td>{{ substr($ICM688M2R->REASON,0,150) }} </td>
|
||||
<td>{{ $ICM688M2R->A1SHCURR }} </td>
|
||||
<td>{{ $ICM688M2R->FREIGHT }} </td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th scope="col" colspan="12"></th>
|
||||
<th scope="col">Total:</th>
|
||||
<th scope="col" class="text-end"></th>
|
||||
<th scope="col"></th><th scope="col"></th><th scope="col"></th>
|
||||
{{-- <th scope="col"></th><th scope="col"></th> --}}
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="tab-pane fade" id="pills-profile" role="tabpanel" aria-labelledby="pills-profile-tab">
|
||||
<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
|
||||
$todayDate = today()->format('Ymd');
|
||||
$reportDate = old('REPORTDATE') ?? \DateTime::createFromFormat('Ymd',$todayDate)->format('Y-m-d');
|
||||
$toreportDate = old('TOREPORTDATE') ?? \DateTime::createFromFormat('Ymd', $todayDate)->format('Y-m-d');
|
||||
@endphp
|
||||
<div class="col">
|
||||
<label for="REPORTDATE">From Date</label>
|
||||
<input type="date" class="form-control" id="REPORTDATE" name="REPORTDATE" value="{{ $reportDate }}" max={{ date('Y-m-d') }} required>
|
||||
</div>
|
||||
<div class="col">
|
||||
<label for="REPORTDATE">To Date</label>
|
||||
<label for="TOREPORTDATE" class="visually-hidden">TOREPORTDATE</label>
|
||||
<input type="date" class="form-control" id="TOREPORTDATE" name="TOREPORTDATE" value="{{ $toreportDate }}" max={{ date('Y-m-d') }} required>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button type="button" class="btn btn-primary mt-4" id="exportExcel">Download Excel</button>
|
||||
{{-- MAK Used temporarly to generate report on AS400 --}}
|
||||
{{-- <button type="button" class="btn btn-primary mt-4" id="saveExcel">Save Excel</button> --}}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{{-- Form for Export --}}
|
||||
<form enctype="multipart/form-data" method="POST" action="{{ route("m3.exporttoExcel") }}" id="exporttoExcelForm">
|
||||
@csrf
|
||||
<input type="hidden" name="REPORTDATE" id="REPORTDATE1" value="">
|
||||
<input type="hidden" name="TOREPORTDATE" id="TOREPORTDATE1" value="">
|
||||
</form>
|
||||
{{-- Form for Saving Excel --}}
|
||||
<form enctype="multipart/form-data" method="POST" action="{{ route("m3.StoreExcelToDisk") }}" id="StoreExcelToDiskForm">
|
||||
@csrf
|
||||
<input type="hidden" name="REPORTDATE" id="REPORTDATE2" value="">
|
||||
<input type="hidden" name="TOREPORTDATE" id="TOREPORTDATE2" value="">
|
||||
</form>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@foreach ($allReportsUrls as $fileName=>$reportsUrl)
|
||||
@php
|
||||
$fileNameOnly = strpos($fileName, '/')!= false ? substr($fileName, strpos($fileName, '/') + 1) : $fileName;
|
||||
@endphp
|
||||
<a href='{{ route('m3.downloadFiles', ['filename' => $fileName]) }}' >{{ $fileNameOnly }}</a><br>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
{{-- @foreach ($allReportsUrls as $fileName=>$reportsUrl)
|
||||
@php
|
||||
$fileNameOnly = strpos($fileName, '/')!= false ? substr($fileName, strpos($fileName, '/') + 1) : $fileName;
|
||||
@endphp
|
||||
<a href='{{ route('m3.downloadFiles', ['filename' => $fileName]) }}' >{{ $fileNameOnly }}</a><br>
|
||||
@endforeach --}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// DataTable init
|
||||
var myTable = $('#datatableslinesCLosed').DataTable({
|
||||
"aaSorting": [],
|
||||
"lengthMenu": [ [25,50,100,-1], [25,50,100,"All"] ],
|
||||
"sPaginationType": "full_numbers",
|
||||
dom: "<'row mt-2'<'col-sm-12 col-md-2'l><'col-sm-12 col-md-6'B><'col-sm-12 col-md-3'f>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row mt-2'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||
// "dom": 'lBfrtip',
|
||||
"responsive": true,
|
||||
"orderCellsTop": true,
|
||||
"order": [ [1, 'asc'] ],
|
||||
"pageLength": 100,
|
||||
"select": true,
|
||||
"columnDefs": [
|
||||
{
|
||||
orderable: false,
|
||||
className: 'select-checkbox',
|
||||
targets: 0
|
||||
}
|
||||
],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'selectAll',
|
||||
className: 'btn-primary mr-1'
|
||||
},
|
||||
{
|
||||
extend: 'selectNone',
|
||||
className: 'btn-primary mr-1'
|
||||
},
|
||||
{
|
||||
extend: 'copy',
|
||||
className: 'btn-secondary mr-1'
|
||||
},
|
||||
{
|
||||
extend: 'csv',
|
||||
className: 'btn-secondary mr-1'
|
||||
},
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
className: 'btn-secondary mr-1',
|
||||
filename: function(){
|
||||
var date = new Date();
|
||||
// Format the date as desired, for example: 'YYYY-MM-DD'
|
||||
var formattedDate = date.toISOString().split('T')[0];
|
||||
return 'Closed_order_lines_report_' + formattedDate;
|
||||
},
|
||||
title: 'Closed order lines report',
|
||||
footer: true
|
||||
},
|
||||
{
|
||||
extend: 'pdfHtml5',
|
||||
className: 'btn-secondary mr-1',
|
||||
footer: true
|
||||
},
|
||||
{
|
||||
extend: 'colvis',
|
||||
className: 'btn-secondary mr-1'
|
||||
}
|
||||
],
|
||||
footerCallback: function (row, data, start, end, display) {
|
||||
let api = this.api();
|
||||
|
||||
// Remove the formatting to get integer data for summation
|
||||
let intVal = function (i) {
|
||||
return typeof i === 'string'
|
||||
? i.replace(/[\$,]/g, '') * 1
|
||||
: typeof i === 'number'
|
||||
? i
|
||||
: 0;
|
||||
};
|
||||
|
||||
// Total over all pages
|
||||
total = api
|
||||
.column(13)
|
||||
.data()
|
||||
.reduce((a, b) => intVal(a) + intVal(b), 0);
|
||||
|
||||
// Update footer
|
||||
api.column(13).footer().innerHTML = total.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 });;
|
||||
}
|
||||
});
|
||||
|
||||
// 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');
|
||||
|
||||
// Export To Excel exportExcel
|
||||
$(document).on('click','#exportExcel', function () {
|
||||
REPORTDATE = $("#REPORTDATE").val();
|
||||
TOREPORTDATE = $("#TOREPORTDATE").val();
|
||||
|
||||
$("#REPORTDATE1").val(REPORTDATE);
|
||||
$("#TOREPORTDATE1").val(TOREPORTDATE);
|
||||
|
||||
$("#exporttoExcelForm").submit();
|
||||
});
|
||||
|
||||
// Export To Excel exportExcel
|
||||
$(document).on('click','#saveExcel', function () {
|
||||
REPORTDATE = $("#REPORTDATE").val();
|
||||
TOREPORTDATE = $("#TOREPORTDATE").val();
|
||||
|
||||
$("#REPORTDATE2").val(REPORTDATE);
|
||||
$("#TOREPORTDATE2").val(TOREPORTDATE);
|
||||
|
||||
$("#StoreExcelToDiskForm").submit();
|
||||
});
|
||||
|
||||
@if (session('message')!='')
|
||||
alert("{{ session('message') }}");
|
||||
@endif
|
||||
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
+605
@@ -0,0 +1,605 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Solon Sentinel Portal - Replenishment Settings Update
|
||||
@endsection
|
||||
@section('content')
|
||||
<!-- /.row -->
|
||||
<div class="container-fluid px-4">
|
||||
<h1 class="mt-4">Replenishment Settings</h1>
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<button type="button" class="btn btn-primary" id="addRecordBtn">Add Record</button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover" id="datatablesSimple5" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Division</th>
|
||||
<th>Plant</th>
|
||||
<th>Warehouse</th>
|
||||
<th>Location</th>
|
||||
<th>Part</th>
|
||||
<th>Minimum qty</th>
|
||||
<th>Replenishment qty</th>
|
||||
<th>Tolerance</th>
|
||||
<th>Replenishment min qty</th>
|
||||
<th>Lot Controlled</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{-- @foreach ($REFCAT658 as $key => $val)
|
||||
<tr>
|
||||
<td></td>
|
||||
<td> {{ $val->R658CO }} </td>
|
||||
<td> {{ $val->R658PL }} </td>
|
||||
<td> {{ $val->R658WH }} </td>
|
||||
<td> {{ $val->R658LC }} </td>
|
||||
<td> {{ $val->R658PN }} </td>
|
||||
<td> {{ $val->R658MQ }} </td>
|
||||
<td> {{ $val->R658RQ }} </td>
|
||||
<td> {{ $val->R658TL }} </td>
|
||||
<td> {{ $val->R658RMQ }} </td>
|
||||
<td class="text-center">
|
||||
{!! ($val->R658IZLCF ?? '')=='1' ? '<i class="fas fa-lg fa-check"></i>' :'<i class="fas fa-lg fa-times"></i>' !!}
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-sm btn-info editrefcat"
|
||||
data-comp="{{ trim($val->R658CO) }}" data-pl="{{ trim($val->R658PL) }}" data-loc="{{ trim($val->R658LC) }}"
|
||||
data-part="{{ trim($val->R658PN) }}" data-wh="{{ trim($val->R658WH) }}"
|
||||
data-minqty="{{ trim($val->R658MQ) }}" data-repqty="{{ trim($val->R658RQ) }}"
|
||||
data-repminqty="{{ trim($val->R658RMQ) }}" data-tol="{{ trim($val->R658TL) }}"
|
||||
data-controlled="{{ trim($val->R658IZLCF) }}"
|
||||
title="Edit Replenishment">
|
||||
Edit
|
||||
</button>
|
||||
<button type="button" class="btn btn-sm btn-danger deleterefcat"
|
||||
data-comp="{{ trim($val->R658CO) }}" data-pl="{{ trim($val->R658PL) }}" data-loc="{{ trim($val->R658LC) }}"
|
||||
data-part="{{ trim($val->R658PN) }}" data-wh="{{ trim($val->R658WH) }}" title="Delete Replenishment">
|
||||
Delete
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach --}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Add Modal -->
|
||||
<div class="modal fade" id="addModal" tabindex="-1" aria-labelledby="addModalLabel" aria-hidden="true"
|
||||
data-bs-backdrop="static">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="addModalLabel">Add Record</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<form class="needs-validation" id="addReplen" method="POST" action="{{ route("m3.replenishmentSettings.store") }}" enctype="multipart/form-data">
|
||||
<div class="modal-body">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="mb-3">
|
||||
<label for="recipient-name" class="col-form-label">Part:</label>
|
||||
<label for="R658PNA" class="visually-hidden">R658PN</label>
|
||||
<input type="text" class="form-control" name="R658PN" id="R658PNA" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="recipient-name" class="col-form-label">Location:</label>
|
||||
<label for="R658LCA" class="visually-hidden">R658LC</label>
|
||||
<input type="text" class="form-control" name="R658LC" id="R658LCA" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="recipient-name" class="col-form-label">Minimum quantity:</label>
|
||||
<label for="R658MQA" class="visually-hidden">R658MQ</label>
|
||||
<input type="number" class="form-control" name="R658MQ" id="R658MQA" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="recipient-name" class="col-form-label">Replenishment quantity:</label>
|
||||
<label for="R658RQA" class="visually-hidden">R658RQ</label>
|
||||
<input type="number" class="form-control" name="R658RQ" id="R658RQA" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="recipient-name" class="col-form-label">Replenishment Min quantity:</label>
|
||||
<label for="R658RMQA" class="visually-hidden">R658RMQ</label>
|
||||
<input type="number" class="form-control" name="R658RMQ" id="R658RMQA" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="recipient-name" class="col-form-label">Tolerance:</label>
|
||||
<label for="R658TLA" class="visually-hidden">R658TL</label>
|
||||
<input type="text" class="form-control" name="R658TL" id="R658TLA" maxlength="2" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
<div class="mb-3">
|
||||
<label for="recipient-name" class="col-form-label">Warehouse:</label>
|
||||
<select class="form-select" id="WHDDA" aria-label="WHDD" tabindex="4" required>
|
||||
<option value="">Select Warehouse</option>
|
||||
@foreach ($IC670M as $key => $IC670MR)
|
||||
<option value="{{ trim($IC670MR->WDCO).trim($IC670MR->WDPL).trim($IC670MR->WDWHS) }}"
|
||||
data-comp="{{ trim($IC670MR->WDCO) }}" data-pl="{{ trim($IC670MR->WDPL) }}" data-wh="{{ trim($IC670MR->WDWHS) }}" >
|
||||
{{ trim(Str::upper($IC670MR->WDWNAM)) }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="recipient-name" class="col-form-label">Division:</label>
|
||||
<label for="R658COA" class="visually-hidden">R658CO</label>
|
||||
<input type="text" class="form-control" name="R658CO" id="R658COA" required readonly>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="recipient-name" class="col-form-label">Plant:</label>
|
||||
<label for="R658PLA" class="visually-hidden">R658PL</label>
|
||||
<input type="text" class="form-control" name="R658PL" id="R658PLA" required readonly>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="recipient-name" class="col-form-label">Warehouse:</label>
|
||||
<label for="R658WHA" class="visually-hidden">R658WH</label>
|
||||
<input type="text" class="form-control" name="R658WH" id="R658WHA" required readonly>
|
||||
</div>
|
||||
<div class="form-check form-switch">
|
||||
<label for="R658IZLCFA" class="visually-hidden">R658IZLCF</label>
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="R658IZLCF" id="R658IZLCFA" value="1" aria-checked="false">
|
||||
<label class="form-check-label" for="flexSwitchCheckDefault">Lot Controlled</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" onClick="return validateAdd();">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Edit Modal -->
|
||||
<div class="modal fade" id="editModal" tabindex="-1" aria-labelledby="editModalLabel" aria-hidden="true"
|
||||
data-bs-backdrop="static">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="editModalLabel">Edit Record</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<form class="needs-validation" id="editReplen" method="POST" action="replenishmentSettingsUpdate"
|
||||
enctype="multipart/form-data">
|
||||
<div class="modal-body">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="mb-3">
|
||||
<label for="recipient-name" class="col-form-label">Part:</label>
|
||||
<label for="R658PN" class="visually-hidden">R658PN</label>
|
||||
<input type="text" class="form-control" name="R658PN" id="R658PN" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="recipient-name" class="col-form-label">Location:</label>
|
||||
<label for="R658LC" class="visually-hidden">R658LC</label>
|
||||
<input type="text" class="form-control" name="R658LC" id="R658LC" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="recipient-name" class="col-form-label">Minimum quantity:</label>
|
||||
<label for="R658MQ" class="visually-hidden">R658MQ</label>
|
||||
<input type="number" class="form-control" name="R658MQ" id="R658MQ" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="recipient-name" class="col-form-label">Replenishment quantity:</label>
|
||||
<label for="R658RQ" class="visually-hidden">R658RQ</label>
|
||||
<input type="number" class="form-control" name="R658RQ" id="R658RQ" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="recipient-name" class="col-form-label">Replenishment Min quantity:</label>
|
||||
<label for="R658RMQ" class="visually-hidden">R658RMQ</label>
|
||||
<input type="number" class="form-control" name="R658RMQ" id="R658RMQ" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="recipient-name" class="col-form-label">Tolerance:</label>
|
||||
<label for="R658TL" class="visually-hidden">R658TL</label>
|
||||
<input type="text" class="form-control" name="R658TL" id="R658TL" maxlength="2" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
<div class="mb-3">
|
||||
<label for="recipient-name" class="col-form-label">Warehouse:</label>
|
||||
<select class="form-select" id="WHDD" aria-label="WHDD" tabindex="4" disabled>
|
||||
<option value="">Select Warehouse</option>
|
||||
@foreach ($IC670M as $key => $IC670MR)
|
||||
<option value="{{ trim($IC670MR->WDCO).trim($IC670MR->WDPL).trim($IC670MR->WDWHS) }}"
|
||||
data-comp="{{ trim($IC670MR->WDCO) }}" data-pl="{{ trim($IC670MR->WDPL) }}" data-wh="{{ trim($IC670MR->WDWHS) }}" >
|
||||
{{ trim(Str::upper($IC670MR->WDWNAM)) }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="recipient-name" class="col-form-label">Division:</label>
|
||||
<label for="R658CO" class="visually-hidden">R658CO</label>
|
||||
<input type="text" class="form-control" name="R658CO" id="R658CO" required readonly>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="recipient-name" class="col-form-label">Plant:</label>
|
||||
<label for="R658PL" class="visually-hidden">R658PL</label>
|
||||
<input type="text" class="form-control" name="R658PL" id="R658PL" required readonly>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="recipient-name" class="col-form-label">Warehouse:</label>
|
||||
<label for="R658WH" class="visually-hidden">R658WH</label>
|
||||
<input type="text" class="form-control" name="R658WH" id="R658WH" required readonly>
|
||||
</div>
|
||||
<div class="form-check form-switch">
|
||||
<label for="R658IZLCF" class="visually-hidden">R658IZLCF</label>
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="R658IZLCF" id="R658IZLCF" value="1" aria-checked="false">
|
||||
<label class="form-check-label" for="flexSwitchCheckDefault">Lot Controlled</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
<button type="submit" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
|
||||
// DataTables Init
|
||||
let copyButtonTrans = 'Copy'
|
||||
let csvButtonTrans = 'CSV'
|
||||
let excelButtonTrans = 'Excel'
|
||||
let pdfButtonTrans = 'PDF'
|
||||
// let printButtonTrans = '{{ trans('global.datatables.print') }}'
|
||||
let colvisButtonTrans = 'Columns'
|
||||
let selectAllButtonTrans = 'Select All'
|
||||
let selectNoneButtonTrans = 'Deselect All'
|
||||
|
||||
let languages = {
|
||||
'en': 'https://cdn.datatables.net/plug-ins/1.10.19/i18n/English.json'
|
||||
};
|
||||
|
||||
$.extend(true, $.fn.dataTable.Buttons.defaults.dom.button, {
|
||||
className: 'btn'
|
||||
})
|
||||
// End Datatables
|
||||
|
||||
$(document).ready(function() {
|
||||
var editModal = new bootstrap.Modal(document.getElementById('editModal'), {
|
||||
backdrop: 'static',
|
||||
keyboard: false
|
||||
});
|
||||
|
||||
var addModal = new bootstrap.Modal(document.getElementById('addModal'), {
|
||||
backdrop: 'static',
|
||||
keyboard: false
|
||||
});
|
||||
|
||||
var columnDefs = [
|
||||
{
|
||||
data: 'checkbox',
|
||||
name: 'checkbox',
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
render: function (data, type, row) {
|
||||
return '<label for="sonar-input-5b415a7750" class="visually-hidden">sonar input 5b415a7750</label>
|
||||
<input type="checkbox" class="select-checkbox" value="' + row.id + '" id="sonar-input-5b415a7750">';
|
||||
}
|
||||
},
|
||||
{
|
||||
data: "R658CO",
|
||||
name: "R658CO"
|
||||
},
|
||||
{
|
||||
data: "R658PL",
|
||||
name: "R658PL"
|
||||
},
|
||||
{
|
||||
data: "R658WH",
|
||||
name: "R658WH"
|
||||
},
|
||||
{
|
||||
data: "R658LC",
|
||||
name: "R658LC"
|
||||
},
|
||||
{
|
||||
data: "R658PN",
|
||||
name: "R658PN"
|
||||
},
|
||||
{
|
||||
data: "R658MQ",
|
||||
name: "R658MQ"
|
||||
},
|
||||
{
|
||||
data: "R658RQ",
|
||||
name: "R658RQ"
|
||||
},
|
||||
{
|
||||
data: "R658TL",
|
||||
name: "R658TL"
|
||||
},
|
||||
{
|
||||
data: "R658RMQ",
|
||||
name: "R658RMQ"
|
||||
},
|
||||
{
|
||||
data: "R658IZLCF",
|
||||
name: "R658IZLCF",
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
render: function (data, type, row) {
|
||||
// console.log("data: "+data);
|
||||
return data=='1' ? '<i class="fas fa-lg fa-check"></i>' :'<i class="fas fa-lg fa-times"></i>';
|
||||
// return '<label for="sonar-input-b328551d58" class="visually-hidden">sonar input b328551d58</label>
|
||||
<input type="checkbox" class="select-checkbox" value="' + row.id + '" id="sonar-input-b328551d58">';
|
||||
}
|
||||
},
|
||||
{
|
||||
data: 'action',
|
||||
name: 'action',
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
render: function (data, type, row) {
|
||||
// console.log(row.R658LC);
|
||||
// return '<button type="button" class="btn btn-sm btn-danger delete-user" data-id="' + row.id + '">Delete</button>';
|
||||
return '<button type="button" class="btn btn-sm btn-info editrefcat"'+
|
||||
' data-comp="'+row.R658CO.trim()+'" data-pl="'+row.R658PL.trim()+'" data-loc="'+row.R658LC.trim()+'" '+
|
||||
' data-part="'+row.R658PN.trim()+'" data-wh="'+row.R658WH.trim()+'"'+
|
||||
' data-minqty="'+row.R658MQ.trim()+'" data-repqty="'+row.R658RQ.trim()+'"'+
|
||||
' data-repminqty="'+row.R658RMQ.trim()+'" data-tol="'+row.R658TL.trim()+'"'+
|
||||
' data-controlled="'+row.R658IZLCF.trim()+'" title="Edit Replenishment"> Edit </button>'+
|
||||
' <button type="button" class="btn btn-sm btn-danger deleterefcat"'+
|
||||
' data-comp="'+row.R658CO.trim()+'" data-pl="'+row.R658PL.trim()+'" data-loc="'+row.R658LC.trim()+'"'+
|
||||
' data-part="'+row.R658PN.trim()+'" data-wh="'+row.R658WH.trim()+'" title="Delete Replenishment">Delete</button>';
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
// DataTable init
|
||||
$.extend(true, $.fn.dataTable.defaults, {
|
||||
order: [
|
||||
[1, 'asc']
|
||||
],
|
||||
"lengthMenu": [
|
||||
[10, 25, 50, 100, -1],
|
||||
[10, 25, 50, 100, "All"]
|
||||
],
|
||||
pageLength: 100,
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
ajax: '{{ route('m3.replenishmentSettingsDT') }}',
|
||||
columns: columnDefs,
|
||||
language: {
|
||||
url: languages['{{ app()->getLocale() }}']
|
||||
},
|
||||
select: {
|
||||
style: 'multi+shift',
|
||||
selector: 'td:first-child'
|
||||
},
|
||||
dom: "<'row'<'col-sm-12 col-md-2'l><'col-sm-12 col-md-7'B><'col-sm-12 col-md-3'f>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'selectAll',
|
||||
className: 'btn-primary mr-1',
|
||||
text: selectAllButtonTrans,
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
},
|
||||
action: function(e, dt) {
|
||||
e.preventDefault()
|
||||
dt.rows().deselect();
|
||||
dt.rows({
|
||||
search: 'applied'
|
||||
}).select();
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'selectNone',
|
||||
className: 'btn-primary mr-1',
|
||||
text: selectNoneButtonTrans,
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'copy',
|
||||
className: 'btn-default mr-1',
|
||||
text: copyButtonTrans,
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'csv',
|
||||
className: 'btn-default mr-1',
|
||||
text: csvButtonTrans,
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
className: 'btn-default mr-1',
|
||||
text: excelButtonTrans,
|
||||
exportOptions: {
|
||||
columns: ':visible',
|
||||
stripHtml: true
|
||||
},
|
||||
customize: function(xlsx,btnObj, tableInst) {
|
||||
var sheet = xlsx.xl.worksheets['sheet1.xml'];
|
||||
var cellIndexes = tableInst.cells(".bg-danger").indexes();
|
||||
for (var i = 0; i < cellIndexes.length; i++) {
|
||||
var cellIndex = cellIndexes[i];
|
||||
var tblRow = cellIndex['row']+3; // adjusted from 0 indexed
|
||||
var tblCol = cellIndex['column']; // adjusted from 0 indexed
|
||||
var xlCol = numberToLetters(tblCol);
|
||||
var excelCell = xlCol+tblRow;
|
||||
$('row c[r='+excelCell+']', sheet).attr( 's', '11' );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'pdfHtml5',
|
||||
className: 'btn-default mr-1',
|
||||
text: pdfButtonTrans,
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'colvis',
|
||||
className: 'btn-default mr-1',
|
||||
text: colvisButtonTrans,
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
var myTable = $('#datatablesSimple5').DataTable({});
|
||||
|
||||
// Update Division/WH/Plant on Warehouse change
|
||||
$(document).on('change select','#WHDDA',function(){
|
||||
$("#R658COA").val($(this).find("option:selected").data("comp"));
|
||||
$("#R658PLA").val($(this).find("option:selected").data("pl"));
|
||||
$("#R658WHA").val($(this).find("option:selected").data("wh"));
|
||||
});
|
||||
|
||||
// Open Modal Edit
|
||||
$(document).on('click', '.editrefcat', function() {
|
||||
// console.log($(this).data("part"));
|
||||
$("#editReplen").trigger('reset');
|
||||
|
||||
// console.log($(this).data("comp").toString() + $(this).data("pl").toString() + $(this).data("wh").toString() );
|
||||
// Set WH name
|
||||
WHDD = $(this).data("comp").toString() + $(this).data("pl").toString() + $(this).data("wh").toString();
|
||||
$("#WHDD").val(WHDD);
|
||||
|
||||
$("#R658PN").val($(this).data("part"));
|
||||
$("#R658CO").val($(this).data("comp"));
|
||||
$("#R658LC").val($(this).data("loc"));
|
||||
$("#R658PL").val($(this).data("pl"));
|
||||
$("#R658WH").val($(this).data("wh"));
|
||||
$("#R658MQ").val($(this).data("minqty"));
|
||||
$("#R658RQ").val($(this).data("repqty"));
|
||||
$("#R658RMQ").val($(this).data("repminqty"));
|
||||
$("#R658TL").val($(this).data("tol"));
|
||||
if ($(this).data("controlled")=='1') {
|
||||
$("#R658IZLCF").prop('checked',true);
|
||||
}
|
||||
else{
|
||||
$("#R658IZLCF").prop('checked',false);
|
||||
}
|
||||
|
||||
editModal.show();
|
||||
});
|
||||
|
||||
// Add Record Btn
|
||||
$(document).on('click', '#addRecordBtn', function() {
|
||||
$("#addReplen").trigger('reset');
|
||||
addModal.show();
|
||||
});
|
||||
|
||||
// Delete Record
|
||||
$(document).on('click', '.deleterefcat', function() {
|
||||
R658PN = $(this).data("part");
|
||||
R658CO = $(this).data("comp");
|
||||
R658LC = $(this).data("loc");
|
||||
R658PL = $(this).data("pl");
|
||||
R658WH = $(this).data("wh");
|
||||
|
||||
var form_post = {
|
||||
R658PN: R658PN,
|
||||
R658CO: R658CO,
|
||||
R658LC: R658LC,
|
||||
R658PL: R658PL,
|
||||
R658WH: R658WH,
|
||||
_token: '{{ csrf_token() }}'
|
||||
};
|
||||
|
||||
if (confirm("Delete Record?") == true) {
|
||||
$.ajax({
|
||||
url: "{{ route('m3.replenishmentSettingsDelete') }}",
|
||||
type: "POST",
|
||||
data: form_post,
|
||||
success: function(response) {
|
||||
// console.log("record Deleted...");
|
||||
location.reload();
|
||||
},
|
||||
error: function(error) {}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Check Record Exist
|
||||
checkRecordExist = function(form_post){
|
||||
$.ajax({
|
||||
url: "{{ route('m3.replenishmentSettingsExist') }}",
|
||||
type: "POST",
|
||||
data: form_post,
|
||||
success: function(response) {
|
||||
if(response.recordExists){
|
||||
$('#addReplen').submit();
|
||||
}
|
||||
else{
|
||||
alert("Part already exist!");
|
||||
}
|
||||
},
|
||||
error: function(error) {}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Validate Add Record before Submit
|
||||
function validateAdd() {
|
||||
// console.log($.trim($("#R658PNA").val()) == "");
|
||||
$.trim($("#R658PNA").val()) == "" ? $("#R658PNA").addClass("is-invalid") : $("#R658PNA").removeClass("is-invalid");
|
||||
$.trim($("#R658LCA").val()) == "" ? $("#R658LCA").addClass("is-invalid") : $("#R658LCA").removeClass("is-invalid");
|
||||
$.trim($("#R658MQA").val()) == "" ? $("#R658MQA").addClass("is-invalid") : $("#R658MQA").removeClass("is-invalid");
|
||||
$.trim($("#R658RQA").val()) == "" ? $("#R658RQA").addClass("is-invalid") : $("#R658RQA").removeClass("is-invalid");
|
||||
$.trim($("#R658RMQA").val()) == "" ? $("#R658RMQA").addClass("is-invalid") : $("#R658RMQA").removeClass("is-invalid");
|
||||
$.trim($("#R658TLA").val()) == "" ? $("#R658TLA").addClass("is-invalid") : $("#R658TLA").removeClass("is-invalid");
|
||||
$.trim($("#R658COA").val()) == "" ? $("#R658COA").addClass("is-invalid") : $("#R658COA").removeClass("is-invalid");
|
||||
$.trim($("#R658PLA").val()) == "" ? $("#R658PLA").addClass("is-invalid") : $("#R658PLA").removeClass("is-invalid");
|
||||
$.trim($("#R658WHA").val()) == "" ? $("#R658WHA").addClass("is-invalid") : $("#R658WHA").removeClass("is-invalid");
|
||||
|
||||
if ($.trim($("#R658LCA").val()) == "" || $.trim($("#R658PNA").val()) == "" || $.trim($("#R658MQA").val()) == "" || $.trim($("#R658RQA").val()) == ""
|
||||
|| $.trim($("#R658RMQA").val()) == "" || $.trim($("#R658TLA").val()) == "" || $.trim($("#R658COA").val()) == "" || $.trim($("#R658PLA").val()) == "" ||
|
||||
$.trim($("#R658WHA").val()) == "" ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var formInputs = $("#addReplen").serialize();
|
||||
var form_post = {
|
||||
data: formInputs,
|
||||
_token: '{{ csrf_token() }}'
|
||||
};
|
||||
checkRecordExist(form_post);
|
||||
};
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,84 @@
|
||||
@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="recipient-name" >Warehouse:</label>
|
||||
<select class="form-select" id="WHDDA" aria-label="WHDD" 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
|
||||
@@ -0,0 +1,406 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Solon Sentinel Portal - Carrier Master Maintenance
|
||||
@endsection
|
||||
@section('content')
|
||||
<!-- /.row -->
|
||||
<div class="container-fluid px-4">
|
||||
<h1 class="mt-4">Carrier Master Maintenance</h1>
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
@if(isset($power_user[0]) && trim((string) ($power_user[0]->R428PWRUSR ?? '')) === 'Y')
|
||||
<button name="carrierAdd" type="button" class="btn btn-sm btn-info carrierAdd_click" id="carrierAdd_click"
|
||||
data-AT9DPW="{{ ($power_user[0]->R428CO ?? '').($power_user[0]->R428PL ?? '').($power_user[0]->R428WH ?? '') }}">Add Record</button>
|
||||
@endif
|
||||
<!-- data-AT9DPW="$co.$plant.$whs">Add Record</button> -->
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover" id="datatablesSimple5" style="width:80%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th>SCAC Code</th>
|
||||
<th>Carrier name</th>
|
||||
<th>2ship Carrier Code</th>
|
||||
<th>Parcel Carrier Code</th>
|
||||
<th>ERP Carrier Code</th>
|
||||
<th>Timing of M3 closing</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($ICM160M as $key=>$val)
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
@if(isset($power_user[0]) && trim((string) ($power_user[0]->R428PWRUSR ?? '')) === 'Y')
|
||||
<button name="carrierEdit{{trim($val->CANUM)}}" type="submit" class="btn btn-sm btn-info carrierEdit_click" id="carrierEdit_click"
|
||||
data-CANUM="{{trim($val->CANUM)}}" data-CANAM="{{trim($val->CANAM)}}" data-TWOSHIPCARRIERCODE="{{trim($val->TWOSHIPCARRIERCODE)}}"
|
||||
data-PARCELCARRIERCODE="{{trim($val->PARCELCARRIERCODE)}}" data-CASPR10A01="{{trim($val->CASPR10A01)}}"
|
||||
data-CASPR1A01="{{trim($val->CASPR1A01)}}"
|
||||
>Edit</button>
|
||||
@endif
|
||||
</td>
|
||||
<td> {{ $val->CANUM }} </td>
|
||||
<td> {{ $val->CANAM }} </td>
|
||||
<td> {{ $val->TWOSHIPCARRIERCODE }} </td>
|
||||
<td> {{ $val->PARCELCARRIERCODE=="X"?"Parcel":"" }} </td>
|
||||
<td> {{ $val->CASPR10A01 }} </td>
|
||||
<td> {{ $val->CASPR1A01=="Y"?"When closing truck":"" }} </td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<!-- endif-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
<!-- @include('m3::liberty-theme.partials.modals.blank') -->
|
||||
@include('m3::liberty-theme.partials.modals.carrierAdd')
|
||||
@include('m3::liberty-theme.partials.modals.carrierEdit')
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
// DataTable init
|
||||
var myTable = $('#datatablesSimple5').DataTable({
|
||||
"aaSorting": [],
|
||||
"lengthMenu": [ [12,35,50,-1], [12,35,50,"All"] ],
|
||||
"sPaginationType": "full_numbers",
|
||||
"dom": 'Bfrtip', // Needs button container
|
||||
"responsive": true,
|
||||
"orderCellsTop": true,
|
||||
"order": [ [2, 'asc'] ],
|
||||
"pageLength": 12,
|
||||
"columnDefs": [
|
||||
{
|
||||
orderable: true,
|
||||
searchable: true,
|
||||
targets: -2
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
// Update Checkbox values on Change
|
||||
$("#PARCELCARRIERCODE").change(function() {
|
||||
if($(this).is(":checked")) {
|
||||
$("#PARCELCARRIERCODE").val("X");
|
||||
} else {
|
||||
$("#PARCELCARRIERCODE").val(" ");
|
||||
}
|
||||
});
|
||||
|
||||
$("#addPARCELCARRIERCODE").change(function() {
|
||||
if($(this).is(":checked")) {
|
||||
$("#addPARCELCARRIERCODE").val("X");
|
||||
} else {
|
||||
$("#addPARCELCARRIERCODE").val(" ");
|
||||
}
|
||||
});
|
||||
|
||||
$("#CASPR1A01").change(function() {
|
||||
if($(this).is(":checked")) {
|
||||
$("#CASPR1A01").val("Y");
|
||||
} else {
|
||||
$("#CASPR1A01").val(" ");
|
||||
}
|
||||
});
|
||||
|
||||
$("#addCASPR1A01").change(function() {
|
||||
if($(this).is(":checked")) {
|
||||
$("#addCASPR1A01").val("Y");
|
||||
} else {
|
||||
$("#addCASPR1A01").val(" ");
|
||||
}
|
||||
});
|
||||
|
||||
//
|
||||
// Open Modal Carrier Edit
|
||||
//
|
||||
$(document).on('click', '#carrierEdit_click', function() {
|
||||
// console.log($(this));
|
||||
$("#CANUM").val($(this).data("canum"));
|
||||
$("#CANAM").val($(this).data("canam"));
|
||||
$("#TWOSHIPCARRIERCODE").val($(this).data("twoshipcarriercode"));
|
||||
$("#PARCELCARRIERCODE").val($(this).data("parcelcarriercode"));
|
||||
$("#CASPR10A01").val($(this).data("caspr10a01"));
|
||||
$("#CASPR1A01").val($(this).data("caspr1a01"));
|
||||
|
||||
$("#OLD_CANUM").val($(this).data("canum"));
|
||||
$("#OLD_CANAM").val($(this).data("canam"));
|
||||
$("#OLD_TWOSHIPCARRIERCODE").val($(this).data("twoshipcarriercode"));
|
||||
$("#OLD_PARCELCARRIERCODE").val($(this).data("parcelcarriercode"));
|
||||
$("#OLD_CASPR10A01").val($(this).data("caspr10a01"));
|
||||
$("#OLD_CASPR1A01").val($(this).data("caspr1a01"));
|
||||
|
||||
if($(this).data("parcelcarriercode")=='X') {
|
||||
$("#PARCELCARRIERCODE").prop("checked", true);
|
||||
} else {
|
||||
$("#PARCELCARRIERCODE").prop("checked", false);
|
||||
}
|
||||
|
||||
if($(this).data("caspr1a01")=='Y') {
|
||||
$("#CASPR1A01").prop("checked", true);
|
||||
} else {
|
||||
$("#CASPR1A01").prop("checked", false);
|
||||
}
|
||||
|
||||
$('#carrierEdit').modal('show');
|
||||
});
|
||||
|
||||
//
|
||||
// Open Modal Carrier Add
|
||||
//
|
||||
$(document).on('click', '#carrierAdd_click', function() {
|
||||
// console.log($(this));
|
||||
// $("#AT9DPW").val($(this).data("at9dpw"));
|
||||
$('#carrierAdd').modal('show');
|
||||
});
|
||||
|
||||
|
||||
// Clear values on Edit form when Close is clicked
|
||||
$(document).on('click', '#closeEdit', function() {
|
||||
document.getElementById("frmEdit").reset();
|
||||
});
|
||||
|
||||
// Clear values on Add form when Close is clicked
|
||||
$(document).on('click', '#closeAdd', function() {
|
||||
document.getElementById("frmAdd").reset();
|
||||
});
|
||||
|
||||
//
|
||||
// Save Carrier Edit
|
||||
//
|
||||
$(document).on('click', '#submitCarrierEdit', function() {
|
||||
|
||||
var changes_detected = 0;
|
||||
var errors_found = 0;
|
||||
|
||||
// Get the right Values
|
||||
if($("#PARCELCARRIERCODE").is(":checked")) {
|
||||
$("#PARCELCARRIERCODE").val("X");
|
||||
} else {
|
||||
$("#PARCELCARRIERCODE").val(" ");
|
||||
}
|
||||
if($("#addPARCELCARRIERCODE").is(":checked")) {
|
||||
$("#addPARCELCARRIERCODE").val("X");
|
||||
} else {
|
||||
$("#addPARCELCARRIERCODE").val(" ");
|
||||
}
|
||||
if($("#CASPR1A01").is(":checked")) {
|
||||
$("#CASPR1A01").val("Y");
|
||||
} else {
|
||||
$("#CASPR1A01").val(" ");
|
||||
}
|
||||
if($("#addCASPR1A01").is(":checked")) {
|
||||
$("#addCASPR1A01").val("Y");
|
||||
} else {
|
||||
$("#addCASPR1A01").val(" ");
|
||||
}
|
||||
|
||||
// Retrieve the values we need to pass on
|
||||
var NEW_CANUM = $("#CANUM").val();
|
||||
var NEW_CANAM = $("#CANAM").val();
|
||||
var NEW_TWOSHIPCARRIERCODE = $("#TWOSHIPCARRIERCODE").val();
|
||||
var NEW_PARCELCARRIERCODE = $("#PARCELCARRIERCODE").val();
|
||||
var NEW_CASPR10A01 = $("#CASPR10A01").val();
|
||||
var NEW_CASPR1A01 = $("#CASPR1A01").val();
|
||||
|
||||
// Retrieve old values
|
||||
var OLD_CANUM = $("#OLD_CANUM").val();
|
||||
var OLD_CANAM = $("#OLD_CANAM").val();
|
||||
var OLD_TWOSHIPCARRIERCODE = $("#OLD_TWOSHIPCARRIERCODE").val();
|
||||
var OLD_PARCELCARRIERCODE = $("#OLD_PARCELCARRIERCODE").val();
|
||||
var OLD_CASPR10A01 = $("#OLD_CASPR10A01").val();
|
||||
var OLD_CASPR1A01 = $("#OLD_CASPR1A01").val();
|
||||
|
||||
if(NEW_TWOSHIPCARRIERCODE.length>3) {
|
||||
$('#carrierEdit').modal('show');
|
||||
alert("Value entered greater than 999");
|
||||
$("#TWOSHIPCARRIERCODE").val("");
|
||||
$("#TWOSHIPCARRIERCODE").focus();
|
||||
errors_found=1;
|
||||
}
|
||||
if(NEW_CASPR10A01.length>6) {
|
||||
$('#carrierEdit').modal('show');
|
||||
alert("Value entered greater than 999999");
|
||||
$("#PARCELCARRIERCODE").val("");
|
||||
$("#PARCELCARRIERCODE").focus();
|
||||
errors_found=1;
|
||||
}
|
||||
|
||||
if(errors_found==0) {
|
||||
|
||||
var csrf = document.querySelector('meta[name="csrf-token"]').content;
|
||||
var form_post = {
|
||||
'CANUM': NEW_CANUM,
|
||||
'CANAM': NEW_CANAM,
|
||||
'TWOSHIPCARRIERCODE': NEW_TWOSHIPCARRIERCODE,
|
||||
'PARCELCARRIERCODE': NEW_PARCELCARRIERCODE,
|
||||
'CASPR10A01': NEW_CASPR10A01,
|
||||
'CASPR1A01': NEW_CASPR1A01,
|
||||
'_token': csrf
|
||||
};
|
||||
// console.log(form_post); return false;
|
||||
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
url:'/carrierMaint/saveCarrierEdit',
|
||||
data: form_post,
|
||||
success:function(data) {
|
||||
if (data=="success") {
|
||||
//$('#blank-modal').modal('hide');
|
||||
$('#carrierEdit').modal('hide');
|
||||
// alert("should reload here");
|
||||
location.reload();
|
||||
} else {
|
||||
$("#CANUM").val(NEW_CANUM);
|
||||
$("#CANAM").val(NEW_CANAM);
|
||||
$("#TWOSHIPCARRIERCODE").val(NEW_TWOSHIPCARRIERCODE);
|
||||
$("#AT9DPW").val(NEW_AT9DPWH);
|
||||
$("#PARCELCARRIERCODE").val(NEW_PARCELCARRIERCODE);
|
||||
$("#CASPR10A01").val(NEW_CASPR10A01);
|
||||
$("#CASPR1A01").val(NEW_CASPR1A01);
|
||||
$("#OLD_CANUM").val(OLD_CANUM);
|
||||
$("#OLD_CANAM").val(OLD_CANAM);
|
||||
$("#OLD_TWOSHIPCARRIERCODE").val(OLD_TWOSHIPCARRIERCODE);
|
||||
$("#OLD_PARCELCARRIERCODE").val(OLD_PARCELCARRIERCODE);
|
||||
$("#OLD_CASPR10A01").val(OLD_CASPR10A01);
|
||||
$("#OLD_CASPR1A01").val(OLD_CASPR1A01);
|
||||
// if (data=="null") {
|
||||
// alert("SCAC Code entered cannot be blank. Please try again.");
|
||||
// $("#addCANUM").val('');
|
||||
// $('#carrierAdd').modal('show');
|
||||
// $("#addCANUM").focus();
|
||||
// }
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
//
|
||||
// Save Carrier Add
|
||||
//
|
||||
$(document).on('click', '#submitCarrierAdd', function() {
|
||||
|
||||
var errors_found = 0;
|
||||
// Get the right Values
|
||||
if($("#PARCELCARRIERCODE").is(":checked")) {
|
||||
$("#PARCELCARRIERCODE").val("X");
|
||||
} else {
|
||||
$("#PARCELCARRIERCODE").val(" ");
|
||||
}
|
||||
if($("#addPARCELCARRIERCODE").is(":checked")) {
|
||||
$("#addPARCELCARRIERCODE").val("X");
|
||||
} else {
|
||||
$("#addPARCELCARRIERCODE").val(" ");
|
||||
}
|
||||
if($("#CASPR1A01").is(":checked")) {
|
||||
$("#CASPR1A01").val("Y");
|
||||
} else {
|
||||
$("#CASPR1A01").val(" ");
|
||||
}
|
||||
if($("#addCASPR1A01").is(":checked")) {
|
||||
$("#addCASPR1A01").val("Y");
|
||||
} else {
|
||||
$("#addCASPR1A01").val(" ");
|
||||
}
|
||||
|
||||
// Retrieve the values we need to pass on
|
||||
var NEW_CANUM = $("#addCANUM").val();
|
||||
var NEW_CANAM = $("#addCANAM").val();
|
||||
var NEW_TWOSHIPCARRIERCODE = $("#addTWOSHIPCARRIERCODE").val();
|
||||
var NEW_PARCELCARRIERCODE = $("#addPARCELCARRIERCODE").val();
|
||||
var NEW_CASPR10A01 = $("#addCASPR10A01").val();
|
||||
var NEW_CASPR1A01 = $("#addCASPR1A01").val();
|
||||
|
||||
var csrf = document.querySelector('meta[name="csrf-token"]').content;
|
||||
var form_post = {
|
||||
'CANUM': NEW_CANUM,
|
||||
'CANAM': NEW_CANAM,
|
||||
'TWOSHIPCARRIERCODE': NEW_TWOSHIPCARRIERCODE,
|
||||
'PARCELCARRIERCODE': NEW_PARCELCARRIERCODE,
|
||||
'CASPR10A01': NEW_CASPR10A01,
|
||||
'CASPR1A01': NEW_CASPR1A01,
|
||||
'_token': csrf
|
||||
};
|
||||
// console.log(form_post); return false;
|
||||
|
||||
// if (NEW_PARCELCARRIERCODE.trim()=="" || NEW_CASPR10A01.trim()=="") {
|
||||
// $('#carrierAdd').modal('show');
|
||||
// if (NEW_CASPR10A01=="") {
|
||||
// $('#CASPR10A01').focus();
|
||||
// }
|
||||
// alert("There are fields that are blank that must be populated.");
|
||||
|
||||
// } else {
|
||||
if(NEW_TWOSHIPCARRIERCODE.length>3) {
|
||||
$('#carrierAdd').modal('show');
|
||||
alert("Value entered greater than 999");
|
||||
$("#addTWOSHIPCARRIERCODE").val("");
|
||||
$("#addTWOSHIPCARRIERCODE").focus();
|
||||
errors_found=1;
|
||||
}
|
||||
if(NEW_CASPR10A01.length>6) {
|
||||
$('#carrierAdd').modal('show');
|
||||
alert("Value entered greater than 999999");
|
||||
$("#addPARCELCARRIERCODE").val("");
|
||||
$("#addPARCELCARRIERCODE").focus();
|
||||
errors_found=1;
|
||||
}
|
||||
if(errors_found==0) {
|
||||
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
url:'/carrierMaint/saveCarrierAdd',
|
||||
data: form_post,
|
||||
success:function(data) {
|
||||
if (data=="success") {
|
||||
$('#carrierAdd').modal('hide');
|
||||
location.reload();
|
||||
} else {
|
||||
$("#addCANUM").val(NEW_CANUM);
|
||||
$("#addCANAM").val(NEW_CANAM);
|
||||
$("#addTWOSHIPCARRIERCODE").val(NEW_TWOSHIPCARRIERCODE);
|
||||
$("#addPARCELCARRIERCODE").val(NEW_PARCELCARRIERCODE);
|
||||
$("#addCASPR10A01").val(NEW_CASPR10A01);
|
||||
$("#addCASPR1A01").val(NEW_CASPR1A01);
|
||||
|
||||
if (data=="exists") {
|
||||
alert("SCAC Code entered already exists. Please try again.");
|
||||
$("#addCANUM").val('');
|
||||
$("#addCANAM").val('');
|
||||
$("#addTWOSHIPCARRIERCODE").val('');
|
||||
$("#addPARCELCARRIERCODE").val('');
|
||||
$("#addCASPR10A01").val('');
|
||||
$("#addCASPR1A01").val('');
|
||||
$('#carrierAdd').modal('show');
|
||||
}
|
||||
if (data=="null") {
|
||||
alert("SCAC Code entered cannot be blank. Please try again.");
|
||||
$("#addCANUM").val('');
|
||||
$('#carrierAdd').modal('show');
|
||||
$("#addCANUM").focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//});
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,39 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Sentinel API
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="container-fluid px-4">
|
||||
<h1 class="mt-4">Dashboard</h1>
|
||||
<div class="row">
|
||||
<div class="col-xl-6">
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-chart-area me-1"></i>
|
||||
Last 7 days of picking <b>DEMO DATA</b>
|
||||
</div>
|
||||
<div class="card-body"><canvas id="myAreaChart" width="100%" height="40"></canvas></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-6">
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-chart-bar me-1"></i>
|
||||
Last 12 month of invoice <b>DEMO DATA</b>
|
||||
</div>
|
||||
<div class="card-body"><canvas id="myBarChart" width="100%" height="40"></canvas></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
|
||||
$(function() {
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,518 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Exec Summary
|
||||
@endsection
|
||||
|
||||
{{-- Flat Picker CSS --}}
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/plugins/monthSelect/style.css">
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid px-4">
|
||||
<h1 class="mt-4">Exec Summary</h1>
|
||||
<div class="tab-content" id="pills-tabContent">
|
||||
<div class="tab-pane fade show active" id="pills-home" role="tabpanel" aria-labelledby="pills-home-tab">
|
||||
<div class="card mb-4">
|
||||
{{-- <div class="card-header"></div> --}}
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{-- Selectors --}}
|
||||
<div class="col-2 border-end">
|
||||
<form id="chartSelectorsForm">
|
||||
<h6>Sales / Weight / Lines</h6>
|
||||
|
||||
{{-- Warehouses --}}
|
||||
<div class="mb-3">
|
||||
<div class="form-check-container">
|
||||
@foreach ($IC670M as $key => $IC670MR)
|
||||
@php $currentWHDDA = trim($IC670MR->WDCO).trim($IC670MR->WDPL).trim($IC670MR->WDWHS); @endphp
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="WHDDA[]"
|
||||
id="WHDDA_{{ $currentWHDDA }}" value="{{ $currentWHDDA }}"
|
||||
data-comp="{{ trim($IC670MR->WDCO) }}"
|
||||
data-pl="{{ trim($IC670MR->WDPL) }}"
|
||||
data-wh="{{ trim($IC670MR->WDWHS) }}"
|
||||
{{ $WHDDA != '' && $WHDDA == $currentWHDDA ? 'checked' : '' }}>
|
||||
<label class="form-check-label" for="WHDDA_{{ $currentWHDDA }}">
|
||||
{{ trim(Str::upper($IC670MR->WDWNAM)) }}
|
||||
</label>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
{{-- Report Period --}}
|
||||
<div class="mb-3">
|
||||
<div class="btn-group" role="group" aria-label="Report Period">
|
||||
<input type="radio" class="btn-check" name="reportPeriod" id="periodMonthly"
|
||||
value="monthly" checked>
|
||||
<label class="btn btn-outline-primary btn-sm"
|
||||
for="periodMonthly">Monthly</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="reportPeriod" id="periodQuarter"
|
||||
value="quarter">
|
||||
<label class="btn btn-outline-primary btn-sm"
|
||||
for="periodQuarter">Quarter</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="reportPeriod" id="periodYear"
|
||||
value="year">
|
||||
<label class="btn btn-outline-primary btn-sm" for="periodYear">Year</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="reportPeriod" id="preiodCustom"
|
||||
value="custom">
|
||||
<label class="btn btn-outline-primary btn-sm" for="preiodCustom">Daily</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
{{-- From To Dates --}}
|
||||
<div class="mb-3">
|
||||
@php
|
||||
$todayDate = today()->format('Ym');
|
||||
$reportDate = \DateTime::createFromFormat('Ym', $todayDate)
|
||||
->modify('first day of January last year')
|
||||
->format('Y-m');
|
||||
$toreportDate = \DateTime::createFromFormat('Ym', $todayDate)->format(
|
||||
'Y-m',
|
||||
);
|
||||
@endphp
|
||||
<div class="row">
|
||||
{{-- <fieldset id="fromToDates"> --}}
|
||||
<div class="row align-items-center mb-2">
|
||||
<div class="col-md-4">
|
||||
<label class="col-form-label" for="REPORTDATE">From</label>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<input type="text" class="form-control" id="REPORTDATE"
|
||||
name="REPORTDATE" value="{{ $reportDate }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row align-items-center" id="TOREPORTDATEDIV">
|
||||
<div class="col-md-4">
|
||||
<label class="col-form-label" for="TOREPORTDATE">To</label>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<input type="text" class="form-control" id="TOREPORTDATE"
|
||||
name="TOREPORTDATE" value="{{ $toreportDate }}">
|
||||
</div>
|
||||
</div>
|
||||
{{-- </fieldset> --}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
{{-- Sales Weight Lines --}}
|
||||
<div class="mb-3">
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" id="checkSales"
|
||||
name="checkSales" checked>
|
||||
<label class="form-check-label" for="checkSales">Sales</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" id="checkWeight"
|
||||
name="checkWeight">
|
||||
<label class="form-check-label" for="checkWeight">Weight</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" id="checkLines"
|
||||
name="checkLines">
|
||||
<label class="form-check-label" for="checkLines">Lines</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
|
||||
<button type="button" class="btn btn-primary mt-4" id="updateCharts">Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
{{-- Charts --}}
|
||||
<div class="col-10">
|
||||
<div class="container-fluid">
|
||||
<canvas id="acquisitions"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
{{-- Chart JS --}}
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.8/dist/chart.umd.min.js"></script>
|
||||
|
||||
<!-- Flatpickr JS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
|
||||
<!-- Month Select Plugin -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/flatpickr/dist/plugins/monthSelect/index.js"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
//// Init Dates
|
||||
let fromMonthPicker = flatpickr("#REPORTDATE", {
|
||||
dateFormat: "Y-m", // Format as Year-Month
|
||||
plugins: [
|
||||
new monthSelectPlugin({
|
||||
shorthand: false, // Show short month names (e.g., Jan, Feb)
|
||||
readOnly: false,
|
||||
dateFormat: "Y-m", // Format output
|
||||
altFormat: "F Y", // Display full month name (e.g., January 2025)
|
||||
theme: "material_blue" // Options: "light", "dark", "material_blue", etc.
|
||||
})
|
||||
],
|
||||
onChange: function(selectedDates, dateStr) {
|
||||
toMonthPicker.set("minDate",
|
||||
dateStr); // Prevent selecting a "To" month before "From"
|
||||
},
|
||||
// Add these explicit styling options
|
||||
onReady: function(dateObj, dateStr, instance) {
|
||||
instance.input.style.backgroundColor = 'white';
|
||||
instance.input.style.cursor = 'pointer';
|
||||
}
|
||||
});
|
||||
|
||||
let toMonthPicker = flatpickr("#TOREPORTDATE", {
|
||||
dateFormat: "Y-m",
|
||||
plugins: [
|
||||
new monthSelectPlugin({
|
||||
shorthand: true,
|
||||
dateFormat: "Y-m",
|
||||
altFormat: "F Y",
|
||||
theme: "material_blue"
|
||||
})
|
||||
],
|
||||
onChange: function(selectedDates, dateStr) {
|
||||
fromMonthPicker.set("maxDate",
|
||||
dateStr); // Prevent selecting a "From" month after "To"
|
||||
},
|
||||
// Add these explicit styling options
|
||||
onReady: function(dateObj, dateStr, instance) {
|
||||
instance.input.style.backgroundColor = 'white';
|
||||
instance.input.style.cursor = 'pointer';
|
||||
}
|
||||
});
|
||||
//// End Dates
|
||||
|
||||
//// Add change event listener to radio buttons
|
||||
$('input[name="reportPeriod"]').change(function() {
|
||||
const isDisabled = $(this).val() == 'custom';
|
||||
// $('#TOREPORTDATE').prop('disabled', isDisabled);
|
||||
|
||||
if (isDisabled) {
|
||||
$('#TOREPORTDATEDIV').hide();
|
||||
// toMonthPicker.input.style.backgroundColor = '#e9ecef';
|
||||
// toMonthPicker.input.style.cursor = 'not-allowed';
|
||||
|
||||
// Set fromMonthPicker to today
|
||||
const today = new Date();
|
||||
fromMonthPicker.setDate(today);
|
||||
}
|
||||
// Show Todate
|
||||
else {
|
||||
$('#TOREPORTDATEDIV').show();
|
||||
// toMonthPicker.input.style.backgroundColor = 'white';
|
||||
// toMonthPicker.input.style.cursor = 'pointer';
|
||||
}
|
||||
});
|
||||
|
||||
//// Update Charts
|
||||
$("#updateCharts").click(function() {
|
||||
//// Validate Fields before calling Ajax
|
||||
// Validation checks
|
||||
let isValid = true;
|
||||
let errorMessages = [];
|
||||
|
||||
// Check if at least one WHDDA checkbox is checked
|
||||
const checkedWhdda = $("input[name='WHDDA[]']:checked").length;
|
||||
if (checkedWhdda === 0) {
|
||||
isValid = false;
|
||||
errorMessages.push("Please select at least one Warehouse/Plant");
|
||||
}
|
||||
|
||||
// Check From and To dates
|
||||
const fromDate = $("#REPORTDATE").val();
|
||||
const toDate = $("#TOREPORTDATE").val();
|
||||
if (!fromDate || !toDate) {
|
||||
isValid = false;
|
||||
errorMessages.push("Please select both From and To dates");
|
||||
}
|
||||
|
||||
// Check if at least one of Sales/Weight/Lines is checked
|
||||
const checkedMetrics =
|
||||
$("#checkSales:checked").length +
|
||||
$("#checkWeight:checked").length +
|
||||
$("#checkLines:checked").length;
|
||||
|
||||
if (checkedMetrics === 0) {
|
||||
isValid = false;
|
||||
errorMessages.push("Please select at least one metric (Sales, Weight, or Lines)");
|
||||
}
|
||||
|
||||
// If validation fails, show SweetAlert
|
||||
if (!isValid) {
|
||||
Swal.fire({
|
||||
icon: 'warning',
|
||||
title: 'Validation Error',
|
||||
html: errorMessages.map(msg => `<p>${msg}</p>`).join(''),
|
||||
confirmButtonText: 'OK'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
let formData = $('#chartSelectorsForm').serialize(); // Serialize form data
|
||||
// console.log(formData); return false;
|
||||
|
||||
//// Ran Ajax
|
||||
$.ajax({
|
||||
url: "{{ route('m3.execsummary') }}",
|
||||
type: "POST",
|
||||
data: formData,
|
||||
success: function(response) {
|
||||
//// Update charts
|
||||
if (response.success == true) {
|
||||
|
||||
//// First: Destroy Chart if it exists
|
||||
if (window.execSummaryChart !== undefined) {
|
||||
window.execSummaryChart.destroy();
|
||||
}
|
||||
|
||||
checkSales = response.checkSales;
|
||||
checkWeight = response.checkWeight;
|
||||
checkLines = response.checkLines;
|
||||
|
||||
dataResult = response.result;
|
||||
reportPeriod = response.reportPeriod;
|
||||
|
||||
// Build Data
|
||||
const data = dataResult.map(item => ({
|
||||
year: item.YEARS,
|
||||
dollars: parseInt(item.DOLLARS),
|
||||
weight: parseInt(item.WEIGHT),
|
||||
lines: parseInt(item.LINES),
|
||||
whs: parseInt(item.WHS)
|
||||
}));
|
||||
|
||||
// Group data by year and WHS
|
||||
const groupedData = new Map();
|
||||
const whsSet = new Set();
|
||||
const yearsSet = new Set();
|
||||
|
||||
data.forEach(entry => {
|
||||
const { year, whs,dollars,weight,lines} = entry;
|
||||
|
||||
if (!groupedData.has(year)) {
|
||||
groupedData.set(year, new Map());
|
||||
yearsSet.add(year);
|
||||
}
|
||||
|
||||
if (!groupedData.get(year).has(whs)) {groupedData.get(year).set(whs, {dollars: 0,weight: 0,lines: 0});}
|
||||
|
||||
const whsData = groupedData.get(year).get(whs);
|
||||
whsData.dollars += dollars;
|
||||
whsData.weight += weight;
|
||||
whsData.lines += lines;
|
||||
whsSet.add(whs);
|
||||
});
|
||||
|
||||
// Convert Sets to Arrays
|
||||
const labels = [...groupedData.keys()].sort();
|
||||
const whsArray = Array.from(whsSet);
|
||||
const yearsArray = Array.from(yearsSet);
|
||||
|
||||
//##### MAK
|
||||
|
||||
// Function to extract the time period (month or quarter) regardless of year
|
||||
function getTimePeriod(yearLabel) {
|
||||
if (yearLabel.includes("Q")) {
|
||||
// Quarterly format: "Q1-24" -> Return "Q1"
|
||||
return yearLabel.split("-")[0];
|
||||
} else if (yearLabel.match(/^\d{2}-\d{4}$/)) {
|
||||
// Monthly format: "01-2024" -> Check if odd or even
|
||||
const month = parseInt(yearLabel.split("-")[0]);
|
||||
return month % 2 === 0 ? "even" : "odd";
|
||||
} else if (/^\d{2}$/.test(yearLabel)) {
|
||||
// Daily format: "01" -> Return "day"
|
||||
return "day";
|
||||
}
|
||||
return yearLabel; // Default case
|
||||
}
|
||||
|
||||
// Function to check if a label is a daily format
|
||||
function isDailyFormat(yearLabel) {
|
||||
return /^\d{2}$/.test(yearLabel);
|
||||
}
|
||||
|
||||
// Define base hues for metrics
|
||||
const HUE_BLUE = 195; // Sales → Blue
|
||||
const HUE_GREEN = 140; // Weight → Green
|
||||
const HUE_GREY = 220; // Lines → Grey (desaturated)
|
||||
|
||||
// Create color maps - first level for period type, second level for WHS
|
||||
let salesColorMap = {};
|
||||
let weightColorMap = {};
|
||||
let linesColorMap = {};
|
||||
|
||||
// Define period types
|
||||
const periodTypes = ["Q1", "Q2", "Q3", "Q4", "odd", "even", "day"];
|
||||
|
||||
// Generate colors for each period type
|
||||
periodTypes.forEach((period, periodIndex) => {
|
||||
// Calculate hue variations based on period type
|
||||
let salesHue = HUE_BLUE;
|
||||
let weightHue = HUE_GREEN;
|
||||
|
||||
// Adjust hue for quarters only
|
||||
if (period.startsWith("Q")) {
|
||||
const quarterNum = parseInt(period.substring(1));
|
||||
salesHue = HUE_BLUE + (quarterNum - 1) * 15;
|
||||
weightHue = HUE_GREEN + (quarterNum - 1) * 15;
|
||||
}
|
||||
|
||||
// For monthly periods (odd/even), use slight variations
|
||||
if (period === "odd") {
|
||||
salesHue = HUE_BLUE + 5;
|
||||
weightHue = HUE_GREEN + 5;
|
||||
} else if (period === "even") {
|
||||
salesHue = HUE_BLUE + 20;
|
||||
weightHue = HUE_GREEN + 20;
|
||||
}
|
||||
|
||||
// Create color maps for each WHS within this period
|
||||
salesColorMap[period] = {};
|
||||
weightColorMap[period] = {};
|
||||
linesColorMap[period] = {};
|
||||
|
||||
// Generate different shades for each WHS - darker to lighter
|
||||
whsArray.forEach((whs, whsIndex) => {
|
||||
// Vary lightness by WHS - start darker (25%) and get lighter
|
||||
// Reverse the WHS index calculation to go from dark to light
|
||||
const reversedIndex = whsArray.length - 1 - whsIndex;
|
||||
const lightness = 45 + (reversedIndex % 8) * 6;
|
||||
|
||||
// Assign colors for each metric
|
||||
salesColorMap[period][whs] = `hsl(${salesHue}, 85%, ${lightness}%)`;
|
||||
weightColorMap[period][whs] = `hsl(${weightHue}, 85%, ${lightness}%)`;
|
||||
linesColorMap[period][whs] = `hsl(${HUE_GREY}, 10%, ${lightness}%)`; // Pure grey for Lines
|
||||
});
|
||||
});
|
||||
|
||||
// Function to get the appropriate color based on time period, metric, and WHS
|
||||
function getDatasetColor(yearLabel, metric, whs) {
|
||||
const period = getTimePeriod(yearLabel);
|
||||
|
||||
if (metric === "Sales") {
|
||||
return salesColorMap[period]?.[whs] || `hsl(${HUE_BLUE}, 85%, 50%)`;
|
||||
} else if (metric === "Weight") {
|
||||
return weightColorMap[period]?.[whs] || `hsl(${HUE_GREEN}, 85%, 50%)`;
|
||||
} else if (metric === "Lines") {
|
||||
return linesColorMap[period]?.[whs] || `hsl(${HUE_GREY}, 0%, 50%)`;
|
||||
}
|
||||
|
||||
return "rgba(200, 200, 200, 0.6)"; // Default fallback
|
||||
}
|
||||
|
||||
// Extract datasets
|
||||
let datasets = [];
|
||||
|
||||
whsArray.forEach(whs => {
|
||||
// Function to create dataset with colors based on time period, metric, and WHS
|
||||
const createDataset = (label, dataKey, stack, yAxisID, metric) => ({
|
||||
label: `${label} (WHS ${whs} - ${metric})`,
|
||||
data: labels.map(year => groupedData.get(year)?.get(whs)?.[dataKey] || 0),
|
||||
backgroundColor: labels.map(year => getDatasetColor(year, metric, whs)),
|
||||
stack,
|
||||
yAxisID,
|
||||
borderWidth: 2
|
||||
});
|
||||
|
||||
if (checkSales === 'on') {
|
||||
datasets.push(createDataset("Sales", "dollars", "Sales", 'yLeft', "Sales"));
|
||||
}
|
||||
if (checkWeight === 'on') {
|
||||
datasets.push(createDataset("Weight", "weight", "Weight", 'yLeft', "Weight"));
|
||||
}
|
||||
if (checkLines === 'on') {
|
||||
datasets.push(createDataset("Lines", "lines", "Lines", 'yRight', "Lines"));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//###### END MAK
|
||||
|
||||
// Generate Chart
|
||||
window.execSummaryChart = new Chart(
|
||||
document.getElementById('acquisitions'), {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels,
|
||||
datasets
|
||||
},
|
||||
options: {
|
||||
interaction: {
|
||||
intersect: false
|
||||
},
|
||||
responsive: true,
|
||||
scales: {
|
||||
yLeft: {
|
||||
type: 'linear',
|
||||
position: 'left',
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Sales & Weight'
|
||||
},
|
||||
stacked: true
|
||||
},
|
||||
yRight: {
|
||||
type: 'linear',
|
||||
position: 'right',
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Lines'
|
||||
},
|
||||
grid: {
|
||||
drawOnChartArea: false
|
||||
},
|
||||
stacked: true
|
||||
},
|
||||
x: {
|
||||
stacked: true
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error("Error:", error);
|
||||
// Handle errors
|
||||
}
|
||||
});
|
||||
// End Ajax
|
||||
|
||||
});
|
||||
|
||||
//// Trigger Click on init
|
||||
$("#updateCharts").trigger("click");
|
||||
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,992 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Exec Summary - Line Chart
|
||||
@endsection
|
||||
|
||||
{{-- Flat Picker CSS --}}
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/plugins/monthSelect/style.css">
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid px-4">
|
||||
<h1 class="mt-4">Exec Summary - Line Chart</h1>
|
||||
<div class="tab-content" id="pills-tabContent">
|
||||
<div class="tab-pane fade show active" id="pills-home" role="tabpanel" aria-labelledby="pills-home-tab">
|
||||
<div class="card mb-4">
|
||||
{{-- <div class="card-header"></div> --}}
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{-- Selectors --}}
|
||||
<div class="col-2 border-end">
|
||||
<form id="chartSelectorsForm">
|
||||
<h6>Sales / Weight / Lines</h6>
|
||||
|
||||
{{-- Warehouses --}}
|
||||
<div class="mb-3">
|
||||
<div class="form-check-container">
|
||||
@foreach ($IC670M as $key => $IC670MR)
|
||||
@php $currentWHDDA = trim($IC670MR->WDCO).trim($IC670MR->WDPL).trim($IC670MR->WDWHS); @endphp
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="WHDDA[]"
|
||||
id="WHDDA_{{ $currentWHDDA }}" value="{{ $currentWHDDA }}"
|
||||
data-comp="{{ trim($IC670MR->WDCO) }}"
|
||||
data-pl="{{ trim($IC670MR->WDPL) }}"
|
||||
data-wh="{{ trim($IC670MR->WDWHS) }}"
|
||||
{{ $WHDDA != '' && $WHDDA == $currentWHDDA ? 'checked' : '' }}>
|
||||
<label class="form-check-label" for="WHDDA_{{ $currentWHDDA }}">
|
||||
{{ trim(Str::upper($IC670MR->WDWNAM)) }}
|
||||
</label>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
{{-- Report Period --}}
|
||||
<div class="mb-3">
|
||||
<div class="btn-group" role="group" aria-label="Report Period">
|
||||
<input type="radio" class="btn-check" name="reportPeriod" id="periodMonthly" value="monthly" checked>
|
||||
<label class="btn btn-outline-primary btn-sm" for="periodMonthly">Monthly</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="reportPeriod" id="periodQuarter" value="quarter">
|
||||
<label class="btn btn-outline-primary btn-sm" for="periodQuarter">Quarter</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="reportPeriod" id="periodYear" value="year">
|
||||
<label class="btn btn-outline-primary btn-sm" for="periodYear">Year</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="reportPeriod" id="preiodCustom" value="custom">
|
||||
<label class="btn btn-outline-primary btn-sm" for="preiodCustom">Daily</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
{{-- From To Dates --}}
|
||||
<div class="mb-3">
|
||||
@php
|
||||
$todayDate = today()->format('Ym');
|
||||
$reportDate = \DateTime::createFromFormat('Ym', $todayDate)
|
||||
->modify('first day of January last year')
|
||||
->format('Y-m');
|
||||
$toreportDate = \DateTime::createFromFormat('Ym', $todayDate)->format(
|
||||
'Y-m',
|
||||
);
|
||||
@endphp
|
||||
<div class="row">
|
||||
{{-- <fieldset id="fromToDates"> --}}
|
||||
<div class="row align-items-center mb-2">
|
||||
<div class="col-md-4">
|
||||
<label class="col-form-label" for="REPORTDATE">From</label>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<input type="text" class="form-control" id="REPORTDATE"
|
||||
name="REPORTDATE" value="{{ $reportDate }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row align-items-center" id="TOREPORTDATEDIV">
|
||||
<div class="col-md-4">
|
||||
<label class="col-form-label" for="TOREPORTDATE">To</label>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<input type="text" class="form-control" id="TOREPORTDATE"
|
||||
name="TOREPORTDATE" value="{{ $toreportDate }}">
|
||||
</div>
|
||||
</div>
|
||||
{{-- </fieldset> --}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
{{-- Sales Weight Lines --}}
|
||||
<div class="mb-3">
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" id="checkSales"
|
||||
name="checkSales" checked>
|
||||
<label class="form-check-label" for="checkSales">Sales</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" id="checkWeight"
|
||||
name="checkWeight">
|
||||
<label class="form-check-label" for="checkWeight">Weight</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" id="checkLines"
|
||||
name="checkLines">
|
||||
<label class="form-check-label" for="checkLines">Lines</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
|
||||
<button type="button" class="btn btn-primary mt-4" id="updateCharts">Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
{{-- Charts --}}
|
||||
<div class="col-10">
|
||||
<div class="container-fluid">
|
||||
<canvas id="acquisitions"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
{{-- Chart JS --}}
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.8/dist/chart.umd.min.js"></script>
|
||||
|
||||
<!-- Flatpickr JS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
|
||||
<!-- Month Select Plugin -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/flatpickr/dist/plugins/monthSelect/index.js"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
//// Init Dates
|
||||
let fromMonthPicker = flatpickr("#REPORTDATE", {
|
||||
dateFormat: "Y-m", // Format as Year-Month
|
||||
plugins: [
|
||||
new monthSelectPlugin({
|
||||
shorthand: false, // Show short month names (e.g., Jan, Feb)
|
||||
readOnly: false,
|
||||
dateFormat: "Y-m", // Format output
|
||||
altFormat: "F Y", // Display full month name (e.g., January 2025)
|
||||
theme: "material_blue" // Options: "light", "dark", "material_blue", etc.
|
||||
})
|
||||
],
|
||||
onChange: function(selectedDates, dateStr) {
|
||||
toMonthPicker.set("minDate",
|
||||
dateStr); // Prevent selecting a "To" month before "From"
|
||||
},
|
||||
// Add these explicit styling options
|
||||
onReady: function(dateObj, dateStr, instance) {
|
||||
instance.input.style.backgroundColor = 'white';
|
||||
instance.input.style.cursor = 'pointer';
|
||||
}
|
||||
});
|
||||
|
||||
let toMonthPicker = flatpickr("#TOREPORTDATE", {
|
||||
dateFormat: "Y-m",
|
||||
plugins: [
|
||||
new monthSelectPlugin({
|
||||
shorthand: true,
|
||||
dateFormat: "Y-m",
|
||||
altFormat: "F Y",
|
||||
theme: "material_blue"
|
||||
})
|
||||
],
|
||||
onChange: function(selectedDates, dateStr) {
|
||||
fromMonthPicker.set("maxDate",
|
||||
dateStr); // Prevent selecting a "From" month after "To"
|
||||
},
|
||||
// Add these explicit styling options
|
||||
onReady: function(dateObj, dateStr, instance) {
|
||||
instance.input.style.backgroundColor = 'white';
|
||||
instance.input.style.cursor = 'pointer';
|
||||
}
|
||||
});
|
||||
//// End Dates
|
||||
|
||||
//// Add change event listener to radio buttons
|
||||
$('input[name="reportPeriod"]').change(function() {
|
||||
const isDisabled = $(this).val() == 'custom' || $(this).val() == 'monthly';
|
||||
// $('#TOREPORTDATE').prop('disabled', isDisabled);
|
||||
|
||||
if (isDisabled) {
|
||||
$('#TOREPORTDATEDIV').hide();
|
||||
// toMonthPicker.input.style.backgroundColor = '#e9ecef';
|
||||
// toMonthPicker.input.style.cursor = 'not-allowed';
|
||||
|
||||
// Set fromMonthPicker to today
|
||||
const today = new Date();
|
||||
fromMonthPicker.setDate(today);
|
||||
}
|
||||
// Show Todate
|
||||
else {
|
||||
$('#TOREPORTDATEDIV').show();
|
||||
// toMonthPicker.input.style.backgroundColor = 'white';
|
||||
// toMonthPicker.input.style.cursor = 'pointer';
|
||||
}
|
||||
});
|
||||
|
||||
//// Trigger Period change
|
||||
$('input[name="reportPeriod"]').trigger("change");
|
||||
|
||||
//// Update Charts
|
||||
$("#updateCharts").click(function() {
|
||||
//// Validate Fields before calling Ajax
|
||||
// Validation checks
|
||||
let isValid = true;
|
||||
let errorMessages = [];
|
||||
|
||||
// Check if at least one WHDDA checkbox is checked
|
||||
const checkedWhdda = $("input[name='WHDDA[]']:checked").length;
|
||||
if (checkedWhdda === 0) {
|
||||
isValid = false;
|
||||
errorMessages.push("Please select at least one Warehouse/Plant");
|
||||
}
|
||||
|
||||
// Get selected period
|
||||
const checkedPeriod = $('input[name="reportPeriod"]:checked').val();
|
||||
// console.log(checkedPeriod);
|
||||
|
||||
// Check From and To dates
|
||||
const fromDate = $("#REPORTDATE").val();
|
||||
const toDate = $("#TOREPORTDATE").val();
|
||||
|
||||
if ((checkedPeriod == 'monthly' || checkedPeriod == 'custom') && !fromDate) {
|
||||
isValid = false;
|
||||
errorMessages.push("Please select date");
|
||||
}
|
||||
else if (!fromDate && !toDate) {
|
||||
isValid = false;
|
||||
errorMessages.push("Please select both From and To dates");
|
||||
}
|
||||
|
||||
// Check if at least one of Sales/Weight/Lines is checked
|
||||
const checkedMetrics =
|
||||
$("#checkSales:checked").length +
|
||||
$("#checkWeight:checked").length +
|
||||
$("#checkLines:checked").length;
|
||||
|
||||
if (checkedMetrics === 0) {
|
||||
isValid = false;
|
||||
errorMessages.push("Please select at least one metric (Sales, Weight, or Lines)");
|
||||
}
|
||||
|
||||
// If validation fails, show SweetAlert
|
||||
if (!isValid) {
|
||||
Swal.fire({
|
||||
icon: 'warning',
|
||||
title: 'Validation Error',
|
||||
html: errorMessages.map(msg => `<p>${msg}</p>`).join(''),
|
||||
confirmButtonText: 'OK'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
let formData = $('#chartSelectorsForm').serialize(); // Serialize form data
|
||||
// console.log(formData); return false;
|
||||
|
||||
//// Run Ajax
|
||||
$.ajax({
|
||||
url: "{{ route('m3.execsummaryline') }}",
|
||||
type: "POST",
|
||||
data: formData,
|
||||
success: function(response) {
|
||||
//// Update charts
|
||||
if (response.success == true) {
|
||||
// First: Destroy Chart if it exists
|
||||
if (window.execSummaryChart !== undefined) {
|
||||
window.execSummaryChart.destroy();
|
||||
}
|
||||
|
||||
checkSales = response.checkSales;
|
||||
checkWeight = response.checkWeight;
|
||||
checkLines = response.checkLines;
|
||||
|
||||
dataResult = response.result;
|
||||
dataResultLY = response.resultLY; // Last year data
|
||||
reportPeriod = response.reportPeriod;
|
||||
|
||||
// Build Data for Current Year
|
||||
const data = dataResult.map(item => ({
|
||||
year: item.YEARS,
|
||||
dollars: parseInt(item.DOLLARS),
|
||||
weight: parseInt(item.WEIGHT),
|
||||
lines: parseInt(item.LINES),
|
||||
whs: parseInt(item.WHS)
|
||||
}));
|
||||
|
||||
// Build Data for Last Year
|
||||
const dataLY = dataResultLY ? dataResultLY.map(item => ({
|
||||
year: item.YEARS,
|
||||
dollars: parseInt(item.DOLLARS),
|
||||
weight: parseInt(item.WEIGHT),
|
||||
lines: parseInt(item.LINES),
|
||||
whs: parseInt(item.WHS)
|
||||
})) : [];
|
||||
|
||||
// Determine data format (year, quarterly, monthly, or daily)
|
||||
let dataFormat;
|
||||
if (data.length > 0) {
|
||||
const sampleYear = data[0].year;
|
||||
if (sampleYear.includes("Q")) {
|
||||
dataFormat = "quarterly";
|
||||
} else if (sampleYear.match(/^\d{4}-\d{2}$/)) {
|
||||
dataFormat = "monthly";
|
||||
} else if (/^\d{2}$/.test(sampleYear)) {
|
||||
dataFormat = "daily";
|
||||
} else {
|
||||
dataFormat = "yearly";
|
||||
}
|
||||
}
|
||||
|
||||
// Function to generate distinct colors
|
||||
function generateDistinctColors(count) {
|
||||
let colors = [];
|
||||
for (let i = 0; i < count; i++) {
|
||||
let hue = (i * 137.5) % 360; // Golden angle for uniqueness
|
||||
let saturation = 70 + (i % 3) * 10;
|
||||
let lightness = 50 + (i % 2) * 10;
|
||||
colors.push(`hsl(${hue}, ${saturation}%, ${lightness}%)`);
|
||||
}
|
||||
return colors;
|
||||
}
|
||||
|
||||
// Function to create a lighter version of a color for LY data
|
||||
function createLighterColor(color) {
|
||||
// Extract HSL values
|
||||
const match = color.match(/hsl\((\d+\.?\d*),\s*(\d+\.?\d*)%,\s*(\d+\.?\d*)%\)/);
|
||||
if (match) {
|
||||
const h = parseFloat(match[1]);
|
||||
const s = parseFloat(match[2]);
|
||||
const l = parseFloat(match[3]);
|
||||
|
||||
// Create lighter version by increasing lightness and reducing saturation
|
||||
return `hsl(${h}, ${Math.max(s - 20, 30)}%, ${Math.min(l + 15, 85)}%)`;
|
||||
}
|
||||
return color; // Return original if parsing fails
|
||||
}
|
||||
|
||||
// Group data according to format
|
||||
let labels = [];
|
||||
let datasets = [];
|
||||
const whsSet = new Set();
|
||||
|
||||
// Initialize warehouse set from data
|
||||
data.forEach(entry => whsSet.add(entry.whs));
|
||||
if (dataLY) dataLY.forEach(entry => whsSet.add(entry.whs));
|
||||
const whsArray = Array.from(whsSet).sort((a, b) => a - b);
|
||||
|
||||
// Monthly data format handling
|
||||
if (dataFormat === "monthly") {
|
||||
// Extract unique year-month combinations
|
||||
const periodData = new Map();
|
||||
const monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
||||
|
||||
// Process current year data
|
||||
data.forEach(entry => {
|
||||
const [year, month] = entry.year.split("-");
|
||||
const monthIndex = parseInt(month) - 1;
|
||||
const monthName = monthNames[monthIndex];
|
||||
const yearSuffix = year.substring(2); // Last 2 digits
|
||||
const periodKey = `${monthName}`; // '${yearSuffix}
|
||||
const periodKey2 = `${monthName} '${yearSuffix}`;
|
||||
|
||||
if (!periodData.has(periodKey)) {
|
||||
periodData.set(periodKey, { current: {}, ly: {} ,label: periodKey2 });
|
||||
}
|
||||
|
||||
const whsData = periodData.get(periodKey).current;
|
||||
if (!whsData[entry.whs]) {
|
||||
whsData[entry.whs] = { dollars: 0, weight: 0, lines: 0 };
|
||||
}
|
||||
|
||||
whsData[entry.whs].dollars += entry.dollars;
|
||||
whsData[entry.whs].weight += entry.weight;
|
||||
whsData[entry.whs].lines += entry.lines;
|
||||
});
|
||||
|
||||
// Process last year data if available
|
||||
if (dataLY && dataLY.length > 0) {
|
||||
dataLY.forEach(entry => {
|
||||
const [year, month] = entry.year.split("-");
|
||||
const monthIndex = parseInt(month) - 1;
|
||||
const monthName = monthNames[monthIndex];
|
||||
const yearSuffix = year.substring(2); // Last 2 digits
|
||||
const periodKey = `${monthName}`; // '${yearSuffix}
|
||||
const periodKey2 = `${monthName} '${yearSuffix}`;
|
||||
|
||||
if (!periodData.has(periodKey)) {
|
||||
periodData.set(periodKey, { current: {}, ly: {},label: periodKey2 });
|
||||
}
|
||||
|
||||
const whsData = periodData.get(periodKey).ly;
|
||||
if (!whsData[entry.whs]) {
|
||||
whsData[entry.whs] = { dollars: 0, weight: 0, lines: 0 };
|
||||
}
|
||||
|
||||
whsData[entry.whs].dollars += entry.dollars;
|
||||
whsData[entry.whs].weight += entry.weight;
|
||||
whsData[entry.whs].lines += entry.lines;
|
||||
});
|
||||
}
|
||||
|
||||
// Sort labels chronologically
|
||||
labels = Array.from(periodData.keys()).sort((a, b) => {
|
||||
// Parse month and year
|
||||
const [monthA, yearA] = a.split(" '");
|
||||
const [monthB, yearB] = b.split(" '");
|
||||
const yearDiff = parseInt(yearA) - parseInt(yearB);
|
||||
if (yearDiff !== 0) return yearDiff;
|
||||
|
||||
// Compare months if same year
|
||||
const monthOrder = { "Jan": 1, "Feb": 2, "Mar": 3, "Apr": 4, "May": 5, "Jun": 6,"Jul": 7, "Aug": 8, "Sep": 9, "Oct": 10, "Nov": 11, "Dec": 12 };
|
||||
return monthOrder[monthA] - monthOrder[monthB];
|
||||
});
|
||||
|
||||
// Generate colors for each WHS
|
||||
const whsColors = {};
|
||||
whsArray.forEach((whs, index) => {
|
||||
whsColors[whs] = generateDistinctColors(whsArray.length)[index];
|
||||
});
|
||||
|
||||
// Create datasets for each metric and warehouse
|
||||
whsArray.forEach(whs => {
|
||||
if (checkSales === 'on') {
|
||||
// Sales dataset for current year
|
||||
datasets.push({
|
||||
type: 'line',
|
||||
label: `Sales TY (WHS ${whs})`,
|
||||
data: labels.map(period => ({
|
||||
x: period,
|
||||
y: periodData.get(period)?.current[whs]?.dollars || 0,
|
||||
label: periodData.get(period)?.label || period
|
||||
})),
|
||||
borderColor: whsColors[whs],
|
||||
backgroundColor: whsColors[whs],
|
||||
yAxisID: 'yLeft',
|
||||
tension: 0.3,
|
||||
fill: false
|
||||
});
|
||||
|
||||
// Sales dataset for last year
|
||||
if (dataLY && dataLY.length > 0) {
|
||||
datasets.push({
|
||||
type: 'line',
|
||||
label: `Sales LY (WHS ${whs})`,
|
||||
data: labels.map(period => ({
|
||||
x: period,
|
||||
y: periodData.get(period)?.ly[whs]?.dollars || 0,
|
||||
label: periodData.get(period)?.label || period
|
||||
})),
|
||||
borderColor: createLighterColor(whsColors[whs]),
|
||||
backgroundColor: createLighterColor(whsColors[whs]),
|
||||
borderDash: [10, 5],
|
||||
yAxisID: 'yLeft',
|
||||
tension: 0.3,
|
||||
fill: false,
|
||||
order: 1
|
||||
});
|
||||
}
|
||||
}
|
||||
// Weight
|
||||
if (checkWeight === 'on') {
|
||||
// Weight dataset for current year
|
||||
datasets.push({
|
||||
type: 'line',
|
||||
label: `Weight TY (WHS ${whs})`,
|
||||
data: labels.map(period =>
|
||||
periodData.get(period)?.current[whs]?.weight || 0
|
||||
),
|
||||
borderColor: whsColors[whs],
|
||||
backgroundColor: whsColors[whs],
|
||||
// borderDash: [5, 5],
|
||||
yAxisID: 'yLeft',
|
||||
tension: 0.3,
|
||||
fill: false
|
||||
});
|
||||
|
||||
// Weight dataset for last year
|
||||
if (dataLY && dataLY.length > 0) {
|
||||
datasets.push({
|
||||
type: 'line',
|
||||
label: `Weight LY (WHS ${whs})`,
|
||||
data: labels.map(period =>
|
||||
periodData.get(period)?.ly[whs]?.weight || 0
|
||||
),
|
||||
borderColor: createLighterColor(whsColors[whs]),
|
||||
backgroundColor: createLighterColor(whsColors[whs]),
|
||||
borderDash: [10, 10],
|
||||
yAxisID: 'yLeft',
|
||||
tension: 0.3,
|
||||
fill: false,
|
||||
order: 1
|
||||
});
|
||||
}
|
||||
}
|
||||
// Lines
|
||||
if (checkLines === 'on') {
|
||||
// Lines dataset for current year
|
||||
datasets.push({
|
||||
type: 'line',
|
||||
label: `Lines TY (WHS ${whs})`,
|
||||
data: labels.map(period =>
|
||||
periodData.get(period)?.current[whs]?.lines || 0
|
||||
),
|
||||
borderColor: whsColors[whs],
|
||||
backgroundColor: whsColors[whs],
|
||||
// borderDash: [2, 2],
|
||||
yAxisID: 'yRight',
|
||||
tension: 0.3,
|
||||
fill: false
|
||||
});
|
||||
|
||||
// Lines dataset for last year
|
||||
if (dataLY && dataLY.length > 0) {
|
||||
datasets.push({
|
||||
type: 'line',
|
||||
label: `Lines LY (WHS ${whs})`,
|
||||
data: labels.map(period =>
|
||||
periodData.get(period)?.ly[whs]?.lines || 0
|
||||
),
|
||||
borderColor: createLighterColor(whsColors[whs]),
|
||||
backgroundColor: createLighterColor(whsColors[whs]),
|
||||
borderDash: [10, 2],
|
||||
yAxisID: 'yRight',
|
||||
tension: 0.3,
|
||||
fill: false,
|
||||
order: 1
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Quarterly data format handling
|
||||
else if (dataFormat === "quarterly") {
|
||||
// Extract unique years and quarters
|
||||
const yearsSet = new Set();
|
||||
const periodsSet = new Set();
|
||||
|
||||
data.forEach(entry => {
|
||||
const [quarter, year] = entry.year.split("-");
|
||||
yearsSet.add(year);
|
||||
periodsSet.add(quarter);
|
||||
});
|
||||
|
||||
const years = Array.from(yearsSet).sort();
|
||||
const periods = Array.from(periodsSet).sort((a, b) =>
|
||||
parseInt(a.substring(1)) - parseInt(b.substring(1))
|
||||
);
|
||||
|
||||
// Create groupedData structure for quarters
|
||||
const groupedData = new Map();
|
||||
const groupedDataLY = new Map();
|
||||
|
||||
// Initialize data structures
|
||||
years.forEach(year => {
|
||||
groupedData.set(year, new Map());
|
||||
periods.forEach(quarter => {
|
||||
groupedData.get(year).set(quarter, new Map());
|
||||
});
|
||||
});
|
||||
|
||||
// Process current year data
|
||||
data.forEach(entry => {
|
||||
const [quarter, year] = entry.year.split("-");
|
||||
if (!groupedData.has(year)) {
|
||||
groupedData.set(year, new Map());
|
||||
}
|
||||
if (!groupedData.get(year).has(quarter)) {
|
||||
groupedData.get(year).set(quarter, new Map());
|
||||
}
|
||||
if (!groupedData.get(year).get(quarter).has(entry.whs)) {
|
||||
groupedData.get(year).get(quarter).set(entry.whs, {
|
||||
dollars: 0, weight: 0, lines: 0
|
||||
});
|
||||
}
|
||||
|
||||
const whsData = groupedData.get(year).get(quarter).get(entry.whs);
|
||||
whsData.dollars += entry.dollars;
|
||||
whsData.weight += entry.weight;
|
||||
whsData.lines += entry.lines;
|
||||
});
|
||||
|
||||
// Process last year data if available
|
||||
if (dataLY && dataLY.length > 0) {
|
||||
// Initialize LY structure
|
||||
years.forEach(year => {
|
||||
groupedDataLY.set(year, new Map());
|
||||
periods.forEach(quarter => {
|
||||
groupedDataLY.get(year).set(quarter, new Map());
|
||||
});
|
||||
});
|
||||
|
||||
dataLY.forEach(entry => {
|
||||
const [quarter, year] = entry.year.split("-");
|
||||
if (!groupedDataLY.has(year)) {
|
||||
groupedDataLY.set(year, new Map());
|
||||
}
|
||||
if (!groupedDataLY.get(year).has(quarter)) {
|
||||
groupedDataLY.get(year).set(quarter, new Map());
|
||||
}
|
||||
if (!groupedDataLY.get(year).get(quarter).has(entry.whs)) {
|
||||
groupedDataLY.get(year).get(quarter).set(entry.whs, {
|
||||
dollars: 0, weight: 0, lines: 0
|
||||
});
|
||||
}
|
||||
|
||||
const whsData = groupedDataLY.get(year).get(quarter).get(entry.whs);
|
||||
whsData.dollars += entry.dollars;
|
||||
whsData.weight += entry.weight;
|
||||
whsData.lines += entry.lines;
|
||||
});
|
||||
}
|
||||
|
||||
// Set labels to quarters
|
||||
labels = periods;
|
||||
|
||||
// Create color map for years
|
||||
const yearColors = {};
|
||||
const generatedColors = generateDistinctColors(years.length);
|
||||
years.forEach((year, index) => {
|
||||
yearColors[year] = generatedColors[index];
|
||||
});
|
||||
|
||||
// Create datasets
|
||||
whsArray.forEach(whs => {
|
||||
years.forEach(year => {
|
||||
if (checkSales === 'on') {
|
||||
// Current year sales
|
||||
datasets.push({
|
||||
type: 'line',
|
||||
label: `Sales (WHS ${whs} - ${year})`,
|
||||
data: periods.map(period =>
|
||||
groupedData.get(year)?.get(period)?.get(whs)?.dollars || 0
|
||||
),
|
||||
borderColor: yearColors[year],
|
||||
backgroundColor: yearColors[year],
|
||||
yAxisID: 'yLeft',
|
||||
tension: 0.3,
|
||||
fill: false
|
||||
});
|
||||
|
||||
// Last year sales
|
||||
if (dataLY && dataLY.length > 0) {
|
||||
datasets.push({
|
||||
type: 'line',
|
||||
label: `Sales LY (WHS ${whs} - ${year})`,
|
||||
data: periods.map(period =>
|
||||
groupedDataLY.get(year)?.get(period)?.get(whs)?.dollars || 0
|
||||
),
|
||||
borderColor: yearColors[year],
|
||||
backgroundColor: yearColors[year],
|
||||
borderDash: [10, 5],
|
||||
yAxisID: 'yLeft',
|
||||
tension: 0.3,
|
||||
fill: false,
|
||||
order: 1
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (checkWeight === 'on') {
|
||||
// Current year weight
|
||||
datasets.push({
|
||||
type: 'line',
|
||||
label: `Weight (WHS ${whs} - ${year})`,
|
||||
data: periods.map(period =>
|
||||
groupedData.get(year)?.get(period)?.get(whs)?.weight || 0
|
||||
),
|
||||
borderColor: yearColors[year],
|
||||
backgroundColor: yearColors[year],
|
||||
borderDash: [5, 5],
|
||||
yAxisID: 'yLeft',
|
||||
tension: 0.3,
|
||||
fill: false
|
||||
});
|
||||
|
||||
// Last year weight
|
||||
if (dataLY && dataLY.length > 0) {
|
||||
datasets.push({
|
||||
type: 'line',
|
||||
label: `Weight LY (WHS ${whs} - ${year})`,
|
||||
data: periods.map(period =>
|
||||
groupedDataLY.get(year)?.get(period)?.get(whs)?.weight || 0
|
||||
),
|
||||
borderColor: yearColors[year],
|
||||
backgroundColor: yearColors[year],
|
||||
borderDash: [10, 10],
|
||||
yAxisID: 'yLeft',
|
||||
tension: 0.3,
|
||||
fill: false,
|
||||
order: 1
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (checkLines === 'on') {
|
||||
// Current year lines
|
||||
datasets.push({
|
||||
type: 'line',
|
||||
label: `Lines (WHS ${whs} - ${year})`,
|
||||
data: periods.map(period =>
|
||||
groupedData.get(year)?.get(period)?.get(whs)?.lines || 0
|
||||
),
|
||||
borderColor: yearColors[year],
|
||||
backgroundColor: yearColors[year],
|
||||
borderDash: [2, 2],
|
||||
yAxisID: 'yRight',
|
||||
tension: 0.3,
|
||||
fill: false
|
||||
});
|
||||
|
||||
// Last year lines
|
||||
if (dataLY && dataLY.length > 0) {
|
||||
datasets.push({
|
||||
type: 'line',
|
||||
label: `Lines LY (WHS ${whs} - ${year})`,
|
||||
data: periods.map(period =>
|
||||
groupedDataLY.get(year)?.get(period)?.get(whs)?.lines || 0
|
||||
),
|
||||
borderColor: yearColors[year],
|
||||
backgroundColor: yearColors[year],
|
||||
borderDash: [10, 2],
|
||||
yAxisID: 'yRight',
|
||||
tension: 0.3,
|
||||
fill: false,
|
||||
order: 1
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
// Yearly or daily format handling
|
||||
else {
|
||||
// Group data by year/day and warehouse
|
||||
const groupedData = new Map();
|
||||
const groupedDataLY = new Map();
|
||||
|
||||
// Process current year data
|
||||
data.forEach(entry => {
|
||||
if (!groupedData.has(entry.year)) {
|
||||
groupedData.set(entry.year, new Map());
|
||||
}
|
||||
if (!groupedData.get(entry.year).has(entry.whs)) {
|
||||
groupedData.get(entry.year).set(entry.whs, {
|
||||
dollars: 0, weight: 0, lines: 0
|
||||
});
|
||||
}
|
||||
|
||||
const whsData = groupedData.get(entry.year).get(entry.whs);
|
||||
whsData.dollars += entry.dollars;
|
||||
whsData.weight += entry.weight;
|
||||
whsData.lines += entry.lines;
|
||||
});
|
||||
|
||||
// Process last year data if available
|
||||
if (dataLY && dataLY.length > 0) {
|
||||
dataLY.forEach(entry => {
|
||||
if (!groupedDataLY.has(entry.year)) {
|
||||
groupedDataLY.set(entry.year, new Map());
|
||||
}
|
||||
if (!groupedDataLY.get(entry.year).has(entry.whs)) {
|
||||
groupedDataLY.get(entry.year).set(entry.whs, {
|
||||
dollars: 0, weight: 0, lines: 0
|
||||
});
|
||||
}
|
||||
|
||||
const whsData = groupedDataLY.get(entry.year).get(entry.whs);
|
||||
whsData.dollars += entry.dollars;
|
||||
whsData.weight += entry.weight;
|
||||
whsData.lines += entry.lines;
|
||||
});
|
||||
}
|
||||
|
||||
// Set labels to sorted years or days
|
||||
labels = Array.from(groupedData.keys()).sort();
|
||||
|
||||
// Helper function to get time key
|
||||
function getTimeKey(yearLabel) {
|
||||
if (yearLabel.includes("Q")) {
|
||||
return yearLabel.split("-")[0] + "-";
|
||||
} else if (yearLabel.match(/^\d{4}-\d{2}$/)) {
|
||||
return yearLabel.split("-")[1]; // Get month part
|
||||
} else if (/^\d{2}$/.test(yearLabel)) {
|
||||
return yearLabel;
|
||||
}
|
||||
return yearLabel;
|
||||
}
|
||||
|
||||
// Create color map
|
||||
let uniqueKeys = new Set();
|
||||
data.forEach(item => {
|
||||
const timeKey = getTimeKey(item.year);
|
||||
whsArray.forEach(whs => {
|
||||
if (/^\d{2}$/.test(item.year)) {
|
||||
// Daily case
|
||||
uniqueKeys.add(`${whs}_Sales`);
|
||||
uniqueKeys.add(`${whs}_Weight`);
|
||||
uniqueKeys.add(`${whs}_Lines`);
|
||||
} else {
|
||||
// Yearly case
|
||||
uniqueKeys.add(`${timeKey}_${whs}`);
|
||||
}
|
||||
});
|
||||
});
|
||||
uniqueKeys = [...uniqueKeys];
|
||||
|
||||
let colorMap = {};
|
||||
let generatedColors = generateDistinctColors(uniqueKeys.length);
|
||||
uniqueKeys.forEach((key, index) => {
|
||||
colorMap[key] = generatedColors[index];
|
||||
});
|
||||
|
||||
// Function to get color
|
||||
function getDatasetColor(year, whs, metric, isLastYear = false) {
|
||||
const timeKey = getTimeKey(year);
|
||||
const key = /^\d{2}$/.test(year) ?
|
||||
`${whs}_${metric}${isLastYear ? '_LY' : ''}` :
|
||||
`${timeKey}_${whs}`;
|
||||
return colorMap[key] || "rgba(200, 200, 200, 0.6)";
|
||||
}
|
||||
|
||||
// Create datasets
|
||||
whsArray.forEach(whs => {
|
||||
// Function to create dataset with unique colors
|
||||
const createDataset = (label, dataKey, stack, yAxisID, metric, isLastYear = false, dataGroup) => ({
|
||||
type: 'line',
|
||||
label: `${label}${isLastYear ? ' LY' : ''} (WHS ${whs} - ${metric})`,
|
||||
data: labels.map(year => dataGroup.get(year)?.get(whs)?.[dataKey] || 0),
|
||||
borderColor: labels.map(year => getDatasetColor(year, whs, metric, isLastYear)),
|
||||
backgroundColor: labels.map(year => getDatasetColor(year, whs, metric, isLastYear)),
|
||||
borderDash: isLastYear ? [10, 5] : undefined,
|
||||
stack,
|
||||
yAxisID,
|
||||
tension: 0.3,
|
||||
fill: false,
|
||||
order: isLastYear ? 1 : 0
|
||||
});
|
||||
|
||||
if (checkSales === 'on') {
|
||||
// Current year data
|
||||
datasets.push(createDataset("Sales", "dollars", "Sales", 'yLeft', "Sales", false, groupedData));
|
||||
|
||||
// Last year data for daily format
|
||||
if ((dataFormat === "daily" || dataFormat === "yearly") && dataLY && dataLY.length > 0) {
|
||||
datasets.push(createDataset("Sales", "dollars", "Sales_LY", 'yLeft', "Sales", true, groupedDataLY));
|
||||
}
|
||||
}
|
||||
|
||||
if (checkWeight === 'on') {
|
||||
// Current year data
|
||||
datasets.push(createDataset("Weight", "weight", "Weight", 'yLeft', "Weight", false, groupedData));
|
||||
|
||||
// Last year data for daily/yearly format
|
||||
if ((dataFormat === "daily" || dataFormat === "yearly") && dataLY && dataLY.length > 0) {
|
||||
datasets.push(createDataset("Weight", "weight", "Weight_LY", 'yLeft', "Weight", true, groupedDataLY));
|
||||
}
|
||||
}
|
||||
|
||||
if (checkLines === 'on') {
|
||||
// Current year data
|
||||
datasets.push(createDataset("Lines", "lines", "Lines", 'yRight', "Lines", false, groupedData));
|
||||
|
||||
// Last year data for daily/yearly format
|
||||
if ((dataFormat === "daily" || dataFormat === "yearly") && dataLY && dataLY.length > 0) {
|
||||
datasets.push(createDataset("Lines", "lines", "Lines_LY", 'yRight', "Lines", true, groupedDataLY));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Generate Chart
|
||||
window.execSummaryChart = new Chart(
|
||||
document.getElementById('acquisitions'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels,
|
||||
datasets
|
||||
},
|
||||
options: {
|
||||
interaction: {
|
||||
intersect: false,
|
||||
mode: 'index'
|
||||
},
|
||||
responsive: true,
|
||||
elements: {
|
||||
point: {
|
||||
radius: 5,
|
||||
hoverRadius: 8
|
||||
}
|
||||
},
|
||||
scales: {
|
||||
yLeft: {
|
||||
type: 'linear',
|
||||
position: 'left',
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Sales & Weight'
|
||||
},
|
||||
beginAtZero: true
|
||||
},
|
||||
yRight: {
|
||||
type: 'linear',
|
||||
position: 'right',
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Lines'
|
||||
},
|
||||
grid: {
|
||||
drawOnChartArea: false
|
||||
},
|
||||
beginAtZero: true
|
||||
},
|
||||
x: {
|
||||
title: {
|
||||
display: true,
|
||||
text: dataFormat === "quarterly" ? 'Quarter' :
|
||||
dataFormat === "monthly" ? 'Month' :
|
||||
dataFormat === "daily" ? 'Day' : 'Year'
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
tooltip: {
|
||||
callbacks: {
|
||||
title: function(tooltipItems) {
|
||||
return tooltipItems[0].label;
|
||||
// return tooltipItems[0].raw.label;
|
||||
}
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
position: 'top',
|
||||
labels: {
|
||||
usePointStyle: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
// End Success
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error("Error:", error);
|
||||
// Display error message to user
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Ajax Error',
|
||||
text: 'Failed to load chart data. Please try again.',
|
||||
confirmButtonText: 'OK'
|
||||
});
|
||||
}
|
||||
});
|
||||
// End Ajax
|
||||
});
|
||||
|
||||
//// Trigger Click on init
|
||||
$("#updateCharts").trigger("click");
|
||||
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,278 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Solon Sentinel Portal
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="container-fluid px-4">
|
||||
<h1 class="mt-4">Executive Dashboard</h1>
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-header" style="line-height: 34px;">
|
||||
<i class="fas fa-table me-1"></i>
|
||||
Filters
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
|
||||
<form>
|
||||
@csrf
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="inputEmail" class="col-sm-2 col-form-label">Date Range</label>
|
||||
<div class="col-sm-10">
|
||||
<label for="text" class="visually-hidden">dates</label>
|
||||
<input value="{{ $starting }} - {{ $ending }}" id="text" name="dates" type="text" aria-describedby="textHelpBlock" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="inputWhs" class="col-sm-2 col-form-label">Warehouse</label>
|
||||
<div class="col-sm-10">
|
||||
<select aria-label="Whs" name="whs" class="form-control">
|
||||
<option value="*ALL">*ALL</option>
|
||||
@foreach($whs_array as $key)
|
||||
<option value={{$key}}
|
||||
@if($whs==$key) selected @endif
|
||||
>{{$key}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-xs-offset-2 col-xs-10">
|
||||
<button name="submit" type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@foreach($data as $key=>$value)
|
||||
<div class="col-xl-6">
|
||||
<div class="card mb-12">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-chart-bar me-1"></i>
|
||||
{{($key=="IC")?'INTERCO':'EXTERNAL'}}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<figure class="highcharts-figure">
|
||||
<div id="container{{($key=='IC')?'1':'2'}}"></div>
|
||||
</figure>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" style="margin-top:20px;">
|
||||
@foreach($data as $key=>$value)
|
||||
<div class="col-sm-6">
|
||||
<div class="card text-white bg-info mb-3" id="div2">
|
||||
<div class="card-header"><h5 class="card-title">{{($key=="IC")?'INTERCO':'EXTERNAL'}} <span class="text-end">$ {{ number_format($data[$key]['total'], 0, '.', ',') }}</span></h5></div>
|
||||
<div class="card-body">
|
||||
<b>Held</b>: $ {{ number_format($data[$key]['HLD'], 0, '.', ',') }}<br>
|
||||
┗ <b>Financial Hold</b>: $ {{ number_format($data[$key]['FinHld'], 0, '.', ',') }} ($ {{ number_format($data[$key]['FinFutHld'], 0, '.', ',') }} is >{{env('FDATE')}} in future)<br>
|
||||
┃ ┗ <b>Reserved On Pick</b>: $ {{ number_format($data[$key]['FHResPick'], 0, '.', ',') }}<br>
|
||||
┃ ┗ <b>Reserved No Pick</b>: $ {{ number_format($data[$key]['FHResNoPick'], 0, '.', ',') }}<br>
|
||||
┃ ┗ <b>Not reserved</b>: $ {{ number_format($data[$key]['FHNres'], 0, '.', ',') }}<br>
|
||||
┗ <b>Customer Hold</b>: $ {{ number_format($data[$key]['CusHld'], 0, '.', ',') }} ($ {{ number_format($data[$key]['CusFutHld'], 0, '.', ',') }} is >{{env('FDATE')}} in future)<br>
|
||||
┃ ┗ <b>Reserved On Pick</b>: $ {{ number_format($data[$key]['CHResPick'], 0, '.', ',') }}<br>
|
||||
┃ ┗ <b>Reserved No Pick</b>: $ {{ number_format($data[$key]['CHResNoPick'], 0, '.', ',') }}<br>
|
||||
┃ ┗ <b>Not reserved</b>: $ {{ number_format($data[$key]['CHNres'], 0, '.', ',') }}<br>
|
||||
<b>Avail</b>: $ {{ number_format($data[$key]['Avail'], 0, '.', ',') }} ($ {{ number_format($data[$key]['futNH'], 0, '.', ',') }} is >{{env('FDATE')}} in future)<br>
|
||||
┗ ┗ <b>Reserved On Pick</b>: $ {{ number_format($data[$key]['AvResPick'], 0, '.', ',') }}<br>
|
||||
┗ ┗ <b>Reserved No Pick Fill Code 1</b>: $ {{ number_format($data[$key]['AvResNoPickFillCode1'], 0, '.', ',') }}<br>
|
||||
┗ ┗ <b>Reserved No Pick</b>: $ {{ number_format($data[$key]['AvResNoPick'], 0, '.', ',') }}<br>
|
||||
┗ <b>Not reserved</b>: $ {{ number_format($data[$key]['AvUNres'], 0, '.', ',') }}<br>
|
||||
<b>No Early</b>: $ {{ number_format($data[$key]['NoE'], 0, '.', ',') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script>
|
||||
|
||||
var s1 = $('#div1').height();
|
||||
var s2 = $('#div2').height();
|
||||
if (s1 > s2){
|
||||
$('#div2').css('height', s1 + "px");
|
||||
}else{
|
||||
$('#div1').css('height', s2 + "px");
|
||||
}
|
||||
|
||||
@foreach ($data as $key=>$value)
|
||||
var data{{$key}} = [
|
||||
{id: '0.0',parent: '', name: 'Total', value: '{{ $data[$key]['total'] }}'},
|
||||
{ id: '1.1', parent: '0.0', name: 'Held', value: '{{ $data[$key]['HLD'] }}'},
|
||||
{ id: '1.1.1', parent: '1.1', name: 'Financial Hold', value: '{{ $data[$key]['FinHld'] }}'},
|
||||
{ id: '1.1.1.1', parent: '1.1.1', name: 'Reserved', value: '{{ $data[$key]['FHResPick'] }}'},
|
||||
{ id: '1.1.1.2', parent: '1.1.1', name: 'Reserved', value: '{{ $data[$key]['FHResNoPick'] }}'},
|
||||
{ id: '1.1.1.3', parent: '1.1.1', name: 'Not reserved', value: '{{ $data[$key]['FHNres'] }}'},
|
||||
{ id: '1.1.2', parent: '1.1', name: 'Customer Hold', value: '{{ $data[$key]['CusHld'] }}'},
|
||||
{ id: '1.1.2.1', parent: '1.1.2', name: 'Reserved', value: '{{ $data[$key]['CHResPick'] }}'},
|
||||
{ id: '1.1.2.2', parent: '1.1.2', name: 'Reserved', value: '{{ $data[$key]['CHResNoPick'] }}'},
|
||||
{ id: '1.1.2.3', parent: '1.1.2', name: 'Not reserved', value: '{{ $data[$key]['CHNres'] }}'},
|
||||
{ id: '1.2', parent: '0.0', name: 'Avail', value: '{{ $data[$key]['Avail'] }}'},
|
||||
{ id: '1.2.1', parent: '1.2', name: 'Avail', value: '{{ $data[$key]['Avail'] }}'},
|
||||
{ id: '1.2.1.1', parent: '1.2.1', name: 'Reserved On Pick', value: '{{ $data[$key]['AvResPick'] }}'},
|
||||
{ id: '1.2.1.2', parent: '1.2.1', name: 'Reserved No Pick', value: '{{ $data[$key]['AvResNoPick'] }}'},
|
||||
{ id: '1.2.1.3', parent: '1.2.1', name: 'Reserved No Pick Fill Code 1', value: '{{ $data[$key]['AvResNoPickFillCode1'] }}'},
|
||||
{ id: '1.2.1.4', parent: '1.2.1', name: 'Not reserved', value: '{{ $data[$key]['AvUNres'] }}'},
|
||||
{ id: '1.3', parent: '0.0', name: 'No Early', value: '{{ $data[$key]['NoE'] }}'},
|
||||
{ id: '1.3.1', parent: '1.3', name: 'No Early', value: '{{ $data[$key]['NoE'] }}'},
|
||||
{ id: '1.3.1.1', parent: '1.3.1', name: 'No Early', value: '{{ $data[$key]['NoE'] }}'}
|
||||
];
|
||||
@endforeach
|
||||
|
||||
Highcharts.chart('container1', {
|
||||
chart: { height: '100%'},
|
||||
colors: ['transparent'].concat(Highcharts.getOptions().colors),
|
||||
title: { text: 'Interco Chart'},
|
||||
|
||||
series: [{
|
||||
type: 'sunburst',
|
||||
data: dataIC,
|
||||
|
||||
allowDrillToNode: true,
|
||||
cursor: 'pointer',
|
||||
dataLabels: {
|
||||
format: '{point.name}',
|
||||
filter: {
|
||||
property: 'innerArcLength',
|
||||
operator: '>',
|
||||
value: 16
|
||||
},
|
||||
rotationMode: 'circular'
|
||||
},
|
||||
levels: [{
|
||||
level: 1,
|
||||
levelIsConstant: false,
|
||||
dataLabels: {
|
||||
filter: {
|
||||
property: 'outerArcLength',
|
||||
operator: '>',
|
||||
value: 64
|
||||
}
|
||||
}
|
||||
}, {
|
||||
level: 2,
|
||||
colorByPoint: true
|
||||
},
|
||||
{
|
||||
level: 3,
|
||||
colorVariation: {
|
||||
key: 'brightness',
|
||||
to: -0.5
|
||||
}
|
||||
}, {
|
||||
level: 4,
|
||||
colorVariation: {
|
||||
key: 'brightness',
|
||||
to: 0.5
|
||||
}
|
||||
}]
|
||||
|
||||
}],
|
||||
|
||||
tooltip: {
|
||||
headerFormat: '',
|
||||
pointFormat: '<b>{point.name}</b> is <b>$ {point.value:,.1f}</b>'
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Highcharts.chart('container2', {
|
||||
chart: { height: '100%' },
|
||||
colors: ['transparent'].concat(Highcharts.getOptions().colors),
|
||||
title: { text: 'External Chart' },
|
||||
|
||||
series: [{
|
||||
type: 'sunburst',
|
||||
data: dataEX,
|
||||
|
||||
allowDrillToNode: true,
|
||||
cursor: 'pointer',
|
||||
dataLabels: {
|
||||
format: '{point.name}',
|
||||
filter: {
|
||||
property: 'innerArcLength',
|
||||
operator: '>',
|
||||
value: 16
|
||||
},
|
||||
rotationMode: 'circular'
|
||||
},
|
||||
levels: [{
|
||||
level: 1,
|
||||
levelIsConstant: false,
|
||||
dataLabels: {
|
||||
filter: {
|
||||
property: 'outerArcLength',
|
||||
operator: '>',
|
||||
value: 64
|
||||
}
|
||||
}
|
||||
}, {
|
||||
level: 2,
|
||||
colorByPoint: true
|
||||
},
|
||||
{
|
||||
level: 3,
|
||||
colorVariation: {
|
||||
key: 'brightness',
|
||||
to: -0.5
|
||||
}
|
||||
}, {
|
||||
level: 4,
|
||||
colorVariation: {
|
||||
key: 'brightness',
|
||||
to: 0.5
|
||||
}
|
||||
}]
|
||||
|
||||
}],
|
||||
|
||||
tooltip: {
|
||||
headerFormat: '',
|
||||
pointFormat: '<b>{point.name}</b> is <b>$ {point.value:,.1f}</b>'
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
// Date range init
|
||||
$('input[name="dates"]').daterangepicker({
|
||||
locale: {
|
||||
format: 'YYYY-MM-DD',
|
||||
},
|
||||
startDate: '{{ $starting }}',
|
||||
endDate: '{{ $ending }}',
|
||||
alwaysShowCalendars: true,
|
||||
ranges: {
|
||||
'Today': [moment(), moment()],
|
||||
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
|
||||
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
|
||||
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
|
||||
'This Month': [moment().startOf('month'), moment().endOf('month')],
|
||||
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')],
|
||||
'This Year': [moment().startOf('year'), moment()]
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,59 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Fill BOL PDF
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="container-fluid px-4">
|
||||
<h3 class="mt-2">Fill BOL</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body">
|
||||
@if(session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(session('error'))
|
||||
<div class="alert alert-danger">
|
||||
{{ session('error') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form method="POST" action="{{ route('m3.fillBOLPDF') }}">
|
||||
@csrf
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-b5ab07fdda">BOL number</label>
|
||||
<input type="text" class="form-control" name="BOL_number" value="" id="sonar-input-b5ab07fdda">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-e32a7fe74c">Amount</label>
|
||||
<input type="text" class="form-control" name="amount" value="" id="sonar-input-e32a7fe74c">
|
||||
</div>
|
||||
<input type="hidden" name="referrer" id="referrer" value="">
|
||||
<div class="form-group mt-3 mb-2">
|
||||
<button type="submit" class="btn btn-primary">Fill PDF</button>
|
||||
<button type="button" class="btn btn-primary" onclick="goBack()">Back</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
});
|
||||
|
||||
//});
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,59 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Fill BOL PDF
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="container-fluid px-4">
|
||||
<h3 class="mt-2">Fill BOL 2</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body">
|
||||
@if(session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(session('error'))
|
||||
<div class="alert alert-danger">
|
||||
{{ session('error') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form method="POST" action="{{ route('m3.fillBOL2PDF') }}">
|
||||
@csrf
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-903d906a51">BOL number</label>
|
||||
<input type="text" class="form-control" name="BOL_number" value="" id="sonar-input-903d906a51">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-0ef98af069">Amount</label>
|
||||
<input type="text" class="form-control" name="amount" value="" id="sonar-input-0ef98af069">
|
||||
</div>
|
||||
<input type="hidden" name="referrer" id="referrer" value="">
|
||||
<div class="form-group mt-3 mb-2">
|
||||
<button type="submit" class="btn btn-primary">Fill PDF</button>
|
||||
<button type="button" class="btn btn-primary" onclick="goBack()">Back</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
});
|
||||
|
||||
//});
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,51 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Logout
|
||||
@endsection
|
||||
@section('btn')
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="container-fluid px-4">
|
||||
<h1 class="mt-4">Logout</h1>
|
||||
<div class="row">
|
||||
You will be logged out in a few seconds.
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
function GetXmlHttpObject()
|
||||
{
|
||||
if (window.XMLHttpRequest)
|
||||
{
|
||||
// code for IE7+, Firefox, Chrome, Opera, Safari
|
||||
return new XMLHttpRequest();
|
||||
}
|
||||
if (window.ActiveXObject)
|
||||
{
|
||||
// code for IE6, IE5
|
||||
return new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function logoutUser() {
|
||||
//setTimeout('location.reload(true)', 1000);
|
||||
xmlhttp = GetXmlHttpObject();
|
||||
if (xmlhttp==null) {
|
||||
return;
|
||||
}
|
||||
//alert(xmlhttp);
|
||||
var url = "/";
|
||||
|
||||
xmlhttp.open("GET", url, true, "dummy_user", "dummy_password");
|
||||
|
||||
xmlhttp.setRequestHeader( "If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT" );
|
||||
xmlhttp.setRequestHeader( 'Accept', 'message/x-formresult' );
|
||||
xmlhttp.send(null);
|
||||
}
|
||||
|
||||
logoutUser();
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,55 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Solon Sentinel Portal - Order Inquiry
|
||||
@endsection
|
||||
@section('breadcrumb')
|
||||
<div class="row">
|
||||
<hr class="hr-primary" />
|
||||
<nav class="navbar navbar-expand-lg navbar-light" aria-label="Page navigation">
|
||||
<div class="container-fluid">
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb breadcrumb-custom">
|
||||
<li class="breadcrumb-item"><a href="/" data-abc="true"><i class="fa fa-home"></i> Dashboard</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page"><i class="fa fa-truck"></i> Order Inquiry</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
@endsection
|
||||
@section('content')
|
||||
<!-- /.row -->
|
||||
<div class="container-fluid px-4">
|
||||
<h1 class="mt-4">Order Inquiry</h1>
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-header" style="line-height: 34px;">
|
||||
<i class="fas fa-table me-1"></i>
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
|
||||
<form action="/gotoOrder" onSubmit="document.forms[0].order.value=document.forms[0].order.value+'-0';" method="POST">
|
||||
@csrf
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-10">
|
||||
<label for="inputOrder" class="col-sm-2 col-form-label">Please enter an order number</label>
|
||||
<input type="hidden" id="reason" name="reason" value="-">
|
||||
<label for="order" class="visually-hidden">order</label>
|
||||
<input type="text" id="order" name="order" maxlength=6 length=4 aria-describedby="textHelpBlock">
|
||||
<button name="submit" type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
@endsection
|
||||
@@ -0,0 +1,171 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Solon Sentinel Portal - Orders On Hold Summary
|
||||
@endsection
|
||||
@section('breadcrumb')
|
||||
<div class="row">
|
||||
<hr class="hr-primary" />
|
||||
<nav class="navbar navbar-expand-lg navbar-light" aria-label="Page navigation">
|
||||
<div class="container-fluid">
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb breadcrumb-custom">
|
||||
<li class="breadcrumb-item"><a href="/" data-abc="true"><i class="fa fa-home"></i> Dashboard</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page"><i class="fa fa-truck"></i> Orders On Hold</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
@endsection
|
||||
@section('content')
|
||||
<!-- /.row -->
|
||||
<div class="container-fluid px-4">
|
||||
<h1 class="mt-4">Orders on hold</h1>
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-header" style="line-height: 34px;">
|
||||
<i class="fas fa-table me-1"></i>
|
||||
Filters
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
|
||||
<form>
|
||||
@csrf
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-10">
|
||||
<label for="inputWhs" class="col-sm-2 col-form-label">Please choose Selling warehouse subset</label>
|
||||
@foreach($whs_list as $key => $val)
|
||||
<label for="sonar-input-5fd2d62166" class="visually-hidden">sonar input 5fd2d62166</label>
|
||||
<label for="whs" class="visually-hidden">whs</label>
|
||||
<input value="{{ $val->SLSRWH }}" id="whs" name="whs[]" type="checkbox" aria-describedby="textHelpBlock"
|
||||
@if(array_key_exists($val->SLSRWH, $checked_whs)) checked @endif
|
||||
> {{ $val->SLSRWH }}
|
||||
@endforeach
|
||||
<button name="submit" type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-header" style="line-height: 34px;">
|
||||
<i class="fas fa-table me-1"></i>
|
||||
List of hold codes
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
|
||||
<table class="table table-striped table-bordered table-hover" id="datatablesSimple4">
|
||||
<th scope="col"ead>
|
||||
<tr>
|
||||
<th scope="col">Reason</th>
|
||||
<th scope="col" style="text-align:center">No of Orders</th>
|
||||
<th scope="col" style="text-align:right">Total</th>
|
||||
<th scope="col" style="text-align:right">Total for subset</th>
|
||||
<th scope="col" style="text-align:right">Reserved for subset</th>
|
||||
<th scope="col" style="text-align:right">On pick for subset</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($data as $key=>$value)
|
||||
<tr class="odd gradeX">
|
||||
<td><a href="/ordersOnHoldReq/{{ ( $value->SHHLDC == ' ' ? "NotHold" : $value->SHHLDC) }}">
|
||||
{{ ( $value->SHHLDC == ' ' ? "Not On Hold" : $value->SHHLDC . " - " . $hold_code_array[$value->SHHLDC] ) }}</a></td>
|
||||
<td class="text-right">{{ (isset($value->NBORDERS))?$value->NBORDERS:'' }}</td>
|
||||
<td class="text-right">$ {{ number_format((float)$value->TOTAL, 2, '.', ',') }}</td>
|
||||
<td class="text-right">$ {{ number_format((float)$value->TOTALWH, 2, '.', ',') }}</td>
|
||||
<td class="text-right">$ {{ number_format((float)$value->TOTALWHRESERVED, 2, '.', ',') }}</td>
|
||||
<td class="text-right">$ {{ number_format((float)$value->TOTALWHONPICK, 2, '.', ',') }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr style="text-align:right">
|
||||
<th scope="col" style="text-align:right"></th>
|
||||
<th scope="col" style="text-align:center"></th>
|
||||
<th scope="col" style="text-align:right"></th>
|
||||
<th scope="col" style="text-align:right"></th>
|
||||
<th scope="col" style="text-align:right"></th>
|
||||
<th scope="col" style="text-align:right"></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
$('#datatablesSimple4').DataTable( {
|
||||
responsive: true,
|
||||
"pageLength": 50,
|
||||
"aaSorting": [],
|
||||
"columnDefs": [{ targets: [2, 3, 4, 5], className: 'dt-body-right' }, { targets: [1], className: 'dt-body-center' }],
|
||||
"footerCallback": function ( row, data, start, end, display ) {
|
||||
var api = this.api(), data;
|
||||
|
||||
// converting to interger to find total
|
||||
var intVal = function ( i ) {
|
||||
return typeof i === 'string' ?
|
||||
i.replace(/[\$,]/g, '')*1 :
|
||||
typeof i === 'number' ?
|
||||
i : 0;
|
||||
};
|
||||
|
||||
// computing column Total of the complete result
|
||||
var orderTotal = api
|
||||
.column( 1 )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
}, 0 );
|
||||
|
||||
var totalTotal = api
|
||||
.column( 2 )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
}, 0 ).toFixed(2);
|
||||
|
||||
var whtotal = api
|
||||
.column( 3 )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
}, 0 ).toFixed(2);
|
||||
|
||||
var whtotalReserved = api
|
||||
.column( 4 )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
}, 0 ).toFixed(2);
|
||||
|
||||
var whtotalOnpick = api
|
||||
.column( 5 )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
}, 0 ).toFixed(2);
|
||||
|
||||
|
||||
// Update footer by showing the total with the reference of the column index
|
||||
$( api.column( 0 ).footer() ).html('Total');
|
||||
$( api.column( 1 ).footer() ).html(Intl.NumberFormat('en-US').format(orderTotal));
|
||||
$( api.column( 2 ).footer() ).html('$ '+Intl.NumberFormat('en-US').format(totalTotal));
|
||||
$( api.column( 3 ).footer() ).html('$ '+Intl.NumberFormat('en-US').format(whtotal));
|
||||
$( api.column( 4 ).footer() ).html('$ '+Intl.NumberFormat('en-US').format(whtotalReserved));
|
||||
$( api.column( 5 ).footer() ).html('$ '+Intl.NumberFormat('en-US').format(whtotalOnpick));
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script src="/js/raphael.min.js"></script>
|
||||
@endsection
|
||||
+407
@@ -0,0 +1,407 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Solon Sentinel Portal - ordersOnHoldReq
|
||||
@endsection
|
||||
@section('breadcrumb')
|
||||
<div class="row">
|
||||
<hr class="hr-primary" />
|
||||
<nav class="navbar navbar-expand-lg navbar-light" aria-label="Page navigation">
|
||||
<div class="container-fluid">
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb breadcrumb-custom">
|
||||
<li class="breadcrumb-item"><a href="/" data-abc="true"><i class="fa fa-home"></i> Dashboard</a></li>
|
||||
<li class="breadcrumb-item"><a data-abc="true" href="/ordersOnHoldReq"><i class="fa fa-truck"></i> Orders On Hold</a></li>
|
||||
<li class="breadcrumb-item"><a data-abc="true" href="/ordersOnHoldReq/{{ $request->reason }}">Reason: {{ $request->reason }}</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Order: {{ $request->order }}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
@endsection
|
||||
@section('content')
|
||||
<!-- /.row -->
|
||||
<div class="container-fluid px-4">
|
||||
<h1 class="mt-4">Orders</h1>
|
||||
<div class="card mb-4">
|
||||
<div class="card-header" style="line-height: 34px;">
|
||||
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link active" id="order-tab" data-bs-toggle="tab" href="#order" role="tab" aria-controls="order" aria-selected="true">Order inquiry</a>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link" id="details-tab" data-bs-toggle="tab" href="#details" role="tab" aria-controls="details" aria-selected="false">Details</a>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link" id="comments-tab" data-bs-toggle="tab" href="#comments" role="tab" aria-controls="comments" aria-selected="false">Comments</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="tab-content" id="myTabContent">
|
||||
<div class="tab-pane fade show active" id="order" role="tabpanel" aria-labelledby="order-tab">@include('m3::liberty-theme.partials.tabs.orders')</div>
|
||||
<div class="tab-pane fade" id="details" role="tabpanel" aria-labelledby="details-tab">@include('m3::liberty-theme.partials.tabs.details')</div>
|
||||
<div class="tab-pane fade" id="comments" role="tabpanel" aria-labelledby="comments-tab">@include('m3::liberty-theme.partials.tabs.comments')</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- /.row -->
|
||||
@include('m3::liberty-theme.partials.modals.blank')
|
||||
@include('m3::liberty-theme.partials.modals.shipToEdit')
|
||||
@include('m3::liberty-theme.partials.modals.shipToCheckBox')
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
$(document).on('click', '#DATE', function(e){
|
||||
e.preventDefault();
|
||||
$(this).attr("autocomplete", "off");
|
||||
});
|
||||
|
||||
$(document).on('click', '#AMSPARE5', function(e){
|
||||
e.preventDefault();
|
||||
$(this).attr("autocomplete", "off");
|
||||
});
|
||||
|
||||
$(document).on('click', '.close', function(e){
|
||||
$('.altEditor-modal').modal('hide');
|
||||
});
|
||||
|
||||
$(document).on('click', "button[data-dismiss='modal']", function(e){
|
||||
$('.altEditor-modal').modal('hide');
|
||||
});
|
||||
|
||||
$(document).on('keyup', "#AMCOMM", function(e){
|
||||
var maxlength = "150";
|
||||
var currentLength = $(this).val().length;
|
||||
|
||||
if($("#counter_" + $(this).attr("id")).length == 0) {
|
||||
$(this).after("<div id='"+"counter_" + $(this).attr("id")+"'></div>");
|
||||
}
|
||||
|
||||
if( currentLength >= maxlength ){
|
||||
$("#counter_" + $(this).attr("id")).html(currentLength + ' / ' + maxlength);
|
||||
}else{
|
||||
$("#counter_" + $(this).attr("id")).html(maxlength - currentLength + " chars left");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('.toUpper').on('input', function(evt) {
|
||||
$(this).val(function(_, val) {
|
||||
return val.toUpperCase();
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '#submitShipToEdit', function(){
|
||||
$("#shipToEdit").modal('hide');
|
||||
});
|
||||
$(document).on('click', '.close-modal', function(){
|
||||
$("#shipToEdit").modal('hide');
|
||||
});
|
||||
|
||||
// close and go to checkbox
|
||||
$(document).on('click', '.close-modal2', function(){
|
||||
$("#blank-modal").modal('hide');
|
||||
//$('#shipToCheckBox').modal('show');
|
||||
});
|
||||
// close and goto edit
|
||||
$(document).on('click', '.close-modal3', function(){
|
||||
$("#blank-modal").modal('hide');
|
||||
$('#shipToEdit').modal('show');
|
||||
});
|
||||
|
||||
// Make Bill to and Ship To boxes the same height
|
||||
var s1 = $('#div1').height();
|
||||
var s2 = $('#div2').height();
|
||||
if (s1 > s2){
|
||||
$('#div2').css('height', s1 + "px");
|
||||
}else{
|
||||
$('#div1').css('height', s2 + "px");
|
||||
}
|
||||
|
||||
// Open Modal Ship To Edit
|
||||
$(document).on('click', '#shipToEdit_click', function(){
|
||||
$('#shipToEdit').modal('show');
|
||||
});
|
||||
// Open Modal Ship To CheckBox
|
||||
$(document).on('click', '#shipToCheckBox_click', function(){
|
||||
$('#shipToCheckBox').modal('show');
|
||||
});
|
||||
|
||||
|
||||
// Save Ship To Edit
|
||||
$(document).on('click', '#submitShipToEdit', function(){
|
||||
|
||||
var changes_detected = 0;
|
||||
|
||||
// Retrieve the values we need to pass on
|
||||
var NEW_SHSHA1 = $("input[name=SHSHA1]").val();
|
||||
var NEW_SHSHA2 = $("input[name=SHSHA2]").val();
|
||||
var NEW_SHSHCI = $("input[name=SHSHCI]").val();
|
||||
var NEW_SHSHST = $("input[name=SHSHST]").val();
|
||||
var NEW_SHSHZP = $("input[name=SHSHZP]").val();
|
||||
|
||||
// Retrieve old values
|
||||
var OLD_SHSHA1 = $("#OLD_SHSHA1").text();
|
||||
var OLD_SHSHA2 = $("#OLD_SHSHA2").text();
|
||||
var OLD_SHSHCI = $("#OLD_SHSHCI").text();
|
||||
var OLD_SHSHST = $("#OLD_SHSHST").text();
|
||||
var OLD_SHSHZP = $("#OLD_SHSHZP").text();
|
||||
|
||||
//alert("NEW_SHSHA1: "+NEW_SHSHA1+", NEW_SHSHCI: "+NEW_SHSHCI+", NEW_SHSHST: "+NEW_SHSHST+",NEW_SHSHZP: "+NEW_SHSHZP);
|
||||
if (NEW_SHSHA1=="" || NEW_SHSHCI=="" || NEW_SHSHST=="" || NEW_SHSHZP==""){
|
||||
$('.blank-body').html("There are fields that are blank that must be populated.");
|
||||
$('#blank-submit').addClass('close-modal2');
|
||||
$('#blank-submit').html('Close');
|
||||
$('#blank-close').addClass('close-modal3');
|
||||
$('#blank-close').html('Back');
|
||||
$('#blank-modal').modal('show');
|
||||
}
|
||||
// Compare the new and the old value before submiting
|
||||
if(NEW_SHSHA1!=OLD_SHSHA1){changes_detected = 1;}
|
||||
//alert("NEW_SHSHA1: "+NEW_SHSHA1+", OLD_SHSHA1: "+OLD_SHSHA1+", changes_detected: "+changes_detected);
|
||||
if(NEW_SHSHA2!=OLD_SHSHA2){changes_detected = 1; if(NEW_SHSHA2=="") NEW_SHSHA2=" ";}
|
||||
//alert("NEW_SHSHA2: "+NEW_SHSHA2+", OLD_SHSHA2: "+OLD_SHSHA2+", changes_detected: "+changes_detected);
|
||||
if(NEW_SHSHCI!=OLD_SHSHCI){changes_detected = 1;}
|
||||
if(NEW_SHSHST!=OLD_SHSHST){changes_detected = 1;}
|
||||
if(NEW_SHSHZP!=OLD_SHSHZP){changes_detected = 1;}
|
||||
|
||||
// If we have no changes we let the user know in a blank modal
|
||||
if (changes_detected==0){
|
||||
$('.blank-body').html("No changes has been detected. Click (Back) to make changes.");
|
||||
$('#blank-submit').addClass('close-modal2');
|
||||
$('#blank-submit').html('Close');
|
||||
$('#blank-close').addClass('close-modal3');
|
||||
$('#blank-close').html('Back');
|
||||
$('#blank-modal').modal('show');
|
||||
|
||||
// Send ajax request
|
||||
}else{
|
||||
|
||||
var csrf = document.querySelector('meta[name="csrf-token"]').content;
|
||||
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
url:'/ordersOnHoldReq/{{ $request->reason }}/{{ $request->order }}/saveShipToEdit',
|
||||
data: {
|
||||
'SHSHA1': NEW_SHSHA1,
|
||||
'SHSHA2': NEW_SHSHA2,
|
||||
'SHSHCI': NEW_SHSHCI,
|
||||
'SHSHST': NEW_SHSHST,
|
||||
'SHSHZP': NEW_SHSHZP,
|
||||
'_token': csrf
|
||||
},
|
||||
success:function(data){
|
||||
// If no errors load the next checkbox
|
||||
if (data=="success"){
|
||||
$('#blank-modal').modal('hide');
|
||||
$('#shipToEdit').modal('hide');
|
||||
$('#shipToCheckBox').modal('show');
|
||||
|
||||
// Update the page with out a reload
|
||||
$.get('/ordersOnHoldReq/{{ $request->reason }}/{{ $request->order }}', function(response) {
|
||||
var $page = $(response);
|
||||
$("#shipTo").replaceWith($page.find("#shipTo"));
|
||||
$("#shipToEditData").replaceWith($page.find("#shipToEditData"));
|
||||
|
||||
var s1 = $('#div1').height();
|
||||
var s2 = $('#div2').height();
|
||||
|
||||
if (s1 > s2){
|
||||
$('#div2').css('height', s1 + "px");
|
||||
}else{
|
||||
$('#div1').css('height', s2 + "px");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// If no errors then go to the next modal
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Save Ship To CheckBox
|
||||
|
||||
$(document).on('click', '#submitShipToCheckBox', function(){
|
||||
|
||||
// Retrieve checkbox values
|
||||
var check1 = $('#check1').is(":checked");
|
||||
var check2 = $('#check2').is(":checked");
|
||||
var csrf = document.querySelector('meta[name="csrf-token"]').content;
|
||||
|
||||
// Save with AJAX
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
url:'/ordersOnHoldReq/{{ $request->reason }}/{{ $request->order }}/saveShipToCheckBox',
|
||||
data: {
|
||||
'check1': check1,
|
||||
'check2': check2,
|
||||
'_token': csrf
|
||||
},
|
||||
success:function(data){
|
||||
// If no errors load the next checkbox
|
||||
if (data=="success"){
|
||||
$('#shipToCheckBox').modal('hide');
|
||||
|
||||
$.get('/ordersOnHoldReq/{{ $request->reason }}/{{ $request->order }}', function(response) {
|
||||
|
||||
var $page = $(response);
|
||||
|
||||
$("#shipTo").html($page.find("#shipTo"));
|
||||
$("#orderData").html($page.find("#orderData"));
|
||||
|
||||
var s1 = $('#div1').height();
|
||||
var s2 = $('#div2').height();
|
||||
|
||||
if (s1 > s2){
|
||||
$('#div2').css('height', s1 + "px");
|
||||
}else{
|
||||
$('#div1').css('height', s2 + "px");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// Comment editor / datatable tab
|
||||
var columnDefs = [
|
||||
{
|
||||
data: "AMSPARE7",
|
||||
title: "Id",
|
||||
type: "hidden"
|
||||
},
|
||||
{
|
||||
data: "AMTRANID",
|
||||
title: "User",
|
||||
type: "hidden"
|
||||
},
|
||||
{
|
||||
data: "DATE",
|
||||
title: "Creation Date",
|
||||
type: "hidden"
|
||||
},
|
||||
{
|
||||
data: "AMSPARE5",
|
||||
title: "Reminder Date",
|
||||
datetimepicker: { timepicker: true, format : "Y/m/d H:i", forceParse: false, validateOnBlur: false}
|
||||
},
|
||||
{
|
||||
data: "AMCOMM",
|
||||
title: "Comment",
|
||||
type: "textarea"
|
||||
}
|
||||
];
|
||||
|
||||
var myTable;
|
||||
var csrf = document.querySelector('meta[name="csrf-token"]').content;
|
||||
|
||||
myTable = $('#example').DataTable({
|
||||
"sPaginationType": "full_numbers",
|
||||
ajax: {
|
||||
url : '/ordersOnHoldReq/{{$request->reason}}/{{$request->order}}/jsoncomment',
|
||||
// our data is an array of objects, in the root node instead of /data node, so we need 'dataSrc' parameter
|
||||
dataSrc : ''
|
||||
},
|
||||
columns: columnDefs,
|
||||
dom: 'Bfrtip', // Needs button container
|
||||
select: 'single',
|
||||
responsive: true,
|
||||
altEditor: true, // Enable altEditor
|
||||
buttons: [
|
||||
{
|
||||
text: 'Add',
|
||||
name: 'add', // do not change name
|
||||
className: 'comm'
|
||||
},
|
||||
{
|
||||
extend: 'selected', // Bind to Selected row
|
||||
text: 'Edit',
|
||||
name: 'edit', // do not change name
|
||||
className: 'comm'
|
||||
},
|
||||
{
|
||||
extend: 'selected', // Bind to Selected row
|
||||
text: 'Delete',
|
||||
name: 'delete' // do not change name
|
||||
},
|
||||
{
|
||||
text: 'Refresh',
|
||||
name: 'refresh' // do not change name
|
||||
}
|
||||
],
|
||||
onAddRow: function(datatable, rowdata, success, error) {
|
||||
|
||||
rowdata["_token"] = csrf;
|
||||
|
||||
$.ajax({
|
||||
// a typical url would be / with type='POST'
|
||||
url: '/ordersOnHoldReq/{{$request->reason}}/{{$request->order}}/jsoncommentsave',
|
||||
type: 'POST',
|
||||
data: rowdata,
|
||||
success: function(result) {$('.altEditor-modal').modal('hide'); myTable.ajax.reload();},
|
||||
error: error,
|
||||
});
|
||||
},
|
||||
onDeleteRow: function(datatable, rowdata, success, error) {
|
||||
|
||||
rowdata["_token"] = csrf;
|
||||
|
||||
console.log(rowdata);
|
||||
|
||||
$.ajax({
|
||||
// a typical url would be /{id} with type='DELETE'
|
||||
url: '/ordersOnHoldReq/{{$request->reason}}/{{$request->order}}/jsoncommentsave/'+rowdata.AMSPARE7,
|
||||
type: 'DELETE',
|
||||
data: rowdata,
|
||||
success: function(result) {$('.altEditor-modal').modal('hide'); myTable.ajax.reload();},
|
||||
error: error
|
||||
});
|
||||
},
|
||||
onEditRow: function(datatable, rowdata, success, error) {
|
||||
|
||||
rowdata["_token"] = csrf;
|
||||
|
||||
$.ajax({
|
||||
// a typical url would be /{id} with type='PUT'
|
||||
url: '/ordersOnHoldReq/{{$request->reason}}/{{$request->order}}/jsoncommentsave/'+rowdata.AMSPARE7,
|
||||
type: 'PUT',
|
||||
data: rowdata,
|
||||
success: function(result) {$('.altEditor-modal').modal('hide'); myTable.ajax.reload();},
|
||||
error: error
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', ".comm", function(e){
|
||||
var maxlength = "150";
|
||||
var currentLength = $("#AMCOMM").val().length + 0;
|
||||
$("#AMCOMM").attr('maxlength', maxlength);
|
||||
|
||||
if($("#counter_AMCOMM").length == 0) {
|
||||
$("#AMCOMM").after("<div id='counter_AMCOMM'></div>");
|
||||
|
||||
if( currentLength >= maxlength ){
|
||||
$("#counter_AMCOMM").html(currentLength + ' / ' + maxlength);
|
||||
}else{
|
||||
$("#counter_AMCOMM").html(maxlength - currentLength + " chars left");
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Solon Sentinel Portal - ordersOnHoldReq
|
||||
@endsection
|
||||
@section('breadcrumb')
|
||||
<div class="row">
|
||||
<hr class="hr-primary" />
|
||||
<nav class="navbar navbar-expand-lg navbar-light" aria-label="Page navigation">
|
||||
<div class="container-fluid">
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb breadcrumb-custom">
|
||||
<li class="breadcrumb-item"><a href="/" data-abc="true"><i class="fa fa-home"></i> Dashboard</a></li>
|
||||
<li class="breadcrumb-item"><a data-abc="true" href="/ordersOnHoldReq"><i class="fa fa-truck"></i> Orders On Hold</a></li>
|
||||
<li class="breadcrumb-item active">Reason: {{ $request->reason }}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
@endsection
|
||||
@section('content')
|
||||
<!-- /.row -->
|
||||
<div class="container-fluid px-4">
|
||||
<h1 class="mt-4">Orders on hold</h1>
|
||||
<div class="card mb-4">
|
||||
<div class="card-header" style="line-height: 34px;">
|
||||
<i class="fas fa-table me-1"></i>
|
||||
List of orders
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered table-hover" id="datatablesSimple3">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Order No</th>
|
||||
<th>Status</th>
|
||||
<th>Order Date</th>
|
||||
<th>Comment Date</th>
|
||||
<th>Comment Due Date</th>
|
||||
<th>Sales Rep</th>
|
||||
<th>Carrier</th>
|
||||
<th>Ship Via</th>
|
||||
<th>ShipTo</th>
|
||||
<th>Order Value</th>
|
||||
<th>Reserved Value</th>
|
||||
<th>On Pick Value</th>
|
||||
<th>Currency</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
|
||||
<script>
|
||||
|
||||
$('#datatablesSimple3').DataTable( {
|
||||
'responsive': true,
|
||||
'processing': true,
|
||||
'serverSide': true,
|
||||
'serverMethod': 'post',
|
||||
ajax: {
|
||||
'url': '/ordersOnHoldReq/{{ $request->reason }}/json',
|
||||
'type': 'POST',
|
||||
'headers': {
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||
}
|
||||
},
|
||||
"columnDefs": [
|
||||
{ targets: [9, 10, 11, 12], className: 'text-right' },
|
||||
{ targets: [0, 1, 2, 3, 4, 5], className: 'text-center' }
|
||||
],
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,316 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Solon Sentinel Portal - ERP/TMS Part Data
|
||||
@endsection
|
||||
@section('content')
|
||||
<!-- /.row -->
|
||||
<div class="container-fluid px-4">
|
||||
<h1 class="mt-4">ERP/TMS Part Data</h1>
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
@if($power_user->R428PWRUSR=="Y")
|
||||
<button name="qtyAdd" type="button" class="btn btn-sm btn-info qtyAdd_click" id="qtyAdd_click"
|
||||
data-AT9DPW="{{$power_user->R428CO.$power_user->R428PL.$power_user->R428WH}}">Add Record</button>
|
||||
@endif
|
||||
<!-- data-AT9DPW="$co.$plant.$whs">Add Record</button> -->
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover" id="datatablesSimple5" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th>Div-Plt-Whs</th>
|
||||
<th>Part</th>
|
||||
<th>Pallet Qty</th>
|
||||
<th>Hazardous Material</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($ICM709M as $key=>$val)
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
@if($power_user->R428PWRUSR=="Y")
|
||||
<button name="qtyEdit{{trim($val->AT9PART)}}" type="submit" class="btn btn-sm btn-info qtyEdit_click" id="qtyEdit_click"
|
||||
data-AT9CO="{{$val->AT9CO}}" data-AT9PLT="{{trim($val->AT9PLT)}}" data-AT9WHS="{{trim($val->AT9WHS)}}"
|
||||
data-AT9PART="{{trim($val->AT9PART)}}" data-AT9QTY="{{$val->AT9QTY}}" data-AT9WRN="{{trim($val->AT9WRN)}}"
|
||||
data-AT9DPW="{{$val->AT9CO.$val->AT9PLT.$val->AT9WHS}}"
|
||||
>Edit</button>
|
||||
@endif
|
||||
</td>
|
||||
<td> {{ $val->AT9CO }} {{ $val->AT9PLT }} {{ $val->AT9WHS }} </td>
|
||||
<td> {{ $val->AT9PART }} </td>
|
||||
<td> {{ $val->AT9QTY }} </td>
|
||||
<td> {{ trim($val->AT9WRN) }} </td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<!-- endif-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
<!-- @include('m3::liberty-theme.partials.modals.blank') -->
|
||||
@include('m3::liberty-theme.partials.modals.qtyAdd')
|
||||
@include('m3::liberty-theme.partials.modals.qtyEdit')
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
// DataTable init
|
||||
var myTable = $('#datatablesSimple5').DataTable({
|
||||
"aaSorting": [],
|
||||
"lengthMenu": [ [15,35,50,-1], [15,35,50,"All"] ],
|
||||
"sPaginationType": "full_numbers",
|
||||
"dom": 'Bfrtip', // Needs button container
|
||||
"responsive": true,
|
||||
"orderCellsTop": true,
|
||||
"order": [ [1, 'desc'] ],
|
||||
"pageLength": 15,
|
||||
"columnDefs": [
|
||||
{
|
||||
orderable: true,
|
||||
searchable: true,
|
||||
targets: -1
|
||||
}
|
||||
],
|
||||
|
||||
});
|
||||
|
||||
//
|
||||
// Open Modal Qty Edit
|
||||
//
|
||||
$(document).on('click', '#qtyEdit_click', function() {
|
||||
//console.log($(this));
|
||||
$("#AT9CO").val($(this).data("at9co"));
|
||||
$("#AT9PLT").val($(this).data("at9plt"));
|
||||
$("#AT9WHS").val($(this).data("at9whs"));
|
||||
$("#AT9DPW").val($(this).data("at9dpw"));
|
||||
$("#AT9PART").val($(this).data("at9part"));
|
||||
$("#AT9QTY").val($(this).data("at9qty"));
|
||||
$("#AT9WRN").val($(this).data("at9wrn"));
|
||||
|
||||
$("#OLD_AT9CO").val($(this).data("at9co"));
|
||||
$("#OLD_AT9PLT").val($(this).data("at9plt"));
|
||||
$("#OLD_AT9WHS").val($(this).data("at9whs"));
|
||||
$("#OLD_AT9PART").val($(this).data("at9part"));
|
||||
$("#OLD_AT9QTY").val($(this).data("at9qty"));
|
||||
$("#OLD_AT9WRN").val($(this).data("at9wrn"));
|
||||
|
||||
$("#AT9QTY").focus();
|
||||
$('#qtyEdit').modal('show');
|
||||
});
|
||||
|
||||
//
|
||||
// Open Modal Qty Add
|
||||
//
|
||||
$(document).on('click', '#qtyAdd_click', function() {
|
||||
console.log($(this));
|
||||
//$("#addAT9DPW").val("");
|
||||
$("#addAT9QTY").val(1);
|
||||
// $("#AT9DPW").val($(this).data("at9dpw"));
|
||||
$("#addAT9QTY").focus();
|
||||
$('#qtyAdd').modal('show');
|
||||
});
|
||||
|
||||
|
||||
// Clear values on Edit form when Close is clicked
|
||||
$(document).on('click', '#closeEdit', function() {
|
||||
document.getElementById("frmEdit").reset();
|
||||
});
|
||||
|
||||
// Clear values on Add form when Close is clicked
|
||||
$(document).on('click', '#closeAdd', function() {
|
||||
document.getElementById("frmAdd").reset();
|
||||
});
|
||||
|
||||
//
|
||||
// Save Qty Edit
|
||||
//
|
||||
$(document).on('click', '#submitQtyEdit', function() {
|
||||
|
||||
var changes_detected = 0;
|
||||
|
||||
// Retrieve the values we need to pass on
|
||||
//var NEW_AT9CO = $("#AT9CO").val();
|
||||
//var NEW_AT9PLT = $("#AT9PLT").val();
|
||||
//var NEW_AT9WHS = $("#AT9WHS").val();
|
||||
var NEW_AT9CO = $("#AT9DPW").val().substring(0,3);
|
||||
var NEW_AT9PLT = $("#AT9DPW").val().substring(3,6);
|
||||
var NEW_AT9WHS = $("#AT9DPW").val().substring(6,9);
|
||||
var NEW_AT9PART = $("#AT9PART").val();
|
||||
var NEW_AT9QTY = $("#AT9QTY").val();
|
||||
var NEW_AT9WRN = $("#AT9WRN").val();
|
||||
|
||||
// Retrieve old values
|
||||
var OLD_AT9CO = $("#OLD_AT9CO").val();
|
||||
var OLD_AT9PLT = $("#OLD_AT9PLT").val();
|
||||
var OLD_AT9WHS = $("#OLD_AT9WHS").val();
|
||||
var OLD_AT9DPW = $("#OLD_AT9DPW").val();
|
||||
var OLD_AT9PART = $("#OLD_AT9PART").val();
|
||||
var OLD_AT9QTY = $("#OLD_AT9QTY").val();
|
||||
var OLD_AT9WRN = $("#OLD_AT9WRN").val();
|
||||
|
||||
// test fields that are not supposed to be blank/empty
|
||||
if (NEW_AT9QTY.trim()=="") {
|
||||
$('#qtyEdit').modal('show');
|
||||
$('#AT9QTY').focus();
|
||||
alert("There are fields that are blank that must be populated.");
|
||||
} else {
|
||||
// Compare the new and the old value before submitting
|
||||
if(NEW_AT9QTY!=OLD_AT9QTY) {
|
||||
changes_detected = 1;
|
||||
}
|
||||
if(NEW_AT9WRN!=OLD_AT9WRN) {
|
||||
changes_detected = 1;
|
||||
}
|
||||
// If we have no changes we let the user know in a blank modal
|
||||
//alert(changes_detected);
|
||||
if (changes_detected==0) {
|
||||
$('#qtyEdit').modal('show');
|
||||
alert("No changes have been detected. Please try again");
|
||||
|
||||
// Send ajax request
|
||||
} else {
|
||||
|
||||
var csrf = document.querySelector('meta[name="csrf-token"]').content;
|
||||
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
url:'/palletQty/saveQtyEdit',
|
||||
data: {
|
||||
'AT9CO': NEW_AT9CO,
|
||||
'AT9PLT': NEW_AT9PLT,
|
||||
'AT9WHS': NEW_AT9WHS,
|
||||
'AT9PART': NEW_AT9PART,
|
||||
'AT9QTY': NEW_AT9QTY,
|
||||
'AT9WRN': NEW_AT9WRN,
|
||||
'_token': csrf
|
||||
},
|
||||
success:function(data) {
|
||||
if (data=="success") {
|
||||
//$('#blank-modal').modal('hide');
|
||||
$('#qtyEdit').modal('hide');
|
||||
// alert("should reload here");
|
||||
location.reload();
|
||||
} else {
|
||||
$("#AT9CO").val(NEW_AT9CO);
|
||||
$("#AT9PLT").val(NEW_AT9PLT);
|
||||
$("#AT9WHS").val(NEW_AT9WHS);
|
||||
$("#AT9DPW").val(NEW_AT9DPWH);
|
||||
$("#AT9PART").val(NEW_AT9PART);
|
||||
$("#AT9QTY").val(NEW_AT9QTY);
|
||||
$("#AT9WRN").val(NEW_AT9WRN);
|
||||
$("#OLD_AT9CO").val(OLD_AT9CO);
|
||||
$("#OLD_AT9PLT").val(OLD_AT9PLT);
|
||||
$("#OLD_AT9WHS").val(OLD_AT9WHS);
|
||||
$("#OLD_AT9PART").val(OLD_AT9PART);
|
||||
$("#OLD_AT9QTY").val(OLD_AT9QTY);
|
||||
$("#OLD_AT9WRN").val(OLD_AT9WRN);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//
|
||||
// Save Qty Add
|
||||
//
|
||||
$(document).on('click', '#submitQtyAdd', function() {
|
||||
|
||||
// Retrieve the values we need to pass on
|
||||
//if($("#addAT9DPW").val()!=null) {
|
||||
var NEW_AT9CO = ($("#addAT9DPW").val()).substring(0,3);
|
||||
var NEW_AT9PLT = ($("#addAT9DPW").val()).substring(3,6);
|
||||
var NEW_AT9WHS = ($("#addAT9DPW").val()).substring(6,9);
|
||||
var NEW_AT9DPW = $("#addAT9DPW").val();
|
||||
//}
|
||||
|
||||
//var NEW_AT9CO = $("input[name=addAT9CO]").val();
|
||||
//var NEW_AT9PLT = $("input[name=addAT9PLT]").val();
|
||||
//var NEW_AT9WHS = $("input[name=addAT9WHS]").val();
|
||||
//var NEW_AT9DPW = $("input[name=addAT9DPW]").val();
|
||||
var NEW_AT9PART = $("input[name=addAT9PART]").val();
|
||||
var NEW_AT9QTY = $("input[name=addAT9QTY]").val();
|
||||
var NEW_AT9WRN = $("input[name=addAT9WRN]").val();
|
||||
|
||||
var csrf = document.querySelector('meta[name="csrf-token"]').content;
|
||||
var form_post = {
|
||||
'AT9CO': NEW_AT9CO,
|
||||
'AT9PLT': NEW_AT9PLT,
|
||||
'AT9WHS': NEW_AT9WHS,
|
||||
'AT9PART': NEW_AT9PART,
|
||||
'AT9QTY': NEW_AT9QTY,
|
||||
'AT9WRN': NEW_AT9WRN,
|
||||
'_token': csrf
|
||||
};
|
||||
|
||||
if (NEW_AT9PART.trim()=="" || NEW_AT9QTY.trim()=="") {
|
||||
$('#qtyAdd').modal('show');
|
||||
if (NEW_AT9QTY=="") {
|
||||
$('#AT9QTY').focus();
|
||||
}
|
||||
alert("There are fields that are blank that must be populated.");
|
||||
|
||||
} else {
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
url:'/palletQty/saveQtyAdd',
|
||||
data: form_post,
|
||||
success:function(data) {
|
||||
if (data=="success") {
|
||||
$('#qtyAdd').modal('hide');
|
||||
location.reload();
|
||||
} else {
|
||||
$("#addAT9CO").val(NEW_AT9CO);
|
||||
$("#addAT9PLT").val(NEW_AT9PLT);
|
||||
$("#addAT9WHS").val(NEW_AT9WHS);
|
||||
$("#addAT9DPW").val(NEW_AT9DPW);
|
||||
$("#addAT9PART").val(NEW_AT9PART);
|
||||
$("#addAT9QTY").val(NEW_AT9QTY);
|
||||
$("#addAT9WRN").val(NEW_AT9WRN);
|
||||
|
||||
if (data=="exists") {
|
||||
$("#addAT9PART").val("");
|
||||
alert("Record already exists in this file.");
|
||||
$('#qtyAdd').modal('show');
|
||||
}
|
||||
if (data=="not exist") {
|
||||
if (confirm("Part number "+NEW_AT9PART+" does not yet exist in Sentinel. Are you sure it exists in the ERP system?")) {
|
||||
//console.log(form_post);
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
url:'/palletQty/saveQtyAdd2',
|
||||
data: form_post,
|
||||
success:function(data) {
|
||||
if (data=="success") {
|
||||
$('#qtyAdd').modal('hide');
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//});
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,292 @@
|
||||
<!-- #732 -->
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Solon Sentinel Portal - Trucks pending closure with M3
|
||||
@endsection
|
||||
@section('content')
|
||||
<!-- /.row -->
|
||||
<div class="container-fluid px-4">
|
||||
<h1 class="mt-4">Trucks pending closure with M3</h1>
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-table me-1"></i>
|
||||
The trucks will be closed automatically at 6pm daily. But you can initiate the close earlier by clicking on the manifest number
|
||||
@if($ICM699M[0]->COUNT1>0)
|
||||
<b><p style="background-color:tomato;">There are <a href="./M3ErrorsDisplay?showerrors=Y&skipdates=Y&shsource=CloseShipmentCoChargeAPI">
|
||||
{{$ICM699M[0]->COUNT1}}</a> closing delivery order errors pending review</p></b>
|
||||
@endif
|
||||
@if(count($unprocessedArr)>0)
|
||||
@php $unprocessedMan = implode(', ', $unprocessedArr); @endphp
|
||||
<b><p style="background-color:tomato;">Manifests: {!! $unprocessedMan !!} have some orders that still have a header picking status of B, and may not have closed in M3. Please investigate</b>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered table-hover" id="datatablesSimple5">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>Manifest</th>
|
||||
<th>Status</th>
|
||||
<th>Dock door</th>
|
||||
<th>Carrier</th>
|
||||
<th>Truck ID</th>
|
||||
<th>Type</th>
|
||||
<th>User open</th>
|
||||
<th>Date open</th>
|
||||
<th>Time open</th>
|
||||
<th>TMS<br>User close</th>
|
||||
<th>TMS<br>Date close</th>
|
||||
<th>TMS<br>Time close</th>
|
||||
<th>Sentinel<br>User close</th>
|
||||
<th>Sentinel<br>Date close</th>
|
||||
<th>Sentinel<br>Time close</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($ICM705M1 as $key=>$val)
|
||||
@php
|
||||
$closeinRed = false;
|
||||
$APLDCLOD = trim($val->APLDCLOD)!="0" ? date('Y-m-d', strtotime($val->APLDCLOD)) : "";
|
||||
$APLDCLOT = trim($val->APLDCLOT)!="0"?(strlen($val->APLDCLOT)==6?date('H:i:s', strtotime($val->APLDCLOT)):date('H:i:s', strtotime('0'.$val->APLDCLOT))):"";
|
||||
# Get current time as a timestamp
|
||||
$currentTime = time();
|
||||
$APLDCLOZ = trim($val->APLDCLOZ)!="0" ? strtotime($val->APLDCLOZ) : "";
|
||||
# Calculate the difference in minutes
|
||||
if ($APLDCLOZ!='') {
|
||||
$minutesDiff = round(abs($currentTime - $APLDCLOZ) / 60);
|
||||
$closeinRed = $minutesDiff <15 ? true : false;
|
||||
}
|
||||
$closeInRedClass = $closeinRed ? ' class=text-danger ' : '' ;
|
||||
|
||||
# Get In process Manifests with delay > 3 hours
|
||||
$ManifestDelayed = false;
|
||||
if ($val->APSPARE2=="P") {
|
||||
$SHDT = isset($ICM699Ma[$val->APMANIFEST]['SHDT']) ? $ICM699Ma[$val->APMANIFEST]['SHDT'] : '';
|
||||
$SHTIME = isset($ICM699Ma[$val->APMANIFEST]['SHTIME']) ? $ICM699Ma[$val->APMANIFEST]['SHTIME'] : '';
|
||||
// dump($val->APMANIFEST."-".$SHDT."-".$SHTIME);
|
||||
if ($SHDT!='' && $SHTIME!='') {
|
||||
$specifiedDateTime = new \DateTime($SHDT . " " . $SHTIME);
|
||||
$currentDateTime = new \DateTime();
|
||||
# Calculate total hours
|
||||
$totalHours = $specifiedDateTime->diff($currentDateTime)->days * 24 + $specifiedDateTime->diff($currentDateTime)->h;
|
||||
// dump("Total Hours: " . $totalHours);
|
||||
if ($totalHours > 3) {
|
||||
$ManifestDelayed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
{{-- Link to Manifest Orders --}}
|
||||
@if( $val->APMANIFEST!="0" )
|
||||
<a class="btn btn-link" target="_blank" href="{{ url('MFOrders', ['id' => trim($val->APMANIFEST)]) }}">
|
||||
{{ trim($val->APMANIFEST)!="0"?$val->APMANIFEST:"" }}
|
||||
</a>
|
||||
@endif
|
||||
{{-- Close Button --}}
|
||||
@if( ($val->APMANIFEST!="0" && $val->APSPARE2!="P" && trim($val->APLDCLOD)!="") && !$closeinRed)
|
||||
<button class="btn btn-sm btn-warning" id="submitManifest" data-shuser="{{trim($user)}}" data-manifest="{{trim($val->APMANIFEST)}}" data-apco="{{trim($val->APCO)}}" data-apwhs="{{trim($val->APWHS)}}">
|
||||
Close
|
||||
</button>
|
||||
@elseif($val->APSPARE2=="P")
|
||||
{{ trim($val->APMANIFEST)!="0" ?$val->APMANIFEST : "" }}
|
||||
@endif
|
||||
</td>
|
||||
{{-- MAK Show Retry Message instead of Contact MPBA --}}
|
||||
<td> {!! $val->APSPARE2=="P" && !$ManifestDelayed ? "In Process" :
|
||||
( $val->APSPARE2=="P" && $ManifestDelayed ?
|
||||
'<button class="btn btn-sm btn-danger" id="allowRetry"
|
||||
data-shuser="' . trim($user) . '"
|
||||
data-manifest="' . trim($val->APMANIFEST) . '"
|
||||
data-apco="' . trim($val->APCO) . '"
|
||||
data-apwhs="' . trim($val->APWHS) . '">
|
||||
Failed – please reset
|
||||
</button>'
|
||||
: '')
|
||||
!!}
|
||||
</td>
|
||||
<td> {{ $val->APDOCKDOOR }} </td>
|
||||
<td> {{ $val->APCARRIER }} </td>
|
||||
<td> {{ $val->APTRUCKIDT }} </td>
|
||||
<td> {{ $val->APSPARE1 }} </td>
|
||||
<td> {{ $val->APLDSTRU }} </td>
|
||||
<td> {{ date('Y-m-d', strtotime($val->APLDSTRD)) }} </td>
|
||||
<td> {{ strlen($val->APLDSTRT)==6 ? date('H:i:s', strtotime($val->APLDSTRT)):date('H:i:s', strtotime('0'.$val->APLDSTRT)) }} </td>
|
||||
<td> {{ isset($ICM698Ma[$val->APMANIFEST])?$ICM698Ma[$val->APMANIFEST]['TMSUSER']:"" }} </td>
|
||||
<td> {{ trim($ICM698Ma[$val->APMANIFEST]['TMSDATE'])!=""?date('Y-m-d', strtotime($ICM698Ma[$val->APMANIFEST]['TMSDATE'])):"" }} </td>
|
||||
<td> {{ trim($ICM698Ma[$val->APMANIFEST]['TMSTIME'])!=""?(strlen($ICM698Ma[$val->APMANIFEST]['TMSTIME'])==6?date('H:i:s', strtotime($ICM698Ma[$val->APMANIFEST]['TMSTIME'])):date('H:i:s', strtotime('0'.$ICM698Ma[$val->APMANIFEST]['TMSTIME']))):"" }} </td>
|
||||
<td> {{ $val->APLDCLOU }} </td>
|
||||
<td> {{ $APLDCLOD }} </td>
|
||||
<td {{ $closeInRedClass }}> {{ $APLDCLOT }} </td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<form id="manifestForm" class="row row-cols-lg-auto g-3 align-items-center">
|
||||
<div class="col-12">
|
||||
<label class="visually-hidden" for="inlineFormInputGroupManifest #">Manifest #</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-text">View closed manifest</div>
|
||||
<label for="MFInput" class="visually-hidden">Manifest #</label>
|
||||
<input type="text" class="form-control" id="MFInput" placeholder="Manifest #">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<button type="button" id="viewMF" class="btn btn-primary" >Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
// DataTable init
|
||||
$('#datatablesSimple5').DataTable({
|
||||
"aaSorting": [],
|
||||
"lengthMenu": [ [100,200,500,-1], [100,200,500,"All"] ],
|
||||
"sPaginationType": "full_numbers",
|
||||
dom: "<'row mt-2'<'col-sm-12 col-md-2'l><'col-sm-12 col-md-6'B><'col-sm-12 col-md-3'f>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row mt-2'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||
"responsive": true,
|
||||
"orderCellsTop": true,
|
||||
"order": [ [2, 'asc'] ],
|
||||
pageLength: 25,
|
||||
"lengthMenu": [ [10,25,50,100,500], [10,25,50,100,500] ],
|
||||
"columnDefs": [
|
||||
{
|
||||
orderable: true,
|
||||
searchable: true,
|
||||
targets: -1
|
||||
}
|
||||
],
|
||||
});
|
||||
|
||||
|
||||
// Submit Manifet
|
||||
$(document).on('click','#submitManifest', function () {
|
||||
if (confirm("Do you want to close this manifest in M3 immediately?")) {
|
||||
SHUSER = $(this).data('shuser');
|
||||
MANIFEST = $(this).data('manifest');
|
||||
APCO = $(this).data('apco');
|
||||
APWHS = $(this).data('apwhs');
|
||||
|
||||
var form_post2 = {
|
||||
SHUSER : SHUSER,
|
||||
MANIFEST :MANIFEST,
|
||||
APCO :APCO,
|
||||
APWHS :APWHS,
|
||||
_token : '{{ csrf_token() }}'
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: "{{ route('m3.M3ManifestCloseAPI') }}",
|
||||
type: "POST",
|
||||
data: form_post2,
|
||||
async:true,
|
||||
success: function(response) {
|
||||
},
|
||||
error: function(error) {
|
||||
// console.log(error);
|
||||
// alert(error);
|
||||
}
|
||||
});
|
||||
|
||||
Swal.fire({
|
||||
title: "Manifest Submitted for Closing",
|
||||
text: "",
|
||||
icon: "success",
|
||||
confirmButtonColor: "#3085d6"
|
||||
});
|
||||
// alert("Manifest Submitted for Closing");
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
}, 3000);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Allow Retry
|
||||
$(document).on('click','#allowRetry', function () {
|
||||
if (confirm("Do you want to allow manifest Closing?")) {
|
||||
SHUSER = $(this).data('shuser');
|
||||
MANIFEST = $(this).data('manifest');
|
||||
APCO = $(this).data('apco');
|
||||
APWHS = $(this).data('apwhs');
|
||||
|
||||
var form_post2 = {
|
||||
SHUSER : SHUSER,
|
||||
MANIFEST :MANIFEST,
|
||||
APCO :APCO,
|
||||
APWHS :APWHS,
|
||||
_token : '{{ csrf_token() }}'
|
||||
};
|
||||
// console.log(form_post2); return false;
|
||||
|
||||
$.ajax({
|
||||
url: "{{ route('m3.allowRetry') }}",
|
||||
type: "POST",
|
||||
data: form_post2,
|
||||
async:true,
|
||||
success: function(response) {
|
||||
},
|
||||
error: function(error) {
|
||||
// console.log(error);
|
||||
// alert(error);
|
||||
}
|
||||
});
|
||||
|
||||
// alert("Manifest Can now Submitted for retry");
|
||||
Swal.fire({
|
||||
title: "Manifest Can now Submitted for retry",
|
||||
text: "",
|
||||
icon: "success",
|
||||
confirmButtonColor: "#3085d6"
|
||||
});
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
}, 3000);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$('#viewMF').on('click', function () {
|
||||
var MFInput = $('#MFInput').val().trim();
|
||||
if (MFInput!='') {
|
||||
var url = "{{ url('MFOrders')}}"+"/"+MFInput;
|
||||
// window.location.href = url;
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
else{
|
||||
alert("Manifest # is empty.");
|
||||
}
|
||||
});
|
||||
|
||||
$("#manifestForm").on('submit', function(e) {
|
||||
e.preventDefault();
|
||||
$('#viewMF').trigger('click');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,101 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Add: Distribution whs addresses
|
||||
@endsection
|
||||
@section('content')
|
||||
<!-- /.row -->
|
||||
<div class="container-fluid px-4">
|
||||
<h3 class="mt-2">Add: Distribution whs addresses</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
{{-- <div class="card-header">
|
||||
<h4>Add Ship-to Address</h4>
|
||||
</div> --}}
|
||||
<div class="card-body">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form method="POST" action="{{ route('m3.ship-to.store') }}">
|
||||
@csrf
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-a5f61985b0">Customer Number</label>
|
||||
<input type="text" class="form-control" name="AUSTCN" value="{{ old('AUSTCN') }}"
|
||||
maxlength="11" id="sonar-input-a5f61985b0">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-20156147e6">Company Name •</label>
|
||||
<input type="text" class="form-control" name="AUSHSHNM" value="{{ old('AUSHSHNM') }}"
|
||||
required maxlength="36" id="sonar-input-20156147e6">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-709c1e07ef">Address 1 •</label>
|
||||
<input type="text" class="form-control" name="AUSHSHA1" value="{{ old('AUSHSHA1') }}"
|
||||
required maxlength="36" id="sonar-input-709c1e07ef">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-e3787f959d">Address 2 •</label>
|
||||
<input type="text" class="form-control" name="AUSHSHA2" value="{{ old('AUSHSHA2') }}"
|
||||
required maxlength="36" id="sonar-input-e3787f959d">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-5bbfb65f3b">Address 3</label>
|
||||
<input type="text" class="form-control" name="AUSHSHA3" value="{{ old('AUSHSHA3') }}"
|
||||
maxlength="36" id="sonar-input-5bbfb65f3b">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-e7a28e585b">Address 4</label>
|
||||
<input type="text" class="form-control" name="AUSHSHA4" value="{{ old('AUSHSHA4') }}"
|
||||
maxlength="36" id="sonar-input-e7a28e585b">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-0620339934">City •</label>
|
||||
<input type="text" class="form-control" name="AUSHSHCI" value="{{ old('AUSHSHCI') }}"
|
||||
required maxlength="20" id="sonar-input-0620339934">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sonar-select-a5f61985b0">State •</label>
|
||||
<select class="form-select" name="AUSHSHST" required id="sonar-select-a5f61985b0">
|
||||
<option value="">Select a state</option>
|
||||
@foreach ($states as $code => $name)
|
||||
<option value="{{ $code }}"
|
||||
{{ old('AUSHSHST') == $code ? 'selected' : '' }}>
|
||||
{{ $name }} ({{ $code }})
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-2ed60d69e4">Zip Code •</label>
|
||||
<input type="text" class="form-control" name="AUSHSHZP" value="{{ old('AUSHSHZP') }}"
|
||||
required maxlength="10" id="sonar-input-2ed60d69e4">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-d95b035dcf">Country Code •</label>
|
||||
<input type="text" class="form-control" name="AUSHSHCT" value="{{ old('AUSHSHCT') }}"
|
||||
required maxlength="3" id="sonar-input-d95b035dcf">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-3912060202">Warehouse •</label>
|
||||
<input type="text" class="form-control" name="AUSHWHS" value="{{ old('AUSHWHS') }}"
|
||||
required maxlength="3" id="sonar-input-3912060202">
|
||||
</div>
|
||||
<div class="form-group mt-3 mb-2">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
<a href="{{ route('m3.ship-to.index') }}" class="btn btn-secondary">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,100 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Edit Distribution whs addresses
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="container-fluid px-4">
|
||||
<h3 class="mt-2">Edit Distribution whs addresses</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
{{-- <div class="card-header">
|
||||
<h4>Edit Ship-to Address</h4>
|
||||
</div> --}}
|
||||
<div class="card-body">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form method="POST" action="{{ url('/ship-to/'. trim($shipTo->AUSHSHZP) . '/' . trim($shipTo->AUSHWHS)) }}">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-9efe270e0a">Customer Number</label>
|
||||
<input type="text" class="form-control" name="AUSTCN"
|
||||
value="{{ trim($shipTo->AUSTCN) }}" id="sonar-input-9efe270e0a">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-7c20b39e9b">Company Name •</label>
|
||||
<input type="text" class="form-control" name="AUSHSHNM"
|
||||
value="{{ old('AUSHSHNM', trim($shipTo->AUSHSHNM)) }}" required maxlength="36" id="sonar-input-7c20b39e9b">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-2f1f7536fe">Address 1 •</label>
|
||||
<input type="text" class="form-control" name="AUSHSHA1"
|
||||
value="{{ old('AUSHSHA1', trim($shipTo->AUSHSHA1)) }}" required maxlength="36" id="sonar-input-2f1f7536fe">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-1709fb5d67">Address 2 •</label>
|
||||
<input type="text" class="form-control" name="AUSHSHA2"
|
||||
value="{{ old('AUSHSHA2', trim($shipTo->AUSHSHA2)) }}" required maxlength="36" id="sonar-input-1709fb5d67">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-fb35089be3">Address 3</label>
|
||||
<input type="text" class="form-control" name="AUSHSHA3"
|
||||
value="{{ old('AUSHSHA3', trim($shipTo->AUSHSHA3)) }}" maxlength="36" id="sonar-input-fb35089be3">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-5452b56d11">Address 4</label>
|
||||
<input type="text" class="form-control" name="AUSHSHA4"
|
||||
value="{{ old('AUSHSHA4', trim($shipTo->AUSHSHA4)) }}" maxlength="36" id="sonar-input-5452b56d11">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-a1059c7901">City •</label>
|
||||
<input type="text" class="form-control" name="AUSHSHCI"
|
||||
value="{{ old('AUSHSHCI', trim($shipTo->AUSHSHCI)) }}" required maxlength="20" id="sonar-input-a1059c7901">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sonar-select-9efe270e0a">State •</label>
|
||||
<select class="form-select" name="AUSHSHST" required id="sonar-select-9efe270e0a">
|
||||
<option value="">Select a state</option>
|
||||
@foreach ($states as $code => $name)
|
||||
<option value="{{ $code }}"
|
||||
{{ old('AUSHSHST', $shipTo->AUSHSHST) == $code ? 'selected' : '' }}>
|
||||
{{ $name }} ({{ $code }})
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-07cebce94f">Zip Code</label>
|
||||
<input type="text" class="form-control" value="{{ trim($shipTo->AUSHSHZP) }}" readonly id="sonar-select-9efe270e0a">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-8b496b4c51">Country Code •</label>
|
||||
<input type="text" class="form-control" name="AUSHSHCT"
|
||||
value="{{ old('AUSHSHCT', trim($shipTo->AUSHSHCT)) }}" required maxlength="3" id="sonar-input-8b496b4c51">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-2b51446d4a">Warehouse</label>
|
||||
<input type="text" class="form-control" value="{{ $shipTo->AUSHWHS }}" readonly id="sonar-input-2b51446d4a">
|
||||
</div>
|
||||
|
||||
<div class="form-group mt-3 mb-2">
|
||||
<button type="submit" class="btn btn-primary">Update</button>
|
||||
<a href="{{ route('m3.ship-to.index') }}" class="btn btn-secondary">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,107 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Distribution whs addresses
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="container-fluid mt-6 pt-6 px-4">
|
||||
<h3 class="mt-4">Distribution whs addresses</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
{{-- <h4 class="float-left">Ship-to Addresses</h4> --}}
|
||||
<a href="{{ route('m3.ship-to.create') }}" class="btn btn-primary float-right">Add New</a>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
<div class="container-fluid table-responsive">
|
||||
|
||||
<table class="table table-bordered data-table" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Customer Number</th>
|
||||
<th>Company Name</th>
|
||||
<th>Address</th>
|
||||
<th>City</th>
|
||||
<th>State</th>
|
||||
<th>Zip</th>
|
||||
<th>Country</th>
|
||||
<th>Warehouse</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var table = $('.data-table').DataTable({
|
||||
processing: true,
|
||||
responsive: true,
|
||||
serverSide: true,
|
||||
ajax: "{{ route('m3.ship-to.index') }}",
|
||||
columns: [{
|
||||
data: 'checkbox',
|
||||
name: 'checkbox',
|
||||
orderable: false,
|
||||
searchable: false
|
||||
},
|
||||
{
|
||||
data: 'AUSTCN',
|
||||
name: 'AUSTCN'
|
||||
},
|
||||
{
|
||||
data: 'AUSHSHNM',
|
||||
name: 'AUSHSHNM'
|
||||
},
|
||||
{
|
||||
data: 'AUSHSHA1',
|
||||
name: 'AUSHSHA1'
|
||||
},
|
||||
{
|
||||
data: 'AUSHSHCI',
|
||||
name: 'AUSHSHCI'
|
||||
},
|
||||
{
|
||||
data: 'AUSHSHST',
|
||||
name: 'AUSHSHST'
|
||||
},
|
||||
{
|
||||
data: 'AUSHSHZP',
|
||||
name: 'AUSHSHZP'
|
||||
},
|
||||
{
|
||||
data: 'AUSHSHCT',
|
||||
name: 'AUSHSHCT'
|
||||
},
|
||||
{
|
||||
data: 'AUSHWHS',
|
||||
name: 'AUSHWHS'
|
||||
},
|
||||
{
|
||||
data: 'action',
|
||||
name: 'action',
|
||||
orderable: false,
|
||||
searchable: false
|
||||
}
|
||||
]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
File diff suppressed because it is too large
Load Diff
+241
@@ -0,0 +1,241 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Solon Sentinel Portal - Daily User Efficiency
|
||||
@endsection
|
||||
@section('content')
|
||||
<!-- /.row -->
|
||||
<div class="container-fluid px-4">
|
||||
<h1 class="mt-4">Daily User Efficiency</h1>
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-header" style="line-height: 34px;">
|
||||
<i class="fas fa-table me-1"></i>
|
||||
Filters
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<form>
|
||||
@csrf
|
||||
<div class="row mb-3">
|
||||
<label for="inputEmail" class="col-sm-2 col-form-label">Date</label>
|
||||
<div class="col-sm-10">
|
||||
<label for="text" class="visually-hidden">dates</label>
|
||||
<input value="{{ $starting }}" id="text" name="dates" type="text" aria-describedby="textHelpBlock" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="inputUser" class="col-sm-2 col-form-label">User</label>
|
||||
<div class="col-sm-10">
|
||||
<select aria-label="User" name="user" class="form-select">
|
||||
<option value="" selected> </option>
|
||||
@foreach($user_array as $key=>$val)
|
||||
<option value={{$val['userprf']}}
|
||||
@if($val['userprf']==$user) selected @endif
|
||||
>{{$val['name']}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-xs-offset-2 col-xs-10">
|
||||
<button name="submit" type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-table me-1"></i>
|
||||
User Picking Stats
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered table-hover" id="datatablesSimple5">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>Code</th>
|
||||
<th>Mon</th>
|
||||
<th>Date</th>
|
||||
<th>Hour</th>
|
||||
<th>Pick ended at</th>
|
||||
<th style="text-align:right">Weight </th>
|
||||
<th style="text-align:right">Units Picked</th>
|
||||
<th style="text-align:right">Part</th>
|
||||
<th style="text-align:left">Order-Rl-Sh#</th>
|
||||
<th style="text-align:left">Cust Name</th>
|
||||
<th style="text-align:right">Time (in mins)</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if($no_data=="Y")
|
||||
<tr> <td colspan=12 style="text-align:center; background-color:yellow"> <b>No data retrieved for this user</b> <td> <tr>
|
||||
@else
|
||||
@foreach($statistic4 as $key=>$val)
|
||||
<tr>
|
||||
<td></td>
|
||||
<td> {{ $val->CODE }} </td>
|
||||
<td> {{ $val->A5SENTVIEW }} </td>
|
||||
<td> {{ $val->DT }} </td>
|
||||
<td> {{ $val->HOUR }} </td>
|
||||
<td> {{ str_replace(' ','______',$val->A5PICKCMTS) }} </td>
|
||||
<td style="text-align:right"> {{ number_format($val->WEIGHT,2) }} </td>
|
||||
<a href="http://{{$_SERVER['HTTP_HOST']}}/php/AllSentPkr.php?order={{$val->A5ONO}}&release={{$val->A5RLNO}}&shipment={{$val->A5SHNO}}">
|
||||
{{ $val->A5ONO }}-{{ $val->A5RLNO }}-{{ $val->A5SHNO }}
|
||||
</a>
|
||||
</td>
|
||||
<td style="text-align:left"> {{ $val->A4SHSHNM }} </td>
|
||||
<td style="text-align:right"> {{ number_format($val->TIMEDIFF/60,1) }} </td>
|
||||
<td style="background-color: {{ $val->COLOUR }}"> </td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td style="text-align:right" colspan="5"> Total </td>
|
||||
<td style="text-align:right"> {{ (isset($totals_array['entries']) ? $totals_array['entries'] : "") }} </td>
|
||||
<td style="text-align:right"> {{number_format($totals_array['weight'],2)}} </td>
|
||||
<td style="text-align:right"> {{number_format($totals_array['picked'],0)}} </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align:right"> {{number_format($totals_array['timediff']/60,1)}} </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-table me-1"></i>
|
||||
User Picking Stats Summary
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered table-hover" id="datatablesSimple3">
|
||||
<tr>
|
||||
<th>Monitor</th>
|
||||
<th>Total</th>
|
||||
@foreach($monitor_array as $key)
|
||||
@if($key['header']!="0")
|
||||
<th> {{$key['header']}} </th>
|
||||
@endif
|
||||
@endforeach
|
||||
</tr>
|
||||
<tr>
|
||||
<td> Picked Weight </td>
|
||||
<td> {{number_format($totals_array['weight'],0)}} </td>
|
||||
@foreach($monitor_array as $key)
|
||||
@if($key['header']!="0")
|
||||
<td> {{number_format($key['weight'],0) }} </td>
|
||||
@endif
|
||||
@endforeach
|
||||
</tr>
|
||||
<tr>
|
||||
<td> Picked Lines </td>
|
||||
<td> {{number_format($totals_array['entries'],0)}} </td>
|
||||
@foreach($monitor_array as $key)
|
||||
@if($key['header']!="0")
|
||||
<td> {{number_format($key['lines'],0)}} </td>
|
||||
@endif
|
||||
@endforeach
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total in hours (based on Greg time entry)</td>
|
||||
<td>{{(isset($perf_array['tot_hours'])?number_format($perf_array['tot_hours'],1):"")}}</td>
|
||||
@foreach($monitor_array as $key)
|
||||
@if($key['header']!="0")
|
||||
<td> {{number_format($key['tot_hours'],1) }} </td>
|
||||
@endif
|
||||
@endforeach
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Percent per activity</td>
|
||||
<td>100%</td>
|
||||
@foreach($monitor_array as $key)
|
||||
@if($key['header']!="0")
|
||||
<td> {{number_format($key['percent_per_activity']*100,0)}}% </td>
|
||||
@endif
|
||||
@endforeach
|
||||
</tr>
|
||||
<tr>
|
||||
<td>LPH contribution per activity </td>
|
||||
<td>{{(isset($monitor_array[0]['lph_blended_per_activity'])?number_format($monitor_array[0]['lph_blended_per_activity'],1):"")}}</td>
|
||||
@foreach($monitor_array as $key)
|
||||
@if($key['header']!="0")
|
||||
<td> {{number_format($key['lph_blended_per_activity'],1)}} </td>
|
||||
@endif
|
||||
@endforeach
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-table me-1"></i>
|
||||
User Picking Stats Performance Summary
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered table-hover" id="datatablesSimple4">
|
||||
<tr>
|
||||
<td>Total in hours (based on Greg time entry)</td>
|
||||
<td>{{(isset($perf_array['tot_hours'])?number_format($perf_array['tot_hours'],1):"")}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Per hour actual</td>
|
||||
<td>{{(isset($perf_array['per_hour_actual'])?number_format($perf_array['per_hour_actual'],1):"")}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Blended target for the day</td>
|
||||
<td>{{(isset($monitor_array[0]['lph_blended_per_activity'])?number_format($monitor_array[0]['lph_blended_per_activity'],1):"")}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Performance</td>
|
||||
<td>{{(isset($perf_array['performance_activity'])?number_format($perf_array['performance_activity']*100,0):"")}}%</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
// DataTable init
|
||||
$('#datatablesSimple5').DataTable({
|
||||
"aaSorting": [],
|
||||
"lengthMenu": [ [10,25,50,-1], [10,25,50,"All"] ]
|
||||
});
|
||||
|
||||
// Date range init
|
||||
$('input[name="dates"]').daterangepicker({
|
||||
singleDatePicker: true,
|
||||
showDropdowns: true,
|
||||
minYear: 2001,
|
||||
maxYear: parseInt(moment().format('YYYY'),10),
|
||||
locale: {
|
||||
format: 'YYYY-MM-DD',
|
||||
},
|
||||
startDate: '{{ $starting }}',
|
||||
alwaysShowCalendars: true
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
+245
@@ -0,0 +1,245 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Solon Sentinel Portal - userPickingStats v4
|
||||
@endsection
|
||||
@section('content')
|
||||
<!-- /.row -->
|
||||
<div class="container-fluid px-4">
|
||||
<h1 class="mt-4">User Activity Stats V4</h1>
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-header" style="line-height: 34px;">
|
||||
<i class="fas fa-table me-1"></i>
|
||||
Filters
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
|
||||
<form>
|
||||
@csrf
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="inputEmail" class="col-sm-2 col-form-label">Date</label>
|
||||
<div class="col-sm-10">
|
||||
<label for="text" class="visually-hidden">dates</label>
|
||||
<input value="{{ $starting }}" id="text" name="dates" type="text" aria-describedby="textHelpBlock" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="inputUser" class="col-sm-2 col-form-label">User</label>
|
||||
<div class="col-sm-10">
|
||||
<select aria-label="User" name="user" class="form-control">
|
||||
<option value="" selected> </option>
|
||||
@foreach($user_array as $key=>$val)
|
||||
<option value={{$val['userprf']}}
|
||||
@if($val['userprf']==$user) selected @endif
|
||||
>{{$val['name']}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-xs-offset-2 col-xs-10">
|
||||
<button name="submit" type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-table me-1"></i>
|
||||
User Picking Stats
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered table-hover" id="datatablesSimple5">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Mon</th>
|
||||
<th>Date</th>
|
||||
<th>Hour</th>
|
||||
<th>Pick ended at</th>
|
||||
<th style="text-align:right">Weight </th>
|
||||
<th style="text-align:right">Units Picked</th>
|
||||
<th style="text-align:right">Part</th>
|
||||
<th style="text-align:left">Order-Rl-Sh#</th>
|
||||
<th style="text-align:left">Cust Name</th>
|
||||
<th style="text-align:right">Time (in mins)</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if($no_data=="Y")
|
||||
<tr> <td colspan=10 style="text-align:center; background-color:yellow"> <b>No data retrieved for this user</b> <td> <tr>
|
||||
@else
|
||||
@foreach($statistic4 as $key=>$val)
|
||||
<tr>
|
||||
<td> {{ $val->CODE }} </td>
|
||||
<td> {{ $val->DT }} </td>
|
||||
<td> {{ $val->HOUR }} </td>
|
||||
<td> {{ str_replace(' ','______',$val->A5PICKCMTS) }} </td>
|
||||
<td style="text-align:right"> {{ number_format($val->WEIGHT,2) }} </td>
|
||||
<td style="text-align:right"> {{ number_format($val->A5PICKED,0) }} </td>
|
||||
<td style="text-align:right"> {{ $val->A5PART }} </td>
|
||||
<td style="text-align:left">
|
||||
<a href="http://{{$_SERVER['SERVER_ADDR']}}:{{ (stristr($_SERVER['DOCUMENT_ROOT'],'liv')?$request->ports['live']:$request->ports['test'])}}/php/AllSentPkr.php?order={{$val->A5ONO}}&release={{$val->A5RLNO}}&shipment={{$val->A5SHNO}}">
|
||||
{{ $val->A5ONO }}-{{ $val->A5RLNO }}-{{ $val->A5SHNO }}
|
||||
</a>
|
||||
</td>
|
||||
<td style="text-align:left"> {{ $val->A4SHSHNM }} </td>
|
||||
<td style="text-align:right"> {{ number_format($val->TIMEDIFF/60,1) }} </td>
|
||||
<td style="background-color: {{ $val->COLOUR }}"> </td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align:right"> Total </td>
|
||||
<td style="text-align:right"> {{ (isset($totals_array['entries']) ? $totals_array['entries'] : "") }} </td>
|
||||
<td style="text-align:right"> {{number_format($totals_array['weight'],2)}} </td>
|
||||
<td style="text-align:right"> {{number_format($totals_array['picked'],0)}} </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align:right"> {{number_format($totals_array['timediff']/60,1)}} </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-table me-1"></i>
|
||||
User Picking Stats Summary
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered table-hover" id="datatablesSimple3">
|
||||
<tr>
|
||||
<th>Monitor</th>
|
||||
<th>Total</th>
|
||||
@foreach($monitor_array as $key)
|
||||
@if($key['header']!="0")
|
||||
<th> {{$key['header']}} </th>
|
||||
@endif
|
||||
@endforeach
|
||||
</tr>
|
||||
<tr>
|
||||
<td> Picked Weight </td>
|
||||
<td> {{number_format($totals_array['weight'],0)}} </td>
|
||||
@foreach($monitor_array as $key)
|
||||
@if($key['header']!="0")
|
||||
<td> {{number_format($key['weight'],0) }} </td>
|
||||
@endif
|
||||
@endforeach
|
||||
</tr>
|
||||
<tr>
|
||||
<td> Picked Lines </td>
|
||||
<td> {{number_format($totals_array['entries'],0)}} </td>
|
||||
@foreach($monitor_array as $key)
|
||||
@if($key['header']!="0")
|
||||
<td> {{number_format($key['lines'],0)}} </td>
|
||||
@endif
|
||||
@endforeach
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total in hours (based on Greg time entry)</td>
|
||||
<td>{{(isset($perf_array['tot_hours'])?number_format($perf_array['tot_hours'],1):"")}}</td>
|
||||
@foreach($monitor_array as $key)
|
||||
@if($key['header']!="0")
|
||||
<td> {{number_format($key['tot_hours'],1) }} </td>
|
||||
@endif
|
||||
@endforeach
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Percent per activity</td>
|
||||
<td>100%</td>
|
||||
@foreach($monitor_array as $key)
|
||||
@if($key['header']!="0")
|
||||
<td> {{number_format($key['percent_per_activity']*100,0)}}% </td>
|
||||
@endif
|
||||
@endforeach
|
||||
</tr>
|
||||
<tr>
|
||||
<td>LPH contribution per activity </td>
|
||||
<td>{{(isset($monitor_array[0]['lph_blended_per_activity'])?number_format($monitor_array[0]['lph_blended_per_activity'],1):"")}}</td>
|
||||
@foreach($monitor_array as $key)
|
||||
@if($key['header']!="0")
|
||||
<td> {{number_format($key['lph_blended_per_activity'],1)}} </td>
|
||||
@endif
|
||||
@endforeach
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-table me-1"></i>
|
||||
User Picking Stats Performance Summary
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered table-hover" id="datatablesSimple4">
|
||||
<tr>
|
||||
<td>Total in hours (based on Greg time entry)</td>
|
||||
<td>{{(isset($perf_array['tot_hours'])?number_format($perf_array['tot_hours'],1):"")}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Per hour actual</td>
|
||||
<td>{{(isset($perf_array['per_hour_actual'])?number_format($perf_array['per_hour_actual'],1):"")}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Blended target for the day</td>
|
||||
<td>{{(isset($monitor_array[0]['lph_blended_per_activity'])?number_format($monitor_array[0]['lph_blended_per_activity'],1):"")}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Performance</td>
|
||||
<td>{{(isset($perf_array['performance_activity'])?number_format($perf_array['performance_activity']*100,0):"")}}%</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
// DataTable init
|
||||
$('#datatablesSimple5').DataTable({
|
||||
"aaSorting": [],
|
||||
"lengthMenu": [ [10,25,50,-1], [10,25,50,"All"] ]
|
||||
});
|
||||
|
||||
// Date range init
|
||||
$('input[name="dates"]').daterangepicker({
|
||||
singleDatePicker: true,
|
||||
showDropdowns: true,
|
||||
minYear: 2001,
|
||||
maxYear: parseInt(moment().format('YYYY'),10),
|
||||
locale: {
|
||||
format: 'YYYY-MM-DD',
|
||||
},
|
||||
startDate: '{{ $starting }}',
|
||||
alwaysShowCalendars: true
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
+196
@@ -0,0 +1,196 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Solon Sentinel Portal - Graph User Efficiency
|
||||
@endsection
|
||||
@section('content')
|
||||
<!-- /.row -->
|
||||
<div class="container-fluid px-4">
|
||||
<h1 class="mt-4">Graph User Efficiency</h1>
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-header" style="line-height: 34px;">
|
||||
<i class="fas fa-table me-1"></i>
|
||||
Filters
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<form>
|
||||
@csrf
|
||||
<div class="row mb-3">
|
||||
<label for="inputEmail" class="col-sm-2 col-form-label">Date Range</label>
|
||||
<div class="col-sm-10">
|
||||
<label for="text" class="visually-hidden">dates</label>
|
||||
<input value="{{ $starting }} - {{ $ending }}" id="text" name="dates" type="text" aria-describedby="textHelpBlock" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="inputUser" class="col-sm-2 col-form-label">User</label>
|
||||
<div class="col-sm-10">
|
||||
<select aria-label="User" name="user" class="form-select">
|
||||
@foreach($user_array as $key=>$val)
|
||||
<option value={{$val['userprf']}}
|
||||
@if($val['userprf']==$user) selected @endif
|
||||
>{{$val['name']}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-xs-offset-2 col-xs-10">
|
||||
<button name="submit" type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl-6">
|
||||
<div class="card mb-12">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-chart-bar me-1"></i>
|
||||
Picking Performance
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<figure class="highcharts-figure">
|
||||
<div id="container"></div>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row card mt-4 mb-4">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-table me-1"></i>
|
||||
User Picking Stats
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered table-hover" id="datatablesSimple3">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Day</th>
|
||||
<th>Performance</th>
|
||||
<th>Blended Target LPH</th>
|
||||
<th>Actual LPH</th>
|
||||
<th>Gross Hours</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($statistic5 as $key=>$val)
|
||||
<tr>
|
||||
<td style="text-align:right"> {{ (isset($val['day']) ? $val['day'] : "") }} </td>
|
||||
<td style="text-align:right"> {{ (isset($val['performance']) ? $val['performance'] : "") }} </td>
|
||||
<td style="text-align:right"> {{ (isset($val['blendedTargetLPH']) ? $val['blendedTargetLPH'] : "") }} </td>
|
||||
<td style="text-align:right"> {{ (isset($val['actualLPH']) ? $val['actualLPH'] : "") }} </td>
|
||||
<td style="text-align:right"> {{ (isset($val['grossHours']) ? $val['grossHours'] : "") }} </td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td style="text-align:right"> Total </td>
|
||||
<td style="text-align:right"> {{ (isset($totals_array['performance']) ? number_format($totals_array['performance'],1) : "") }}% </td>
|
||||
<td style="text-align:right"> </td>
|
||||
<td style="text-align:right"> </td>
|
||||
<td style="text-align:right"> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script>
|
||||
|
||||
var performance = new Array();
|
||||
var days = new Array();
|
||||
const months = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
|
||||
|
||||
var x=0;
|
||||
@foreach ($statistic5 as $key=>$value)
|
||||
//if(typeof {{$value['performance']}}!==null) {
|
||||
if({{$value['performance']}}!=0) {
|
||||
performance[x] = {{$value['performance']}};
|
||||
var in_date = "{{$statistic5[$key]['day']}}";
|
||||
var dt = in_date.split("-");
|
||||
days[x] = dt[2]+'<br>'+months[dt[1]-1];
|
||||
x=x+1;
|
||||
}
|
||||
//}
|
||||
@endforeach
|
||||
|
||||
var user_name;
|
||||
@foreach($user_array as $key=>$val)
|
||||
if("{{$val['userprf']}}"=="{{$user}}") {
|
||||
user_name="{{$val['name']}}";
|
||||
}
|
||||
@endforeach
|
||||
|
||||
Highcharts.chart('container', {
|
||||
|
||||
title: {
|
||||
text: user_name+' Picking Performance'
|
||||
},
|
||||
|
||||
subtitle: {
|
||||
text: "{{$starting}} to {{$ending}}"
|
||||
},
|
||||
|
||||
yAxis: {
|
||||
title: {
|
||||
text: 'Percent of Target Lines per Hour'
|
||||
}
|
||||
},
|
||||
|
||||
xAxis: {
|
||||
categories: days
|
||||
},
|
||||
|
||||
legend: {
|
||||
layout: 'vertical',
|
||||
align: 'right',
|
||||
verticalAlign: 'middle'
|
||||
},
|
||||
|
||||
series: [{
|
||||
data: performance,
|
||||
showInLegend: false,
|
||||
}],
|
||||
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
// Date range init
|
||||
$('input[name="dates"]').daterangepicker({
|
||||
locale: {
|
||||
format: 'YYYY-MM-DD',
|
||||
},
|
||||
startDate: '{{ $starting }}',
|
||||
endDate: '{{ $ending }}',
|
||||
alwaysShowCalendars: true,
|
||||
ranges: {
|
||||
'Today': [moment(), moment()],
|
||||
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
|
||||
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
|
||||
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
|
||||
'This Month': [moment().startOf('month'), moment().endOf('month')],
|
||||
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')],
|
||||
'This Year': [moment().startOf('year'), moment()]
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,95 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Change Warehouse
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="container-fluid px-4">
|
||||
<h3 class="mt-2">Change Warehouse</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body">
|
||||
@if(session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(session('error'))
|
||||
<div class="alert alert-danger">
|
||||
{{ session('error') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form method="POST" action="{{ route('m3.userprofileupdate') }}">
|
||||
@csrf
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-06ac09682b">User profile</label>
|
||||
<input type="text" class="form-control" name="R428US" value="{{ trim($ICM428M->R428US) }}" readonly id="sonar-input-06ac09682b">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-95fa12106e">First Name</label>
|
||||
<input type="text" class="form-control" value="{{ trim($ICM428M->R428FIRST) }}" readonly id="sonar-input-95fa12106e">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sonar-input-a6f8891ebe">Family Name</label>
|
||||
<input type="text" class="form-control" value="{{ trim($ICM428M->R428FAMILY) }}" readonly id="sonar-input-a6f8891ebe">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sonar-select-06ac09682b">Div-Plt-Whs</label>
|
||||
<select class="form-select" name="R428DPW" required id="sonar-select-06ac09682b">
|
||||
<option value="" disabled hidden>Select</option>
|
||||
@foreach ($IC670M as $key => $IC670MR)
|
||||
@php
|
||||
$selected = $ICM428M->R428CO == $IC670MR->WDCO && $ICM428M->R428WH == $IC670MR->WDWHS && $ICM428M->R428PL == $IC670MR->WDPL ?
|
||||
'selected' : '';
|
||||
@endphp
|
||||
<option value="{{ trim($IC670MR->WDCO).trim($IC670MR->WDPL).trim($IC670MR->WDWHS) }}" {{ $selected }}>
|
||||
{{ trim(Str::upper($IC670MR->WDWNAM)) }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<input type="hidden" name="referrer" id="referrer" value="">
|
||||
<div class="form-group mt-3 mb-2">
|
||||
<button type="submit" class="btn btn-primary">Update</button>
|
||||
<button type="button" class="btn btn-primary" onclick="goBack()">Back</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
let referrer = document.referrer;
|
||||
let currentPage = window.location.href.split('?')[0];
|
||||
// Check if referrer is not the same as the current page
|
||||
if (referrer && !referrer.startsWith(currentPage)) {
|
||||
document.getElementById("referrer").value = referrer;
|
||||
}
|
||||
});
|
||||
|
||||
function goBack() {
|
||||
let referrer = document.getElementById("referrer").value;
|
||||
if (referrer) {
|
||||
window.location.href = referrer;
|
||||
} else {
|
||||
// window.history.back();
|
||||
window.history.go(-2);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,342 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Solon Sentinel Portal - Warehouse Performance Metrics
|
||||
@endsection
|
||||
@section('content')
|
||||
<h1 class="mt-4">Warehouse Performance Metrics</h1>
|
||||
|
||||
<table class="table table-striped table-bordered table-hover table-sm" id="datatablesSimple1" style="width:100%">
|
||||
<th scope="col"ead style="position: sticky; top: 56px; z-index: 1000; background-color: #F8F9FA; border: 2px solid black;">
|
||||
<tr class="border-bottom: 1px solid black;">
|
||||
<th scope="col" style="width:80px">For month</th>
|
||||
<th scope="col" style="width:70px">{{ date('Y-m',strtotime($date_in)) }}</th>
|
||||
<th scope="col" class="text-center" style="background-color:lightgrey" colspan=14>Non-interco and Ground/Air</th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col" class="text-center" style="background-color:lightgrey" colspan=2>Intercompany & Ocean</th>
|
||||
</tr>
|
||||
<tr class="border-bottom: 1px solid black;">
|
||||
<th scope="col" style="width:80px"></th>
|
||||
<th scope="col" style="width:70px"></th>
|
||||
<th scope="col" class="text-center" colspan=4>All</th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col" class="text-center" colspan=4>LTL</th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col" class="text-center" colspan=4>Parcel</th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col" colspan=2></th>
|
||||
</tr>
|
||||
<tr class="border-bottom: 1px solid black;">
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col" class="text-center" style="width:50px">A1+C1</th>
|
||||
<th scope="col" class="text-center" style="width:50px">B</th>
|
||||
<th scope="col" class="text-center" style="width:50px">A3+C2</th>
|
||||
<th scope="col" class="text-center" style="width:20px"></th>
|
||||
<th scope="col" style="width:10px"></th>
|
||||
<th scope="col" class="text-center" style="width:50px">A1+C1</th>
|
||||
<th scope="col" class="text-center" style="width:50px">B</th>
|
||||
<th scope="col" class="text-center" style="width:50px">A3+C2</th>
|
||||
<th scope="col" class="text-center" style="width:20px"></th>
|
||||
<th scope="col" style="width:10px"></th>
|
||||
<th scope="col" class="text-center" style="width:50px">A1+C1</th>
|
||||
<th scope="col" class="text-center" style="width:50px">B</th>
|
||||
<th scope="col" class="text-center" style="width:50px">A3+C2</th>
|
||||
<th scope="col" class="text-center" style="width:20px"></th>
|
||||
<th scope="col" style="width:10px"></th>
|
||||
<th scope="col" class="text-center" style="width:50px">A1+C1</th>
|
||||
<th scope="col" class="text-center" style="width:50px">A3+C2</th>
|
||||
</tr>
|
||||
<tr class="border-bottom: 1px solid black;">
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col" class="text-center" style="width:50px">Closed</th>
|
||||
<th scope="col" class="text-center" style="width:50px">Closed (Cherry)</th>
|
||||
<th scope="col" class="text-center" style="width:50px">Still Open</th>
|
||||
<th scope="col" class="text-center" style="width:20px">OTTC</th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col" class="text-center" style="width:50px">Closed</th>
|
||||
<th scope="col" class="text-center" style="width:50px">Closed (Cherry)</th>
|
||||
<th scope="col" class="text-center" style="width:50px">Still Open</th>
|
||||
<th scope="col" class="text-center" style="width:20px">OTTC</th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col" class="text-center" style="width:50px">Closed</th>
|
||||
<th scope="col" class="text-center" style="width:50px">Closed (Cherry)</th>
|
||||
<th scope="col" class="text-center" style="width:50px">Still Open</th>
|
||||
<th scope="col" class="text-center" style="width:20px">OTTC</th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col" class="text-center" style="width:50px">Closed</th>
|
||||
<th scope="col" class="text-center" style="width:50px">Still Open</th>
|
||||
</tr>
|
||||
<tr class="border-bottom: 1px solid black;">
|
||||
<th scope="col" style="background-color:grey" colspan=19></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">Targets</th>
|
||||
<th scope="col">Deliv Notes</th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col" class="text-right" style="width:20px"><label for="sonar-input-270366714a" class="visually-hidden">sonar input 270366714a</label>
|
||||
<input type=text name=ALLtgtnotes maxlength=3 size=2 readonly value={{ $pct_array['all_notes'] }} id="sonar-input-270366714a"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col" class="text-right" style="width:20px"><label for="sonar-input-8d3c22d334" class="visually-hidden">sonar input 8d3c22d334</label>
|
||||
<input type=text name=LTLtgtnotes maxlength=3 size=2 readonly value={{ $pct_array['ltl_notes'] }} id="sonar-input-8d3c22d334"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col" class="text-right" style="width:20px"><label for="sonar-input-ea8cafd287" class="visually-hidden">sonar input ea8cafd287</label>
|
||||
<input type=text name=PARCELtgtnotes maxlength=3 size=2 readonly value={{ $pct_array['parcel_notes'] }} id="sonar-input-ea8cafd287"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col"></th>
|
||||
<th scope="col">Dollars</th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col" class="text-right" style="width:20px"><label for="sonar-input-8b6c7add91" class="visually-hidden">sonar input 8b6c7add91</label>
|
||||
<input type=text name=ALLtgtdlr maxlength=3 size=2 readonly value={{ $pct_array['all_dollars'] }} id="sonar-input-8b6c7add91"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col" class="text-right" style="width:20px"><label for="sonar-input-fcd53e4974" class="visually-hidden">sonar input fcd53e4974</label>
|
||||
<input type=text name=LTLtgtdlr maxlength=3 size=2 readonly value={{ $pct_array['ltl_dollars'] }} id="sonar-input-fcd53e4974"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col" class="text-right" style="width:20px"><label for="sonar-input-379ed77e4a" class="visually-hidden">sonar input 379ed77e4a</label>
|
||||
<input type=text name=PARCELtgtdlr maxlength=3 size=2 readonly value={{ $pct_array['parcel_dollars'] }} id="sonar-input-379ed77e4a"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
<tr class="border-bottom: 1px solid black;">
|
||||
<th scope="col"></th>
|
||||
<th scope="col">Weight</th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col" class="text-right" style="width:20px"><label for="sonar-input-ada5156033" class="visually-hidden">sonar input ada5156033</label>
|
||||
<input type=text name=ALLtgtwgt maxlength=3 size=2 readonly value={{ $pct_array['all_weight'] }} id="sonar-input-ada5156033"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col" class="text-right" style="width:20px"><label for="sonar-input-aefaf4ca2b" class="visually-hidden">sonar input aefaf4ca2b</label>
|
||||
<input type=text name=LTLtgtwgt maxlength=3 size=2 readonly value={{ $pct_array['ltl_weight'] }} id="sonar-input-aefaf4ca2b"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col" class="text-right" style="width:20px"><label for="sonar-input-2da53b6d4f" class="visually-hidden">sonar input 2da53b6d4f</label>
|
||||
<input type=text name=PARCELtgtwgt maxlength=3 size=2 readonly value={{ $pct_array['parcel_weight'] }} id="sonar-input-2da53b6d4f"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
<tr class="border-bottom: 1px solid black;">
|
||||
<th scope="col" style="background-color:grey" colspan=19></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody style="border: 1px solid black;">
|
||||
@foreach($ICM711M as $key=>$val)
|
||||
<tr>
|
||||
<td>{{ date('Y-m-d',strtotime($val->AVDATE)) }}</td>
|
||||
<td class="text-left">Deliv Notes</td>
|
||||
<td class="text-right">{{$val->AVANOTESCL}}</td>
|
||||
<td class="text-right">{{$val->AVANOTESCH}}</td>
|
||||
<td class="text-right">{{$val->AVANOTESOP}}</td>
|
||||
<td class="text-right" style="width:50px">
|
||||
@if (number_format(($val->AVANOTESCL+$val->AVANOTESCH)/($val->AVANOTESCL+$val->AVANOTESCH+$val->AVANOTESOP)*100,0)<$pct_array['all_notes'])
|
||||
<span style="color:red">
|
||||
@endif
|
||||
@if (number_format(($val->AVANOTESCL+$val->AVANOTESCH)/($val->AVANOTESCL+$val->AVANOTESCH+$val->AVANOTESOP)*100,0)>=$pct_array['all_notes'])
|
||||
<span style="color:green">
|
||||
@endif
|
||||
{{ (($val->AVANOTESCL+$val->AVANOTESCH+$val->AVANOTESOP)!='0'?number_format(($val->AVANOTESCL+$val->AVANOTESCH)/($val->AVANOTESCL+$val->AVANOTESCH+$val->AVANOTESOP)*100,0):'0') }}%
|
||||
</span>
|
||||
</td>
|
||||
<td></td>
|
||||
<td class="text-right">{{$val->AVLNOTESCL}}</td>
|
||||
<td class="text-right">{{$val->AVLNOTESCH}}</td>
|
||||
<td class="text-right">{{$val->AVLNOTESOP}}</td>
|
||||
<td class="text-right" style="width:20px">
|
||||
@if (number_format(($val->AVLNOTESCL+$val->AVLNOTESCH)/($val->AVLNOTESCL+$val->AVLNOTESCH+$val->AVLNOTESOP)*100,0)<$pct_array['ltl_notes'])
|
||||
<span style="color:red">
|
||||
@endif
|
||||
@if (number_format(($val->AVLNOTESCL+$val->AVLNOTESCH)/($val->AVLNOTESCL+$val->AVLNOTESCH+$val->AVLNOTESOP)*100,0)>=$pct_array['ltl_notes'])
|
||||
<span style="color:green">
|
||||
@endif
|
||||
{{ (($val->AVLNOTESCL+$val->AVLNOTESCH+$val->AVLNOTESOP)!='0'?number_format(($val->AVLNOTESCL+$val->AVLNOTESCH)/($val->AVLNOTESCL+$val->AVLNOTESCH+$val->AVLNOTESOP)*100,0):'0') }}%
|
||||
</span>
|
||||
</td>
|
||||
<td></td>
|
||||
<td class="text-right">{{$val->AVPNOTESCL}}</td>
|
||||
<td class="text-right">{{$val->AVPNOTESCH}}</td>
|
||||
<td class="text-right">{{$val->AVPNOTESOP}}</td>
|
||||
<td class="text-right" style="width:20px">
|
||||
@if (number_format(($val->AVPNOTESCL+$val->AVPNOTESCH)/($val->AVPNOTESCL+$val->AVPNOTESCH+$val->AVPNOTESOP)*100,0)<$pct_array['parcel_notes'])
|
||||
<span style="color:red">
|
||||
@endif
|
||||
@if (number_format(($val->AVPNOTESCL+$val->AVPNOTESCH)/($val->AVPNOTESCL+$val->AVPNOTESCH+$val->AVPNOTESOP)*100,0)>=$pct_array['parcel_notes'])
|
||||
<span style="color:green">
|
||||
@endif
|
||||
{{ (($val->AVPNOTESCL+$val->AVPNOTESCH+$val->AVPNOTESOP)!='0'?number_format(($val->AVPNOTESCL+$val->AVPNOTESCH)/($val->AVPNOTESCL+$val->AVPNOTESCH+$val->AVPNOTESOP)*100,0):'0') }}%
|
||||
</span>
|
||||
</td>
|
||||
<td></td>
|
||||
<td class="text-right">{{$val->AVINOTESCL}}</td>
|
||||
<td class="text-right">{{$val->AVINOTESOP}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="text-left">Dollars</td>
|
||||
<td class="text-right">${{number_format($val->AVADLRCL,0)}}</td>
|
||||
<td class="text-right">${{number_format($val->AVADLRCH,0)}}</td>
|
||||
<td class="text-right">${{number_format($val->AVADLROP,0)}}</td>
|
||||
<td class="text-right" style="width:20px">
|
||||
@if (number_format(($val->AVADLRCL+$val->AVADLRCH)/($val->AVADLRCL+$val->AVADLRCH+$val->AVADLROP)*100,0)<$pct_array['all_dollars'])
|
||||
<span style="color:red">
|
||||
@endif
|
||||
@if (number_format(($val->AVADLRCL+$val->AVADLRCH)/($val->AVADLRCL+$val->AVADLRCH+$val->AVADLROP)*100,0)>=$pct_array['all_dollars'])
|
||||
<span style="color:green">
|
||||
@endif
|
||||
{{ (($val->AVADLRCL+$val->AVADLRCH+$val->AVADLROP)!='0'?number_format(($val->AVADLRCL+$val->AVADLRCH)/($val->AVADLRCL+$val->AVADLRCH+$val->AVADLROP)*100,0):'0') }}%
|
||||
</span>
|
||||
</td>
|
||||
<td></td>
|
||||
<td class="text-right">${{number_format($val->AVLDLRCL,0)}}</td>
|
||||
<td class="text-right">${{number_format($val->AVLDLRCH,0)}}</td>
|
||||
<td class="text-right">${{number_format($val->AVLDLROP,0)}}</td>
|
||||
<td class="text-right" style="width:20px">
|
||||
@if (number_format(($val->AVLDLRCL+$val->AVLDLRCH)/($val->AVLDLRCL+$val->AVLDLRCH+$val->AVLDLROP)*100,0)<$pct_array['ltl_dollars'])
|
||||
<span style="color:red">
|
||||
@endif
|
||||
@if (number_format(($val->AVLDLRCL+$val->AVLDLRCH)/($val->AVLDLRCL+$val->AVLDLRCH+$val->AVLDLROP)*100,0)>=$pct_array['ltl_dollars'])
|
||||
<span style="color:green">
|
||||
@endif
|
||||
{{ (($val->AVLDLRCL+$val->AVLDLRCH+$val->AVLDLROP)!='0'?number_format(($val->AVLDLRCL+$val->AVLDLRCH)/($val->AVLDLRCL+$val->AVLDLRCH+$val->AVLDLROP)*100,0):'0') }}%
|
||||
</span>
|
||||
</td>
|
||||
<td></td>
|
||||
<td class="text-right">${{number_format($val->AVPDLRCL,0)}}</td>
|
||||
<td class="text-right">${{number_format($val->AVPDLRCH,0)}}</td>
|
||||
<td class="text-right">${{number_format($val->AVPDLROP,0)}}</td>
|
||||
<td class="text-right" style="width:20px">
|
||||
@if (number_format(($val->AVPDLRCL+$val->AVPDLRCH)/($val->AVPDLRCL+$val->AVPDLRCH+$val->AVPDLROP)*100,0)<$pct_array['parcel_dollars'])
|
||||
<span style="color:red">
|
||||
@endif
|
||||
@if (number_format(($val->AVPDLRCL+$val->AVPDLRCH)/($val->AVPDLRCL+$val->AVPDLRCH+$val->AVPDLROP)*100,0)>=$pct_array['parcel_dollars'])
|
||||
<span style="color:green">
|
||||
@endif
|
||||
{{ (($val->AVPDLRCL+$val->AVPDLRCH+$val->AVPDLROP)!='0'?number_format(($val->AVPDLRCL+$val->AVPDLRCH)/($val->AVPDLRCL+$val->AVPDLRCH+$val->AVPDLROP)*100,0):'0') }}%
|
||||
</span>
|
||||
</td>
|
||||
<td></td>
|
||||
<td class="text-right">${{number_format($val->AVIDLRCL,0)}}</td>
|
||||
<td class="text-right">${{number_format($val->AVIDLROP,0)}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="text-left">Weight</td>
|
||||
<td class="text-right">{{number_format($val->AVAWGTCL,0)}}</td>
|
||||
<td class="text-right">{{number_format($val->AVAWGTCH,0)}}</td>
|
||||
<td class="text-right"><a href="./whsePerfDetails?for=a&date={{ date('Y-m-d',strtotime($val->AVDATE)) }}">{{number_format($val->AVAWGTOP,0)}}</a></td>
|
||||
<td class="text-right" style="width:20px">
|
||||
@if (number_format(($val->AVAWGTCL+$val->AVAWGTCH)/($val->AVAWGTCL+$val->AVAWGTCH+$val->AVAWGTOP)*100,0)<$pct_array['all_weight'])
|
||||
<span style="color:red">
|
||||
@endif
|
||||
@if (number_format(($val->AVAWGTCL+$val->AVAWGTCH)/($val->AVAWGTCL+$val->AVAWGTCH+$val->AVAWGTOP)*100,0)>=$pct_array['all_weight'])
|
||||
<span style="color:green">
|
||||
@endif
|
||||
{{ (($val->AVAWGTCL+$val->AVAWGTCH+$val->AVAWGTOP)!='0'?number_format(($val->AVAWGTCL+$val->AVAWGTCH)/($val->AVAWGTCL+$val->AVAWGTCH+$val->AVAWGTOP)*100,0):'0') }}%
|
||||
</span>
|
||||
</td>
|
||||
<td></td>
|
||||
<td class="text-right">{{number_format($val->AVLWGTCL,0)}}</td>
|
||||
<td class="text-right">{{number_format($val->AVLWGTCH,0)}}</td>
|
||||
<td class="text-right"><a href="./whsePerfDetails?for=l&date={{ date('Y-m-d',strtotime($val->AVDATE)) }}">{{number_format($val->AVLWGTOP,0)}}</a></td>
|
||||
<td class="text-right" style="width:20px">
|
||||
@if (number_format(($val->AVLWGTCL+$val->AVLWGTCH)/($val->AVLWGTCL+$val->AVLWGTCH+$val->AVLWGTOP)*100,0)<$pct_array['ltl_weight'])
|
||||
<span style="color:red">
|
||||
@endif
|
||||
@if (number_format(($val->AVLWGTCL+$val->AVLWGTCH)/($val->AVLWGTCL+$val->AVLWGTCH+$val->AVLWGTOP)*100,0)>=$pct_array['ltl_weight'])
|
||||
<span style="color:green">
|
||||
@endif
|
||||
{{ (($val->AVLWGTCL+$val->AVLWGTCH+$val->AVLWGTOP)!='0'?number_format(($val->AVLWGTCL+$val->AVLWGTCH)/($val->AVLWGTCL+$val->AVLWGTCH+$val->AVLWGTOP)*100,0):'0') }}%
|
||||
</span>
|
||||
</td>
|
||||
<td></td>
|
||||
<td class="text-right">{{number_format($val->AVPWGTCL,0)}}</td>
|
||||
<td class="text-right">{{number_format($val->AVPWGTCH,0)}}</td>
|
||||
<td class="text-right"><a href="./whsePerfDetails?for=p&date={{ date('Y-m-d',strtotime($val->AVDATE)) }}">{{number_format($val->AVPWGTOP,0)}}</a></td>
|
||||
<td class="text-right" style="width:20px">
|
||||
@if (number_format(($val->AVPWGTCL+$val->AVPWGTCH)/($val->AVPWGTCL+$val->AVPWGTCH+$val->AVPWGTOP)*100,0)<$pct_array['parcel_weight'])
|
||||
<span style="color:red">
|
||||
@endif
|
||||
@if (number_format(($val->AVPWGTCL+$val->AVPWGTCH)/($val->AVPWGTCL+$val->AVPWGTCH+$val->AVPWGTOP)*100,0)>=$pct_array['parcel_weight'])
|
||||
<span style="color:green">
|
||||
@endif
|
||||
{{ (($val->AVPWGTCL+$val->AVPWGTCH+$val->AVPWGTOP)!='0'?number_format(($val->AVPWGTCL+$val->AVPWGTCH)/($val->AVPWGTCL+$val->AVPWGTCH+$val->AVPWGTOP)*100,0):'0') }}%
|
||||
</span>
|
||||
</td>
|
||||
<td></td>
|
||||
<td class="text-right">{{number_format($val->AVIWGTCL,0)}}</td>
|
||||
<td class="text-right"><a href="./whsePerfDetails?for=i&date={{ date('Y-m-d',strtotime($val->AVDATE)) }}">{{number_format($val->AVIWGTOP,0)}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:grey" colspan=19></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
// DataTable init
|
||||
// var myTable = $('#datatablesSimple1').DataTable({
|
||||
// "aaSorting": false,
|
||||
// //"lengthMenu": [ [10,25,50,-1], [10,25,50,"All"] ],
|
||||
// "sPaginationType": "full_numbers",
|
||||
// "dom": 'Bfrtip', // Needs button container
|
||||
// "responsive": true,
|
||||
// "orderCellsTop": false,
|
||||
// //"order": [ [0, 'desc'] ],
|
||||
// //"pageLength": 30,
|
||||
// "columnDefs": [
|
||||
// {
|
||||
// orderable: false,
|
||||
// searchable: false,
|
||||
// targets: -1
|
||||
// }
|
||||
// ],
|
||||
// // MAK
|
||||
// "initComplete": function() {
|
||||
// // Apply initial filter for Active records only
|
||||
// //this.api().column(4).search('^Active$', true, false).draw();
|
||||
// }
|
||||
// });
|
||||
|
||||
// MAK
|
||||
// Status filter dropdown change event
|
||||
// $('#date_in').on('change', function() {
|
||||
// });
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,91 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Solon Sentinel Portal - Warehouse Performance Metrics
|
||||
@endsection
|
||||
@section('content')
|
||||
<!-- /.row -->
|
||||
<div class="container-fluid px-4">
|
||||
<h1 class="mt-4">Warehouse Performance Metrics Details dated {{$date_in}} for {{ $for="a"?"All":$for="l"?"LTL":$for="p"?"Parcel":$for="i"?"I&O":"" }}</h1>
|
||||
|
||||
<div class="card mb-4">
|
||||
<!-- Add to class the justify content between and align items center -->
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover table-sm" id="datatablesSimple5" style="width:60%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">Picker</th>
|
||||
<th class="text-center">Customer</th>
|
||||
<th class="text-center">Dollars</th>
|
||||
<th class="text-center">Weight</th>
|
||||
<th class="text-center">Source</th>
|
||||
<th class="text-center">Interco</th>
|
||||
<th class="text-center">Mode</th>
|
||||
<th class="text-center">Type</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- a5macpkr,a4shshnm,sum(dollarvalue) as dollarvalue,sum(weight) as weight,max(source) as source -->
|
||||
@foreach($perfDetails as $key=>$val)
|
||||
<tr>
|
||||
<td class="text-center">{{ $val->A5MACPKR }}</td>
|
||||
<td class="text-left">{{ $val->A4SHSHNM }}</td>
|
||||
<td class="text-right">$ {{number_format($val->DOLLARVALUE,2)}}</td>
|
||||
<td class="text-right">{{number_format($val->WEIGHT,2)}}</td>
|
||||
<td class="text-center">{{$val->SOURCE}}</td>
|
||||
<td class="text-center">{{$val->INTERCO}}</td>
|
||||
<td class="text-center">{{$val->A4SHIPVIA1}}</td>
|
||||
<td class="text-center">{{trim($val->A4SHIPTYPE)=="SmallPack"?"Parcel":$val->A4SHIPTYPE}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
// DataTable init
|
||||
var myTable = $('#datatablesSimple5').DataTable({
|
||||
"aaSorting": false,
|
||||
"lengthMenu": [ [10,25,50,-1], [10,25,50,"All"] ],
|
||||
"sPaginationType": "full_numbers",
|
||||
"dom": 'Bfrtip', // Needs button container
|
||||
"responsive": true,
|
||||
"orderCellsTop": true,
|
||||
"order": [ [4, 'asc'] ],
|
||||
"pageLength": 30,
|
||||
"columnDefs": [
|
||||
{
|
||||
orderable: true,
|
||||
searchable: true,
|
||||
targets: -1
|
||||
}
|
||||
],
|
||||
// MAK
|
||||
"initComplete": function() {
|
||||
// Apply initial filter for Active records only
|
||||
//this.api().column(4).search('^Active$', true, false).draw();
|
||||
}
|
||||
});
|
||||
|
||||
// MAK
|
||||
// Status filter dropdown change event
|
||||
// $('#date_in').on('change', function() {
|
||||
// });
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,76 @@
|
||||
@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">Warehouse Performance Metrics</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.whsePerfShow") }}">
|
||||
{{-- @csrf --}}
|
||||
<div class="mb-2 row">
|
||||
<label for="date" class="col-sm-1 col-form-label">Select Year and Month</label>
|
||||
<div class="col-sm-1">
|
||||
<select aria-label="Date In Yr" name="date_in_yr" id="date_in_yr">
|
||||
@for($x=date('Y',strtotime(date('Y').'- 5 years'));$x<date('Y');$x++)
|
||||
<option value={{$x}}>{{$x}}</option>
|
||||
@endfor
|
||||
<option value={{date('Y')}} SELECTED>{{date('Y')}}</option>
|
||||
</select>
|
||||
<select name="date_in_mth" id="date_in_mth">
|
||||
@for($x=1;$x<=12;$x++)
|
||||
@if($x==date('m'))
|
||||
<option value={{str_pad($x,2,"0",STR_PAD_LEFT)}} SELECTED>{{str_pad($x,2,"0",STR_PAD_LEFT)}}</option>
|
||||
@else
|
||||
<option value={{str_pad($x,2,"0",STR_PAD_LEFT)}}>{{str_pad($x,2,"0",STR_PAD_LEFT)}}</option>
|
||||
@endif
|
||||
@endfor
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<label for="sonar-input-54ed629414" class="visually-hidden">sonar input 54ed629414</label>
|
||||
<input type=submit class="btn btn-primary" value="Display table" id="sonar-input-54ed629414">
|
||||
|
||||
<button type="button" class="btn btn-warning" id="exportExcel">Download to Excel</button>
|
||||
|
||||
</form>
|
||||
|
||||
{{-- Form for Export --}}
|
||||
<form enctype="multipart/form-data" method="POST" action="{{ route("m3.whsePerfExcel") }}" id="exporttoExcelForm">
|
||||
@csrf
|
||||
<input type="hidden" name="date_in_yr" id="date_in_yr1" value="">
|
||||
<input type="hidden" name="date_in_mth" id="date_in_mth1" value="">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(document).on('click','#exportExcel', function () {
|
||||
var date_in_yr = $('#date_in_yr').val().trim();
|
||||
var date_in_mth = $('#date_in_mth').val().trim();
|
||||
|
||||
date_in_yr = $("#date_in_yr").val();
|
||||
date_in_mth = $("#date_in_mth").val();
|
||||
|
||||
$("#date_in_yr1").val(date_in_yr);
|
||||
$("#date_in_mth1").val(date_in_mth);
|
||||
|
||||
$("#exporttoExcelForm").submit();
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,8 @@
|
||||
<div class="container-fluid px-4">
|
||||
<div class="d-flex align-items-center justify-content-between small">
|
||||
<div class="text-muted">Copyright © MPBA</div>
|
||||
<div>
|
||||
<span id="currentWHSPAN">{{ Str::upper($WDWNAM) }}</span> ( {{ env('APP_ENV_FOOTER') }} )
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
+146
@@ -0,0 +1,146 @@
|
||||
<div id="layoutSidenav_nav">
|
||||
<nav class="sb-sidenav accordion sb-sidenav-dark" id="sidenavAccordion">
|
||||
<div class="sb-sidenav-menu">
|
||||
<div class="nav">
|
||||
|
||||
@if($execUser!='Y' )
|
||||
|
||||
@if($csr!="Y" )
|
||||
|
||||
<a class="nav-link" href="/">
|
||||
<div class="sb-nav-link-icon"><i class="fas fa-tachometer-alt"></i></div>
|
||||
Dashboard
|
||||
</a>
|
||||
|
||||
{{-- <a class="nav-link collapsed" href="#" data-bs-toggle="collapse" data-bs-target="#collapseLayouts" aria-expanded="true" aria-controls="collapseLayouts">
|
||||
<div class="sb-nav-link-icon"><i class="fas fa-users"></i></div>
|
||||
{{ trans('cruds.userManagement.title') }}
|
||||
<div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
|
||||
</a> --}}
|
||||
|
||||
<a class="nav-link {{ request()->is('replenishmentSettings') || request()->is('replenishmentSettings/*') ? 'active' : '' }}"
|
||||
href="{{ route('m3.replenishmentSettings.index') }}">
|
||||
<i class="fa-fw fas fa-briefcase mr-1"></i>
|
||||
Replenishment settings
|
||||
</a>
|
||||
|
||||
<a class="nav-link {{ request()->is('M3ErrorsDisplay') || request()->is('M3ErrorsDisplay/*') ? 'active' : '' }}"
|
||||
href="{{ route('m3.M3ErrorsDisplay.index') }}">
|
||||
<i class="fa-fw fas fa-briefcase mr-1"></i>
|
||||
Transaction log for M3/Sentinel interface
|
||||
</a>
|
||||
@endif
|
||||
|
||||
<a class="nav-link {{ request()->is('M3GetPDFFromCache') || request()->is('M3GetPDFFromCache/*') ? 'active' : '' }}"
|
||||
href="{{ route('m3.M3GetPDFFromCache.index') }}">
|
||||
<i class="fa-fw fas fa-briefcase mr-1"></i>
|
||||
Sentinel Doc Archive
|
||||
</a>
|
||||
|
||||
@if($csr!="Y")
|
||||
<a class="nav-link {{ request()->is('userControl') || request()->is('userControl/*') ? 'active' : '' }}"
|
||||
href="{{ route('m3.userControl') }}">
|
||||
<i class="fa-fw fas fa-briefcase mr-1"></i>
|
||||
User Control
|
||||
</a>
|
||||
|
||||
@if($power_users=='Y' || $admin_users=='Y')
|
||||
<a class="nav-link {{ request()->is('carrierMaint') || request()->is('carrierMaint/*') ? 'active' : '' }}"
|
||||
href="{{ route('m3.carrierMaint') }}">
|
||||
<i class="fa-fw fas fa-briefcase mr-1"></i>
|
||||
Carrier Master Maintenance
|
||||
</a>
|
||||
@endif
|
||||
|
||||
<a class="nav-link {{ request()->is('palletQty') || request()->is('palletQty/*') ? 'active' : '' }}"
|
||||
href="{{ route('m3.palletQty') }}">
|
||||
<i class="fa-fw fas fa-briefcase mr-1"></i>
|
||||
ERP/TMS Part Data
|
||||
</a>
|
||||
<a class="nav-link {{ request()->is('M3Delivery') || request()->is('M3Delivery/*') ? 'active' : '' }}"
|
||||
href="{{ route('m3.M3Delivery') }}">
|
||||
<i class="fa-fw fas fa-briefcase mr-1"></i>
|
||||
M3 Delivery Methods
|
||||
</a>
|
||||
|
||||
<a class="nav-link {{ request()->is('OrderLinesOfClosedOrder') || request()->is('OrderLinesOfClosedOrder/*') ? 'active' : '' }}"
|
||||
href="{{ route('m3.OrderLinesOfClosedOrder') }}">
|
||||
<i class="fa-fw fas fa-file-excel mr-1"></i>
|
||||
Daily Closed order lines report
|
||||
</a>
|
||||
|
||||
@if($power_users=='Y' || $admin_users=='Y')
|
||||
<a class="nav-link {{ request()->is('UserPickingStats4') || request()->is('UserPickingStats4/*') ? 'active' : '' }}"
|
||||
href="{{ route('m3.UserPickingStats4') }}">
|
||||
<i class="fa-fw fas fa-user-friends mr-1"></i>
|
||||
Daily User Efficiency
|
||||
</a>
|
||||
<a class="nav-link {{ request()->is('UserPickingStats5') || request()->is('UserPickingStats5/*') ? 'active' : '' }}"
|
||||
href="{{ route('m3.UserPickingStats5') }}">
|
||||
<i class="fa-fw fas fa-chart-bar mr-1"></i>
|
||||
Graph User Efficiency
|
||||
</a>
|
||||
<!-- #732 -->
|
||||
<a class="nav-link {{ request()->is('pendingClosure') || request()->is('pendingClosure/*') ? 'active' : '' }}"
|
||||
href="{{ route('m3.pendingClosure') }}">
|
||||
<i class="fa-fw fas fa-chart-bar mr-1"></i>
|
||||
Truck pending closure in M3
|
||||
</a>
|
||||
@endif
|
||||
|
||||
{{-- Distribution whs addresses --}}
|
||||
<a class="nav-link {{ request()->is('ship-to') || request()->is('ship-to/*') ? 'active' : '' }}" href="{{ url('ship-to') }}">
|
||||
<i class="fa-fw fas fa-file-excel mr-1"></i>
|
||||
Distribution whs addresses
|
||||
</a>
|
||||
|
||||
{{-- KPI execSummaryChart --}}
|
||||
<a class="nav-link {{ request()->is('execsummary') || request()->is('execsummary/*') ? 'active' : '' }}" href="{{ url('execsummary') }}">
|
||||
<i class="fa-fw fas fa-chart-bar mr-1"></i>
|
||||
KPI1 bar
|
||||
</a>
|
||||
<a class="nav-link {{ request()->is('execsummaryline') || request()->is('execsummaryline/*') ? 'active' : '' }}" href="{{ url('execsummaryline') }}">
|
||||
<i class="fa-fw fas fa-chart-line mr-1"></i>
|
||||
KPI1 line
|
||||
</a>
|
||||
|
||||
{{-- KPI2 OTTC --}}
|
||||
<a class="nav-link {{ request()->is('whsePerf') || request()->is('whsePerf/*') ? 'active' : '' }}"
|
||||
href="{{ route('m3.whsePerf') }}">
|
||||
<i class="fa-fw fas fa-chart-bar mr-1"></i>
|
||||
OTTC
|
||||
</a>
|
||||
|
||||
{{-- Scan Boxes to Pallet --}}
|
||||
{{-- <a class="nav-link {{ request()->is('BoxPackToPallet') || request()->is('BoxPackToPallet/*') ? 'active' : '' }}"
|
||||
href="{{ route('m3.BoxPackToPallet') }}">
|
||||
<i class="fa-fw fas fa-chart-bar mr-1"></i>
|
||||
Scan Boxes to Pallet
|
||||
</a> --}}
|
||||
|
||||
{{-- Sentinel Home --}}
|
||||
<a class="nav-link " href="{{ env("APP_URL") }}/php/SentinelHome.php">
|
||||
<i class="fa-fw fas fa-chart-bar mr-1"></i>Sentinel Home</a>
|
||||
|
||||
@endif
|
||||
|
||||
@endif {{-- Exec User --}}
|
||||
|
||||
@if ($execUser=='Y')
|
||||
<a class="nav-link " href="{{ env("APP_URL") }}/php/SentinelHomeexec.php">
|
||||
<i class="fa-fw fas fa-chart-bar mr-1"></i>Sentinel Home</a>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="sb-sidenav-footer">
|
||||
<div class="small">Logged in as:</div>
|
||||
{{ m3_user() }}
|
||||
{{-- @if($execUser=='Y')
|
||||
<a class="link-primary" href="/userprofile">{{ m3_user() }}</a>
|
||||
@else
|
||||
{{ m3_user() }}
|
||||
@endif --}}
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
<form id="frmAdd">
|
||||
<div class="modal" id="M3DeliveryAdd" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Add</h5>
|
||||
<button type="button" class="btn-close close-modal" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="table-responsive" id="M3DeliveryAddData">
|
||||
<input type="hidden" id="addAVCO" name="addAVCO" value="{{$power_user->R428CO}}">
|
||||
<input type="hidden" id="addAVPLANT" name="addAVPLANT" value="{{$power_user->R428PL}}">
|
||||
<input type="hidden" id="addAVWHS" name="addAVWHS" value="{{$power_user->R428WH}}">
|
||||
<table role="presentation" class="table table-condensed" >
|
||||
<thead>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><b>Delivery Method</b></td> <!-- ALPHA -->
|
||||
<td class="text-right">
|
||||
<label for="addAVDELMETH" class="visually-hidden">addAVDELMETH</label>
|
||||
<input type="text" maxlength="4" length="4" class="myinput" name="addAVDELMETH" id="addAVDELMETH">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Ship Via</b></td> <!-- ALPHA -->
|
||||
<td class="text-right">
|
||||
<select aria-label="Addavshpvia" id="addAVSHPVIA" name="addAVSHPVIA">
|
||||
<option value="">Select Ship Via</option>
|
||||
@foreach($shipvia as $key=>$val)
|
||||
<option value="{{$val->AXCODE}}">{{$val->AXCODE}} - {{$val->AXDESC}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Sentinel Route</b></td> <!-- ALPHA -->
|
||||
<td class="text-right">
|
||||
<select aria-label="Addavshsrt" id="addAVSHSRT" name="addAVSHSRT">
|
||||
<option value=" "></option>
|
||||
<option value="GR">GR</option>
|
||||
<option value="PU">PU</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>International Code</b></td> <!-- ALPHA -->
|
||||
<td class="text-right">
|
||||
<select aria-label="Addavshorcl" id="addAVSHORCL" name="addAVSHORCL">
|
||||
<option value=" " selected></option>
|
||||
<option value="Y">002 - International</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary close-modal" data-bs-dismiss="modal" id="closeAdd">Close</button>
|
||||
<button type="button" id="submitM3DeliveryAdd" class="btn btn-primary" data-bs-dismiss="modal">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
<form id="frmEdit">
|
||||
<div class="modal" id="M3DeliveryEdit" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Edit</h5>
|
||||
<button type="button" class="btn-close close-modal" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="table-responsive" id="M3DeliveryEditData">
|
||||
<input type="hidden" id="AVCO" name="AVCO" value="{{$power_user->R428CO}}">
|
||||
<input type="hidden" id="AVPLANT" name="AVPLANT" value="{{$power_user->R428PL}}">
|
||||
<input type="hidden" id="AVWHS" name="AVWHS" value="{{$power_user->R428WH}}">
|
||||
<table role="presentation" class="table table-condensed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><b>Delivery Method</b></td> <!-- ALPHA -->
|
||||
<td class="text-right">
|
||||
<input type="hidden" name="OLD_AVDELMETH" id="OLD_AVDELMETH">
|
||||
<label for="AVDELMETH" class="visually-hidden">AVDELMETH</label>
|
||||
<input type="text" maxlength="4" length="4" class="myinput" name="AVDELMETH" id="AVDELMETH" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Ship Via</b></td> <!-- ALPHA -->
|
||||
<td class="text-right">
|
||||
<label for="OLD_AVSHPVIA" class="visually-hidden">OLD AVSHPVIA</label>
|
||||
<input type="hidden" name="OLD_AVSHPVIA" id="OLD_AVSHPVIA">
|
||||
<select aria-label="Avshpvia" id="AVSHPVIA" name="AVSHPVIA">
|
||||
<option value="">Select Ship Via</option>
|
||||
@foreach($shipvia as $key=>$val)
|
||||
<option value="{{$val->AXCODE}}">{{$val->AXCODE}} - {{$val->AXDESC}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Sentinel Route</b></td> <!-- ALPHA -->
|
||||
<td class="text-right">
|
||||
<label for="OLD_AVSHSRT" class="visually-hidden">OLD AVSHSRT</label>
|
||||
<input type="hidden" name="OLD_AVSHSRT" id="OLD_AVSHSRT">
|
||||
<select aria-label="Avshsrt" id="AVSHSRT" name="AVSHSRT">
|
||||
<option value=" "></option>
|
||||
<option value="GR">GR</option>
|
||||
<option value="PU">PU</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>International Code</b></td> <!-- ALPHA -->
|
||||
<td class="text-right">
|
||||
<label for="OLD_AVSHORCL" class="visually-hidden">OLD AVSHORCL</label>
|
||||
<input type="hidden" name="OLD_AVSHORCL" id="OLD_AVSHORCL">
|
||||
<select aria-label="Avshorcl" id="AVSHORCL" name="AVSHORCL">
|
||||
<option value=" " selected></option>
|
||||
<option value="Y">002 - International</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary close-modal" data-bs-dismiss="modal" id="closeEdit">Close</button>
|
||||
<button type="button" id="submitM3DeliveryEdit" class="btn btn-primary" data-bs-dismiss="modal">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -0,0 +1,18 @@
|
||||
<div class="modal" tabindex="-1" id="blank-modal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body blank-body">
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a style="cursor:pointer" id="blank-close" class="btn btn-secondary">Close</a>
|
||||
<a style="cursor:pointer" id="blank-submit" class="btn btn-primary">Save changes</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
<form id="frmAdd">
|
||||
<div class="modal" id="carrierAdd" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Carrier Master Add</h5>
|
||||
<button type="button" class="btn-close close-modal" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="table-responsive" id="carrierAddData">
|
||||
<table role="presentation" class="table table-condensed" >
|
||||
<thead>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><b>Carrier Number</b></td> <!-- ALPHA -->
|
||||
<td class="text-right">
|
||||
<label for="addCANUM" class="visually-hidden">addCANUM</label>
|
||||
<input type="text" maxlength="5" class="myinput" name="addCANUM" id="addCANUM" required>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Carrier Name</b></td> <!-- ALPHA -->
|
||||
<td class="text-right">
|
||||
<label for="addCANAM" class="visually-hidden">addCANAM</label>
|
||||
<input type="text" maxlength="30" class="myinput" name="addCANAM" id="addCANAM">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>2ship Carrier Code</b></td> <!-- NUMERIC -->
|
||||
<td class="text-right">
|
||||
<label for="addTWOSHIPCARRIERCODE" class="visually-hidden">addTWOSHIPCARRIERCODE</label>
|
||||
<input type="number" min="1" max="999" increment="1" pattern="[0-9]{3}" class="myinput" name="addTWOSHIPCARRIERCODE" id="addTWOSHIPCARRIERCODE"
|
||||
onkeypress='return ((event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 32))'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Parcel Carrier Code</b></td> <!-- Switch -->
|
||||
<td class="text-right">
|
||||
LTL
|
||||
<div class="col-sm-1 form-check form-check-inline form-switch">
|
||||
<label for="addPARCELCARRIERCODE" class="visually-hidden">addPARCELCARRIERCODE</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" id="addPARCELCARRIERCODE" name="addPARCELCARRIERCODE" data-on="X" data-off="" aria-checked="false">
|
||||
Parcel
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>ERP Carrier Code</b></td> <!-- ALPHA -->
|
||||
<td class="text-right">
|
||||
<!--#553 <label for="addCASPR10A01" class="visually-hidden">addCASPR10A01</label>
|
||||
<input type="number" min="1" max="999999" increment="1" pattern="[0-9]{6}" class="myinput" name="addCASPR10A01" id="addCASPR10A01"
|
||||
onkeypress='return ((event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 32))'> -->
|
||||
<label for="addCASPR10A01" class="visually-hidden">addCASPR10A01</label>
|
||||
<input type="text" maxlength="10"class="myinput" name="addCASPR10A01" id="addCASPR10A01" required>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Timing of M3 closing</b></td> <!-- Switch -->
|
||||
<td class="text-right">
|
||||
Overnight
|
||||
<div class="col-sm-1 form-check form-check-inline form-switch">
|
||||
<label for="addCASPR1A01" class="visually-hidden">addCASPR1A01</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" id="addCASPR1A01" name="addCASPR1A01" data-on="Y" data-off="" aria-checked="false">
|
||||
</div>
|
||||
When closing truck
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary close-modal" data-bs-dismiss="modal" id="closeAdd">Close</button>
|
||||
<button type="button" id="submitCarrierAdd" class="btn btn-primary" data-bs-dismiss="modal">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
<form id="frmEdit">
|
||||
<div class="modal" id="carrierEdit" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Carrier Master Edit</h5>
|
||||
<button type="button" class="btn-close close-modal" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="table-responsive" id="carrierEditData">
|
||||
<table role="presentation" class="table table-condensed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><b>Carrier Number</b></td> <!-- ALPHA -->
|
||||
<td class="text-right">
|
||||
<input type="hidden" name="OLD_CANUM" id="OLD_CANUM">
|
||||
<label for="CANUM" class="visually-hidden">CANUM</label>
|
||||
<input type="text" maxlength="5" class="myinput" name="CANUM" id="CANUM" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Carrier Name</b></td> <!-- ALPHA -->
|
||||
<td class="text-right">
|
||||
<input type="hidden" name="OLD_CANAM" id="OLD_CANAM">
|
||||
<label for="CANAM" class="visually-hidden">CANAM</label>
|
||||
<input type="text" maxlength="30" class="myinput" name="CANAM" id="CANAM">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>2ship Carrier Code</b></td> <!-- NUMERIC -->
|
||||
<td class="text-right">
|
||||
<input type="hidden" name="OLD_TWOSHIPCARRIERCODE" id="OLD_TWOSHIPCARRIERCODE">
|
||||
<label for="TWOSHIPCARRIERCODE" class="visually-hidden">TWOSHIPCARRIERCODE</label>
|
||||
<input type="number" min="1" max="999" step="1" pattern="[0-9]{3}" class="myinput" name="TWOSHIPCARRIERCODE" id="TWOSHIPCARRIERCODE"
|
||||
onkeypress='return ((event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 32))' required>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Parcel Carrier Code</b></td> <!-- Switch -->
|
||||
<td class="text-right">
|
||||
LTL
|
||||
<div class="col-sm-1 form-check form-check-inline form-switch">
|
||||
<input type="hidden" name="OLD_PARCELCARRIERCODE" id="OLD_PARCELCARRIERCODE">
|
||||
<label for="PARCELCARRIERCODE" class="visually-hidden">PARCELCARRIERCODE</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" id="PARCELCARRIERCODE" name="PARCELCARRIERCODE" data-on="X" data-off="" aria-checked="false">
|
||||
Parcel
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>ERP Carrier Code</b></td> <!-- ALPHA -->
|
||||
<td class="text-right">
|
||||
<input type="hidden" name="OLD_CASPR10A01" id="OLD_CASPR10A01">
|
||||
<!--#553 <label for="CASPR10A01" class="visually-hidden">CASPR10A01</label>
|
||||
<input type="number" min="1" max="999999" step="1" class="myinput" pattern="[0-9]{6}" name="CASPR10A01" id="CASPR10A01"
|
||||
onkeypress='return ((event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 32))' required> -->
|
||||
<label for="CASPR10A01" class="visually-hidden">CASPR10A01</label>
|
||||
<input type="text" maxlength="10" class="myinput" name="CASPR10A01" id="CASPR10A01" required>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Timing of M3 closing</b></td> <!-- Switch -->
|
||||
<td class="text-right">
|
||||
Overnight
|
||||
<div class="col-sm-1 form-check form-check-inline form-switch">
|
||||
<input type="hidden" name="OLD_CASPR1A01" id="OLD_CASPR1A01">
|
||||
<label for="CASPR1A01" class="visually-hidden">CASPR1A01</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" id="CASPR1A01" name="CASPR1A01" data-on="Y" data-off="" aria-checked="false">
|
||||
</div>
|
||||
When closing truck
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary close-modal" data-bs-dismiss="modal" id="closeEdit">Close</button>
|
||||
<button type="button" id="submitCarrierEdit" class="btn btn-primary" data-bs-dismiss="modal">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -0,0 +1,68 @@
|
||||
<form id="frmAdd">
|
||||
<div class="modal" id="qtyAdd" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">ERP/TMS Part Data Add</h5>
|
||||
<button type="button" class="btn-close close-modal" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="table-responsive" id="qtyAddData">
|
||||
<table role="presentation" class="table table-condensed" >
|
||||
<thead>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><label for="AT9DPW" class="col-form-label"><b>Div-Plt-Whs:</b></label></td>
|
||||
<td>
|
||||
<div class="mb-3">
|
||||
<select aria-label="Addat9dpw" class="form-select-sm" id="addAT9DPW"
|
||||
@if($power_user->R428PWRUSR=="N")
|
||||
disabled
|
||||
@endif
|
||||
>
|
||||
@foreach ($IC670M as $key => $IC670MR)
|
||||
<option selected value="{{ trim($IC670MR->WDCO).trim($IC670MR->WDPL).trim($IC670MR->WDWHS) }}"
|
||||
data-AT9CO="{{ trim($IC670MR->WDCO) }}" data-AT9PLT="{{ trim($IC670MR->WDPL) }}" data-AT9WHS="{{ trim($IC670MR->WDWHS) }}"
|
||||
data-AT9DPW="{{ trim($IC670MR->WDCO).trim($IC670MR->WDPL).trim($IC670MR->WDWHS) }}">
|
||||
{{ trim(Str::upper($IC670MR->WDWNAM)) }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Part</b></td> <!-- ALPHA -->
|
||||
<td class="text-right">
|
||||
<label for="addAT9PART" class="visually-hidden">addAT9PART</label>
|
||||
<input type="text" maxlength="15" class="myinput" name="addAT9PART" id="addAT9PART" required>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Pallet Qty</b></td> <!-- NUMERIC -->
|
||||
<td class="text-right">
|
||||
<label for="addAT9QTY" class="visually-hidden">addAT9QTY</label>
|
||||
<input type="number" min="1" max="999999999" increment=1 class="myinput" name="addAT9QTY" id="addAT9QTY" required>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Hazardous Material</b></td> <!-- ALPHA -->
|
||||
<td class="text-right">
|
||||
<label for="addAT9WRN" class="visually-hidden">addAT9WRN</label>
|
||||
<input type="text" maxlength="5" class="myinput" name="addAT9WRN" id="addAT9WRN">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary close-modal" data-bs-dismiss="modal" id="closeAdd">Close</button>
|
||||
<button type="button" id="submitQtyAdd" class="btn btn-primary" data-bs-dismiss="modal">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -0,0 +1,66 @@
|
||||
<form id="frmEdit">
|
||||
<div class="modal" id="qtyEdit" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">ERP/TMS Part Data Edit</h5>
|
||||
<button type="button" class="btn-close close-modal" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="table-responsive" id="qtyEditData">
|
||||
<table role="presentation" class="table table-condensed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><label for="AT9DPW" class="col-form-label"><b>Div-Plt-Whs:</b></label></td>
|
||||
<td>
|
||||
<input type="hidden" name="USERDPW" id="USERDPW">
|
||||
<div class="mb-3">
|
||||
<input type="hidden" name="OLD_AT9DPW" id="OLD_AT9DPW">
|
||||
<select class="form-select-sm" name="AT9DPW" id="AT9DPW" required>
|
||||
@foreach ($IC670M as $key => $IC670MR)
|
||||
<option selected value="{{ trim($IC670MR->WDCO).trim($IC670MR->WDPL).trim($IC670MR->WDWHS) }}"
|
||||
data-AT9CO="{{ trim($IC670MR->WDCO) }}" data-AT9PLT="{{ trim($IC670MR->WDPL) }}" data-AT9WHS="{{ trim($IC670MR->WDWHS) }}" >
|
||||
{{ trim(Str::upper($IC670MR->WDWNAM)) }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Part</b></td> <!-- ALPHA -->
|
||||
<td class="text-right">
|
||||
<input type="hidden" name="OLD_AT9PART" id="OLD_AT9PART">
|
||||
<label for="AT9PART" class="visually-hidden">AT9PART</label>
|
||||
<input type="text" maxlength="15" class="myinput" name="AT9PART" id="AT9PART" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Pallet Qty</b></td> <!-- NUMERIC -->
|
||||
<td class="text-right">
|
||||
<input type="hidden" name="OLD_AT9QTY" id="OLD_AT9QTY">
|
||||
<label for="AT9QTY" class="visually-hidden">AT9QTY</label>
|
||||
<input type="number" min="1" max="999999999" increment=1 class="myinput" name="AT9QTY" id="AT9QTY" required>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Hazardous Material</b></td> <!-- ALPHA -->
|
||||
<td class="text-right">
|
||||
<input type="hidden" name="OLD_AT9WRN" id="OLD_AT9WRN">
|
||||
<label for="AT9WRN" class="visually-hidden">AT9WRN</label>
|
||||
<input type="text" maxlength="5" class="myinput" name="AT9WRN" id="AT9WRN">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary close-modal" data-bs-dismiss="modal" id="closeEdit">Close</button>
|
||||
<button type="button" id="submitQtyEdit" class="btn btn-primary" data-bs-dismiss="modal">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
<div class="modal" id="shipToCheckBox" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Address checker</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-xs-5">
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" name="check1" id="check1" value="1"> Ignore address checker for all future releases of this order
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="clear: both; margin-top:20px;">
|
||||
<div class="col-xs-5">
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" name="check2" id="check2" value="1"> Ignore address checker if the above address is re-used on a future order
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
<button type="button" id= "submitShipToCheckBox" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
<div class="modal" id="shipToEdit" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Ship to Edit</h5>
|
||||
<button type="button" class="btn-close close-modal" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="table-responsive" id="shipToEditData">
|
||||
<table role="presentation" class="table table-condensed" >
|
||||
<thead>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="text-center"><strong>Original</strong></td>
|
||||
<td class="text-center"><strong>Current</strong></td>
|
||||
<td class="text-center"><strong>New Values</strong></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><b>Name</b></td><!-- ALPHA -->
|
||||
<td class="text-left smalltxt">{!! (isset($original->PSHNM)&&trim($original->PSHNM)!=''?trim($original->PSHNM):'') !!}</td>
|
||||
<td class="text-left smalltxt">{!! (isset($order->SHSHNM)&&trim($order->SHSHNM)!=''?trim($order->SHSHNM):'') !!}</td>
|
||||
<td class="text-left smalltxt">{!! (isset($order->SHSHNM)&&trim($order->SHSHNM)!=''?trim($order->SHSHNM):'') !!}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Address line 1</b></td> <!-- MAX -->
|
||||
<td class="text-left smalltxt" id="ORIG_PSHA1">{!! (isset($original->PSHA1)&&trim($original->PSHA1)!=''?trim($original->PSHA1):'') !!}</td>
|
||||
<td class="text-left smalltxt" id="OLD_SHSHA1">{!! (isset($order->SHSHA1)&&trim($order->SHSHA1)!=''?trim($order->SHSHA1):'') !!}</td>
|
||||
<td class="text-right"><label for="sonar-input-deb2f9aedc" class="visually-hidden">SHSHA1</label>
|
||||
<input maxlength="30" class="myinput toUpper" type="text" name="SHSHA1" value="{!! (isset($order->SHSHA1)&&trim($order->SHSHA1)!=''?trim($order->SHSHA1):' ') !!}" id="sonar-input-deb2f9aedc"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Address line 2</b></td> <!-- MAX -->
|
||||
<td class="text-left smalltxt" id="ORIG_PSHA2">{!! (isset($original->PSHA2)&&trim($original->PSHA2)!=''?trim($original->PSHA2):'') !!}</td>
|
||||
<td class="text-left smalltxt" id="OLD_SHSHA2">{!! (isset($order->SHSHA2)&&trim($order->SHSHA2)!=''?trim($order->SHSHA2):'') !!}</td>
|
||||
<td class="text-right"><label for="sonar-input-bf4a0acc70" class="visually-hidden">SHSHA2</label>
|
||||
<input maxlength="30" class="myinput toUpper" type="text" name="SHSHA2" value="{!! (isset($order->SHSHA2)&&trim($order->SHSHA2)!=''?trim($order->SHSHA2):' ') !!}" id="sonar-input-bf4a0acc70"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>City</b></td> <!-- ALPHA MAX -->
|
||||
<td class="text-left smalltxt" id="ORIG_PSHCI">{!! (isset($original->PSHCI)&&trim($original->PSHCI)!=''?trim($original->PSHCI):'') !!}</td>
|
||||
<td class="text-left smalltxt" id="OLD_SHSHCI">{!! (isset($order->SHSHCI)&&trim($order->SHSHCI)!=''?trim($order->SHSHCI):'') !!}</td>
|
||||
<td class="text-right"><label for="sonar-input-e043dfd88b" class="visually-hidden">sonar input e043dfd88b</label>
|
||||
<input id="sonar-input-e043dfd88b" aria-label="Shshci" maxlength="17" onkeypress='return ((event.charCode >= 65 && event.charCode <= 90) || (event.charCode >= 97 && event.charCode <= 122) || (event.charCode == 32))' class="myinput toUpper" type="text" name="SHSHCI" value="{!! (isset($order->SHSHCI)&&trim($order->SHSHCI)!=''?trim($order->SHSHCI):' ') !!}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>State</b></td> <!-- ALPHA MAX -->
|
||||
<td class="text-left smalltxt" id="ORIG_PSHST">{!! (isset($original->PSHST)&&trim($original->PSHST)!=''?trim($original->PSHST):'') !!}</td>
|
||||
<td class="text-left smalltxt" id="OLD_SHSHST">{!! (isset($order->SHSHST)&&trim($order->SHSHST)!=''?trim($order->SHSHST):'') !!}</td>
|
||||
<td class="text-right"><label for="sonar-input-967e1c005d" class="visually-hidden">sonar input 967e1c005d</label>
|
||||
<input id="sonar-input-967e1c005d" aria-label="Shshst" maxlength="2" onkeypress='return ((event.charCode >= 65 && event.charCode <= 90) || (event.charCode >= 97 && event.charCode <= 122) || (event.charCode == 32))' class="myinput toUpper" type="text" name="SHSHST" value="{!! (isset($order->SHSHST)&&trim($order->SHSHST)!=''?trim($order->SHSHST):' ') !!}"></td>
|
||||
<tr>
|
||||
<td><b>Zip</b></td> <!-- MAX -->
|
||||
<td class="text-left smalltxt" id="ORIG_PSHZP">{!! (isset($original->PSHZP)&&trim($original->PSHZP)!=''?trim($original->PSHZP):'') !!}</td>
|
||||
<td class="text-left smalltxt" id="OLD_SHSHZP">{!! (isset($order->SHSHZP)&&trim($order->SHSHZP)!=''?trim($order->SHSHZP):'') !!}</td>
|
||||
<td class="text-right"><label for="sonar-input-d755055c65" class="visually-hidden">SHSHZP</label>
|
||||
<input maxlength="9" class="myinput toUpper" type="text" name="SHSHZP" value="{!! (isset($order->SHSHZP)&&trim($order->SHSHZP)!=''?trim($order->SHSHZP):' ') !!}" id="sonar-input-d755055c65"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Country</b></td> <!-- ALPHA MAX -->
|
||||
<td class="text-left smalltxt">{!! (isset($original->PSHCT)&&trim($original->PSHCT)!=''?trim($original->PSHCT):'') !!}</td>
|
||||
<td class="text-left smalltxt">{!! (isset($order->SHSHCT)&&trim($order->SHSHCT)!=''?trim($order->SHSHCT):'') !!}</td>
|
||||
<td class="text-left smalltxt">{!! (isset($order->SHSHCT)&&trim($order->SHSHCT)!=''?trim($order->SHSHCT):'') !!}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary close-modal" data-bs-dismiss="modal">Close</button>
|
||||
<button type="button" id="submitShipToEdit" class="btn btn-primary" data-bs-dismiss="modal">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
+252
@@ -0,0 +1,252 @@
|
||||
<form id="frmAdd">
|
||||
<div class="modal" id="userAdd" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">User Add</h5>
|
||||
<button type="button" class="btn-close close-modal" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="table-responsive" id="userAddData">
|
||||
<table role="presentation" class="table table-condensed">
|
||||
<tbody>
|
||||
<!-- R428DV R428PL R428WHS R428STS R428US R428FIRST R428FAMILY R428EMAIL R428EMPCDE R428ADMUSR R428PWRUSR -->
|
||||
<tr>
|
||||
<td>
|
||||
<table role="presentation" class="table table-condensed">
|
||||
<tr>
|
||||
<input type="hidden" id="R428CO" name="R428CO">
|
||||
<input type="hidden" id="R428PL" name="R428PL">
|
||||
<input type="hidden" id="R428WH" name="R428WH">
|
||||
<td><b>Status</b></td> <!-- Switch Active/Inactive -->
|
||||
<td class="text-center">
|
||||
<div class="form-check form-switch">
|
||||
<label for="sonar-input-63da19b195" class="visually-hidden">R428STS</label>
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="R428STS" value="A" checked data-on="A" data-off="I" aria-checked="false" id="sonar-input-63da19b195">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>User profile</b></td> <!-- ALPHA -->
|
||||
<td class="text-right"><label for="sonar-input-afd6168b6c" class="visually-hidden">R428US</label>
|
||||
<input type="text" maxlength="10" class="myinput" oninput="this.value = this.value.toUpperCase()" name="R428US" required id="sonar-input-afd6168b6c"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>First Name</b></td> <!-- ALPHA -->
|
||||
<td class="text-right"><label for="sonar-input-9e6c6eaa8b" class="visually-hidden">R428FIRST</label>
|
||||
<input type="text" maxlength="20" class="myinput" oninput="this.value = this.value.toUpperCase()" name="R428FIRST" required id="sonar-input-9e6c6eaa8b"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Family Name</b></td> <!-- ALPHA -->
|
||||
<td class="text-right"><label for="sonar-input-22147e2614" class="visually-hidden">R428FAMILY</label>
|
||||
<input type="text" maxlength="30" class="myinput" oninput="this.value = this.value.toUpperCase()" name="R428FAMILY" required id="sonar-input-22147e2614"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Email</b></td> <!-- ALPHA -->
|
||||
<td class="text-right"><label for="sonar-input-a7fe91c914" class="visually-hidden">R428EMAIL</label>
|
||||
<input type="text" maxlength="100" class="myinput" oninput="this.value = this.value.toLowerCase()" name="R428EMAIL" required id="sonar-input-a7fe91c914"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Employee code</b></td> <!-- MAX -->
|
||||
<td class="text-right"><label for="sonar-input-8e3a421fd3" class="visually-hidden">R428EMPCDE</label>
|
||||
<input type="number" min=0 max=9999 class="myinput" name="R428EMPCDE" value=0 required id="sonar-input-8e3a421fd3"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="R428DPW1" class="col-form-label"><b>Div-Plt-Whs:</b></label></td>
|
||||
<td>
|
||||
<div class="mb-3">
|
||||
<select class="form-select-sm myinput" name="R428DPW1" id="R428DPW1" aria-label="Div-Plt-Whs" required>
|
||||
<option value="" selected disabled hidden>Select a value</option>
|
||||
@foreach ($IC670M as $key => $IC670MR)
|
||||
<option value="{{ trim($IC670MR->WDCO).trim($IC670MR->WDPL).trim($IC670MR->WDWHS) }}"
|
||||
data-co="{{ trim($IC670MR->WDCO) }}" data-pl="{{ trim($IC670MR->WDPL) }}" data-wh="{{ trim($IC670MR->WDWHS) }}"
|
||||
data-dpw="{{ trim($IC670MR->WDCO).trim($IC670MR->WDPL).trim($IC670MR->WDWHS) }}" >
|
||||
{{ trim(Str::upper($IC670MR->WDWNAM)) }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- <tr> -->
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<td><b>Admin user</b></td> <!-- SWITCH Y/N -->
|
||||
<td class="text-center">
|
||||
<div class="form-check form-switch">
|
||||
<label for="sonar-input-d30d801b67" class="visually-hidden">R428ADMUSR</label>
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="R428ADMUSR" value="N" data-on="Y" data-off="N" aria-checked="false" id="sonar-input-d30d801b67">
|
||||
</div>
|
||||
</td>
|
||||
<td><b>Power user</b></td> <!-- SWITCH Y/N -->
|
||||
<td class="text-center">
|
||||
<div class="form-check form-switch">
|
||||
<label for="sonar-input-aeca45ced5" class="visually-hidden">R428PWRUSR</label>
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="R428PWRUSR" value="N" data-on="Y" data-off="N" aria-checked="false" id="sonar-input-aeca45ced5">
|
||||
</div>
|
||||
</td>
|
||||
<td><b>CSR</b></td> <!-- SWITCH Y/N -->
|
||||
<td class="text-center">
|
||||
<div class="form-check form-switch">
|
||||
<label for="sonar-input-41e1a8347c" class="visually-hidden">R42811A</label>
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="R42811A" value="N" data-on="C" data-off="" aria-checked="false" id="sonar-input-41e1a8347c">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td><b>Executive</b></td> <!-- SWITCH Y/N -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<label for="sonar-input-34ca226a28" class="visually-hidden">R42821A</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" name="R42821A" data-on="Y" data-off="N" aria-checked="false" id="sonar-input-34ca226a28">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2> </td><td colspan=2> </td><td colspan=2> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col" colspan=2><u>Inventory Options menu</u></th><th scope="col" colspan=2><u>Replenishment menu</u></th><th scope="col" colspan=2><u>Document Reprints</u></th>
|
||||
</tr>
|
||||
<td><b>Picking</b></td> <!-- SWITCH Y/N -->
|
||||
<td class="text-center">
|
||||
<div class="form-check form-switch">
|
||||
<label for="sonar-input-6600a098cd" class="visually-hidden">MENU2OPT3</label>
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="MENU2OPT3" value="N" data-on="Y" data-off="N" aria-checked="false" id="sonar-input-6600a098cd">
|
||||
</div>
|
||||
</td>
|
||||
<td><b>Ticket processing</b></td> <!-- SWITCH Y/N Replenishment menu -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<label for="sonar-input-34905fd14f" class="visually-hidden">MENU3OPT1</label>
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="MENU3OPT1" value="N" data-on="Y" data-off="N" aria-checked="false" id="sonar-input-34905fd14f">
|
||||
</div>
|
||||
</td>
|
||||
<td><b>Document Reprints1</b></td> <!-- SWITCH Y/N Document Reprints menu -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<label for="sonar-input-962b09fa8c" class="visually-hidden">MENU4OPT1</label>
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="MENU4OPT1" value="N" data-on="Y" data-off="N" aria-checked="false" id="sonar-input-962b09fa8c">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Stock View Program</b></td> <!-- SWITCH Y/N -->
|
||||
<td class="text-center">
|
||||
<div class="form-check form-switch">
|
||||
<label for="sonar-input-2d1307dd34" class="visually-hidden">MENU2OPT7</label>
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="MENU2OPT7" value="N" data-on="Y" data-off="N" aria-checked="false" id="sonar-input-2d1307dd34">
|
||||
</div>
|
||||
</td>
|
||||
<td><b>Ticket reset</b></td> <!-- SWITCH Y/N Replenishment menu -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<label for="sonar-input-c82fe0a38a" class="visually-hidden">MENU3OPT2</label>
|
||||
<input class="form-check-input" type="checkbox" role="switch"name="MENU3OPT2" value="N" data-on="Y" data-off="N" aria-checked="false" id="sonar-input-c82fe0a38a">
|
||||
</div>
|
||||
</td>
|
||||
<td><b>Document Reprints2</b></td> <!-- SWITCH Y/N Document Reprints menu -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<label for="sonar-input-9de73b8a95" class="visually-hidden">MENU4OPT2</label>
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="MENU4OPT2" value="N" data-on="Y" data-off="N" aria-checked="false" id="sonar-input-9de73b8a95">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<td><b>Split Box Labels</b></td> <!-- SWITCH Y/N -->
|
||||
<td class="text-center">
|
||||
<div class="form-check form-switch">
|
||||
<label for="sonar-input-5afc785c7f" class="visually-hidden">MENU2OPT8</label>
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="MENU2OPT8" value="N" data-on="Y" data-off="N" aria-checked="false" id="sonar-input-5afc785c7f">
|
||||
</div>
|
||||
</td>
|
||||
<td colspan=2></td>
|
||||
<td><b>Document Reprints3</b></td> <!-- SWITCH Y/N Document Reprints menu -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<label for="sonar-input-d11c3d9636" class="visually-hidden">MENU4OPT3</label>
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="MENU4OPT3" value="N" data-on="Y" data-off="N" aria-checked="false" id="sonar-input-d11c3d9636">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col" colspan=2><u>Loading menu</u></th><th scope="col" colspan=2><u>Main menu</u></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Small parcel loading/closing</b></td> <!-- SWITCH Y/N -->
|
||||
<td class="text-center">
|
||||
<div class="form-check form-switch">
|
||||
<label for="sonar-input-7f45697209" class="visually-hidden">MENU5OPT1</label>
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="MENU5OPT1" value="N" data-on="Y" data-off="N" aria-checked="false" id="sonar-input-7f45697209">
|
||||
</div>
|
||||
</td>
|
||||
<td><b>Weekly Labor card entry</b></td> <!-- SWITCH Y/N -->
|
||||
<td class="text-center">
|
||||
<div class="form-check form-switch">
|
||||
<label for="sonar-input-97bd3e4192" class="visually-hidden">MENU6OPT1</label>
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="MENU6OPT1" value="N" data-on="Y" data-off="N" aria-checked="false" id="sonar-input-97bd3e4192">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Open dock door</b></td> <!-- SWITCH Y/N -->
|
||||
<td class="text-center">
|
||||
<div class="form-check form-switch">
|
||||
<label for="sonar-input-2a6256fe9b" class="visually-hidden">MENU5OPT2</label>
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="MENU5OPT2" value="N" data-on="Y" data-off="N" aria-checked="false" id="sonar-input-2a6256fe9b">
|
||||
</div>
|
||||
</td>
|
||||
<td><b>MACPAC</b></td> <!-- SWITCH Y/N -->
|
||||
<td class="text-center">
|
||||
<div class="form-check form-switch">
|
||||
<label for="sonar-input-ad632b9e62" class="visually-hidden">MENU6OPT2</label>
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="MENU6OPT2" value="N" data-on="Y" data-off="N" aria-checked="false" id="sonar-input-ad632b9e62">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Close dock door</b></td> <!-- SWITCH Y/N -->
|
||||
<td class="text-center">
|
||||
<div class="form-check form-switch">
|
||||
<label for="sonar-input-a07d5c2573" class="visually-hidden">MENU5OPT3</label>
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="MENU5OPT3" value="N" data-on="Y" data-off="N" aria-checked="false" id="sonar-input-a07d5c2573">
|
||||
</div>
|
||||
</td>
|
||||
<td><b>2Ship send/aggregate</b></td> <!-- SWITCH Y/N -->
|
||||
<td class="text-center">
|
||||
<div class="form-check form-switch">
|
||||
<label for="sonar-input-36ffe64b74" class="visually-hidden">MENU6OPT3</label>
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="MENU6OPT3" value="N" data-on="Y" data-off="N" aria-checked="false" id="sonar-input-36ffe64b74">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>LTL loading</b></td> <!-- SWITCH Y/N -->
|
||||
<td class="text-center">
|
||||
<div class="form-check form-switch">
|
||||
<label for="sonar-input-debe99b4bd" class="visually-hidden">MENU5OPT5</label>
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="MENU5OPT5" value="N" data-on="Y" data-off="N" aria-checked="false" id="sonar-input-debe99b4bd">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary close-modal" data-bs-dismiss="modal" id="closeAdd">Close</button>
|
||||
<button type="button" id="submitUserAdd" class="btn btn-primary" data-bs-dismiss="modal">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
+290
@@ -0,0 +1,290 @@
|
||||
<form id="frmEdit">
|
||||
<div class="modal" id="userEdit" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">User Edit</h5>
|
||||
<button type="button" class="btn-close close-modal" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="table-responsive" id="userEditData">
|
||||
<table role="presentation" class="table table-condensed">
|
||||
<tbody>
|
||||
<!-- R428DV R428PL R428WHS R428STS R428US R428FIRST R428FAMILY R428EMAIL R428EMPCDE R428ADMUSR R428PWRUSR -->
|
||||
<tr>
|
||||
<td>
|
||||
<table role="presentation" class="table table-condensed">
|
||||
<tr>
|
||||
<input type="hidden" id="OLD_R428CO" name="OLD_R428CO">
|
||||
<input type="hidden" id="OLD_R428PL" name="OLD_R428PL">
|
||||
<input type="hidden" id="OLD_R428WH" name="OLD_R428WH">
|
||||
<input type="hidden" id="R428CO" name="R428CO">
|
||||
<input type="hidden" id="R428PL" name="R428PL">
|
||||
<input type="hidden" id="R428WH" name="R428WH">
|
||||
<td><b>Status</b></td> <!-- Switch Active/Inactive -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" id="OLD_R428STS" name="OLD_R428STS">
|
||||
<label for="R428STS" class="visually-hidden">R428STS</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" id="R428STS" name="R428STS" data-on="A" data-off="I" aria-checked="false">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>User profile</b></td> <!-- ALPHA -->
|
||||
<td class="text-right">
|
||||
<input type="hidden" name="OLD_R428US" id="OLD_R428US">
|
||||
<label for="R428US" class="visually-hidden">R428US</label>
|
||||
<input type="text" maxlength="10" class="myinput toUpper" oninput="this.value = this.value.toUpperCase()" name="R428US" id="R428US" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>First Name</b></td> <!-- ALPHA -->
|
||||
<td class="text-right">
|
||||
<input type="hidden" name="OLD_R428FIRST" id="OLD_R428FIRST">
|
||||
<label for="R428FIRST" class="visually-hidden">R428FIRST</label>
|
||||
<input type="text" maxlength="20" class="myinput" oninput="this.value = this.value.toUpperCase()" name="R428FIRST" id="R428FIRST" required>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Family Name</b></td> <!-- ALPHA -->
|
||||
<td class="text-right">
|
||||
<input type="hidden" name="OLD_R428FAMILY" id="OLD_R428FAMILY">
|
||||
<label for="R428FAMILY" class="visually-hidden">R428FAMILY</label>
|
||||
<input type="text" maxlength="30" class="myinput" oninput="this.value = this.value.toUpperCase()" name="R428FAMILY" id="R428FAMILY" required>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Email</b></td> <!-- ALPHA -->
|
||||
<td class="text-right">
|
||||
<input type="hidden" name="OLD_R428EMAIL" id="OLD_R428EMAIL">
|
||||
<label for="R428EMAIL" class="visually-hidden">R428EMAIL</label>
|
||||
<input type="text" maxlength="100" class="myinput" oninput="this.value = this.value.toLowerCase()" id="R428EMAIL" required>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Employee code</b></td> <!-- MAX -->
|
||||
<td class="text-right">
|
||||
<input type="hidden" name="OLD_R428EMPCDE" id="OLD_R428EMPCDE">
|
||||
<label for="R428EMPCDE" class="visually-hidden">R428EMPCDE</label>
|
||||
<input type="number" min=0 max=9999 class="myinput" name="R428EMPCDE" id="R428EMPCDE" value=0 required>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="R428DPW" class="col-form-label"><b>Div-Plt-Whs:</b></label></td>
|
||||
<td>
|
||||
<div class="mb-3">
|
||||
<input type="hidden" name="OLD_R428DPW" id="OLD_R428DPW">
|
||||
<select class="form-select-sm" id="R428DPW" required>
|
||||
<option value="" selected disabled hidden>Select</option>
|
||||
@foreach ($IC670M as $key => $IC670MR)
|
||||
<option value="{{ trim($IC670MR->WDCO).trim($IC670MR->WDPL).trim($IC670MR->WDWHS) }}"
|
||||
data-co="{{ trim($IC670MR->WDCO) }}" data-pl="{{ trim($IC670MR->WDPL) }}" data-wh="{{ trim($IC670MR->WDWHS) }}" >
|
||||
{{ trim(Str::upper($IC670MR->WDWNAM)) }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<td><b>Admin user</b></td> <!-- SWITCH Y/N -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" id="OLD_R428ADMUSR" name="OLD_R428ADMUSR">
|
||||
<label for="R428ADMUSR" class="visually-hidden">R428ADMUSR</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" id="R428ADMUSR" name="R428ADMUSR" data-on="Y" data-off="N" aria-checked="false">
|
||||
</div>
|
||||
</td>
|
||||
<td><b>Power user</b></td> <!-- SWITCH Y/N -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" id="OLD_R428PWRUSR" name="OLD_R428PWRUSR">
|
||||
<label for="R428PWRUSR" class="visually-hidden">R428PWRUSR</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" id="R428PWRUSR" name="R428PWRUSR" data-on="Y" data-off="N" aria-checked="false">
|
||||
</div>
|
||||
</td>
|
||||
<td><b>CSR</b></td> <!-- SWITCH Y/N -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" id="OLD_R42811A" name="OLD_R42811A">
|
||||
<label for="R42811A" class="visually-hidden">R42811A</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" id="R42811A" name="R42811A" data-on="C" data-off="" aria-checked="false">
|
||||
</div>
|
||||
</td>
|
||||
<td><b>Executive</b></td> <!-- SWITCH Y/N -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" id="OLD_R42821A" name="OLD_R42821A">
|
||||
<label for="R42821A" class="visually-hidden">R42821A</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" id="R42821A" name="R42821A" data-on="Y" data-off="N" aria-checked="false">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col" colspan=2><u>Inventory Options menu</u></th><th scope="col" colspan=2><u>Replenishment menu</u></th><th scope="col" colspan=2><u>Document Reprints</u></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Picking</b></td> <!-- SWITCH Y/N Inventory Options menu -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" id="OLD_MENU2OPT3" name="OLD_MENU2OPT3">
|
||||
<label for="MENU2OPT3" class="visually-hidden">MENU2OPT3</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" id="MENU2OPT3" name="MENU2OPT3" data-on="Y" data-off="N" aria-checked="false">
|
||||
</div>
|
||||
</td>
|
||||
<td><b>Ticket processing</b></td> <!-- SWITCH Y/N Replenishment menu -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" id="OLD_MENU3OPT1" name="OLD_MENU3OPT1">
|
||||
<label for="MENU3OPT1" class="visually-hidden">MENU3OPT1</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" id="MENU3OPT1" name="MENU3OPT1" data-on="Y" data-off="N" aria-checked="false">
|
||||
</div>
|
||||
</td>
|
||||
<td><b>Document Reprints1</b></td> <!-- SWITCH Y/N Document Reprints menu -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" id="OLD_MENU4OPT1" name="OLD_MENU4OPT1">
|
||||
<label for="MENU4OPT1" class="visually-hidden">MENU4OPT1</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" id="MENU4OPT1" name="MENU4OPT1" data-on="Y" data-off="N" aria-checked="false">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Stock View Program</b></td> <!-- SWITCH Y/N Inventory Options menu -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" id="OLD_MENU2OPT7" name="OLD_MENU2OPT7">
|
||||
<label for="MENU2OPT7" class="visually-hidden">MENU2OPT7</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" id="MENU2OPT7" name="MENU2OPT7" data-on="Y" data-off="N" aria-checked="false">
|
||||
</div>
|
||||
</td>
|
||||
<td><b>Ticket reset</b></td> <!-- SWITCH Y/N Replenishment menu -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" id="OLD_MENU3OPT2" name="OLD_MENU3OPT2">
|
||||
<label for="MENU3OPT2" class="visually-hidden">MENU3OPT2</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" id="MENU3OPT2" name="MENU3OPT2" data-on="Y" data-off="N" aria-checked="false">
|
||||
</div>
|
||||
</td>
|
||||
<td><b>Document Reprints2</b></td> <!-- SWITCH Y/N Document Reprints menu -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" id="OLD_MENU4OPT2" name="OLD_MENU4OPT2">
|
||||
<label for="MENU4OPT2" class="visually-hidden">MENU4OPT2</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" id="MENU4OPT2" name="MENU4OPT2" data-on="Y" data-off="N" aria-checked="false">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Split Box Labels</b></td> <!-- SWITCH Y/N Inventory Options menu -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" id="OLD_MENU2OPT8" name="OLD_MENU2OPT8">
|
||||
<label for="MENU2OPT8" class="visually-hidden">MENU2OPT8</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" id="MENU2OPT8" name="MENU2OPT8" data-on="Y" data-off="N" aria-checked="false">
|
||||
</div>
|
||||
</td>
|
||||
<td></td><td></td>
|
||||
<td><b>Document Reprints3</b></td> <!-- SWITCH Y/N Document Reprints menu -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" id="OLD_MENU4OPT3" name="OLD_MENU4OPT3">
|
||||
<label for="MENU4OPT3" class="visually-hidden">MENU4OPT3</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" id="MENU4OPT3" name="MENU4OPT3" data-on="Y" data-off="N" aria-checked="false">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col" colspan=2><u>Loading menu</u></th><th scope="col" colspan=2><u>Main menu</u></th><th scope="col" colspan=2></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Small parcel loading/closing</b></td> <!-- SWITCH Y/N Loading menu -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" id="OLD_MENU5OPT1" name="OLD_MENU5OPT1">
|
||||
<label for="MENU5OPT1" class="visually-hidden">MENU5OPT1</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" id="MENU5OPT1" name="MENU5OPT1" data-on="Y" data-off="N" aria-checked="false">
|
||||
</div>
|
||||
</td>
|
||||
<td><b>Weekly Labor card entry</b></td> <!-- SWITCH Y/N Loading menu -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" id="OLD_MENU6OPT1" name="OLD_MENU6OPT1">
|
||||
<label for="MENU6OPT1" class="visually-hidden">MENU6OPT1</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" id="MENU6OPT1" name="MENU6OPT1" data-on="Y" data-off="N" aria-checked="false">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Open dock door</b></td> <!-- SWITCH Y/N Loading menu -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" id="OLD_MENU5OPT2" name="OLD_MENU5OPT2">
|
||||
<label for="MENU5OPT2" class="visually-hidden">MENU5OPT2</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" id="MENU5OPT2" name="MENU5OPT2" data-on="Y" data-off="N" aria-checked="false">
|
||||
</div>
|
||||
</td>
|
||||
<td><b>MACPAC</b></td> <!-- SWITCH Y/N Loading menu -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" id="OLD_MENU6OPT2" name="OLD_MENU6OPT2">
|
||||
<label for="MENU6OPT2" class="visually-hidden">MENU6OPT2</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" id="MENU6OPT2" name="MENU6OPT2" data-on="Y" data-off="N" aria-checked="false">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Close dock door</b></td> <!-- SWITCH Y/N Loading menu -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" id="OLD_MENU5OPT3" name="OLD_MENU5OPT3">
|
||||
<label for="MENU5OPT3" class="visually-hidden">MENU5OPT3</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" id="MENU5OPT3" name="MENU5OPT3" data-on="Y" data-off="N" aria-checked="false">
|
||||
</div>
|
||||
</td>
|
||||
<td><b>2Ship send/aggregate</b></td> <!-- SWITCH Y/N Loading menu -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" id="OLD_MENU6OPT3" name="OLD_MENU6OPT3">
|
||||
<label for="MENU6OPT3" class="visually-hidden">MENU6OPT3</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" id="MENU6OPT3" name="MENU6OPT3" data-on="Y" data-off="N" aria-checked="false">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>LTL loading</b></td> <!-- SWITCH Y/N Loading menu -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" id="OLD_MENU5OPT5" name="OLD_MENU5OPT5">
|
||||
<label for="MENU5OPT5" class="visually-hidden">MENU5OPT5</label>
|
||||
<input type="checkbox" class="form-check-input" role="switch" id="MENU5OPT5" name="MENU5OPT5" data-on="Y" data-off="N" aria-checked="false">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary close-modal" data-bs-dismiss="modal" id="closeEdit">Close</button>
|
||||
<button type="button" id="submitUserEdit" class="btn btn-primary" data-bs-dismiss="modal">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
<form id="frmPassword">
|
||||
<div class="modal" id="userPassword" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Enter Password to re-enable user</h5>
|
||||
<button type="button" class="btn-close close-modal" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="table-responsive" id="userPasswordData">
|
||||
<table role="presentation" class="table table-condensed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<table role="presentation" class="table table-condensed">
|
||||
<tr>
|
||||
<td><b>Enter a new password to re-enable user</b></td> <!-- Password -->
|
||||
<td class="text-right">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" name="R428US_PWD" id="R428US_PWD" value="">
|
||||
<label for="NEW_PASSWORD" class="visually-hidden">NEW PASSWORD</label>
|
||||
<input type="password" maxlength="10" length="7" class="myinput" name="NEW_PASSWORD" id="NEW_PASSWORD" required>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary close-modal" data-bs-dismiss="modal" id="closePassword">Close</button>
|
||||
<button type="button" id="submitUserPassword" data-R428US_PWD="" class="btn btn-primary" data-bs-dismiss="modal">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
<nav class="m3-module-nav" aria-label="M3 navigation">
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.index') ? 'is-active' : '' }}" href="{{ route('m3.index') }}"><i class="fas fa-gauge-high"></i><span>Dashboard</span></a>
|
||||
@if($execUser !== 'Y')
|
||||
@if($csr !== 'Y')
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.replenishmentSettings.*') ? 'is-active' : '' }}" href="{{ route('m3.replenishmentSettings.index') }}"><i class="fas fa-arrows-rotate"></i><span>Replenishment</span></a>
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.M3ErrorsDisplay.*') ? 'is-active' : '' }}" href="{{ route('m3.M3ErrorsDisplay.index') }}"><i class="fas fa-list-check"></i><span>Transactions</span></a>
|
||||
@endif
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.M3GetPDFFromCache.*') ? 'is-active' : '' }}" href="{{ route('m3.M3GetPDFFromCache.index') }}"><i class="fas fa-file-pdf"></i><span>Documents</span></a>
|
||||
@if($csr !== 'Y')
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.userControl') ? 'is-active' : '' }}" href="{{ route('m3.userControl') }}"><i class="fas fa-users-gear"></i><span>Users</span></a>
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.palletQty') ? 'is-active' : '' }}" href="{{ route('m3.palletQty') }}"><i class="fas fa-boxes-stacked"></i><span>Part Data</span></a>
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.M3Delivery') ? 'is-active' : '' }}" href="{{ route('m3.M3Delivery') }}"><i class="fas fa-truck"></i><span>Delivery</span></a>
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.OrderLinesOfClosedOrder') ? 'is-active' : '' }}" href="{{ route('m3.OrderLinesOfClosedOrder') }}"><i class="fas fa-file-excel"></i><span>Closed Orders</span></a>
|
||||
@if($power_users === 'Y' || $admin_users === 'Y')
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.carrierMaint') ? 'is-active' : '' }}" href="{{ route('m3.carrierMaint') }}"><i class="fas fa-route"></i><span>Carriers</span></a>
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.UserPickingStats4') || request()->routeIs('m3.UserPickingStats5') ? 'is-active' : '' }}" href="{{ route('m3.UserPickingStats4') }}"><i class="fas fa-chart-line"></i><span>Efficiency</span></a>
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.pendingClosure') ? 'is-active' : '' }}" href="{{ route('m3.pendingClosure') }}"><i class="fas fa-clock"></i><span>Pending Closure</span></a>
|
||||
@endif
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.ship-to.*') ? 'is-active' : '' }}" href="{{ route('m3.ship-to.index') }}"><i class="fas fa-warehouse"></i><span>Ship-to</span></a>
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.execsummary') || request()->routeIs('m3.execsummaryline') ? 'is-active' : '' }}" href="{{ route('m3.execsummary') }}"><i class="fas fa-chart-column"></i><span>KPI</span></a>
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.whsePerf*') ? 'is-active' : '' }}" href="{{ route('m3.whsePerf') }}"><i class="fas fa-chart-area"></i><span>OTTC</span></a>
|
||||
@endif
|
||||
@endif
|
||||
</nav>
|
||||
@@ -0,0 +1,78 @@
|
||||
<!-- jQuery -->
|
||||
<script src="{{ route('m3.assets', ['path' => 'liberty-theme/js/jquery.min.js']) }}"></script>
|
||||
|
||||
<!-- SB Admin -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity= "sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
|
||||
|
||||
@php
|
||||
// ReplenishSettingsController
|
||||
$routeArray = app('request')->route()->getAction();
|
||||
$controllerAction = class_basename($routeArray['controller']);
|
||||
// dump($controllerAction);
|
||||
list($controller, $action) = explode('@', $controllerAction);
|
||||
// dump($controller);
|
||||
@endphp
|
||||
|
||||
@if($controller != 'ReplenishSettingsController' && $controller != 'M3ErrorsDispController')
|
||||
<script src="{{ route('m3.assets', ['path' => 'liberty-theme/js/scripts.js']) }}"></script>
|
||||
@endif
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.js" crossorigin="anonymous"></script>
|
||||
<script src="{{ route('m3.assets', ['path' => 'liberty-theme/assets/demo/chart-area-demo.js']) }}"></script>
|
||||
<script src="{{ route('m3.assets', ['path' => 'liberty-theme/assets/demo/chart-bar-demo.js']) }}"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/simple-datatables@latest" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- Datatable -->
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js"></script>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js"></script>
|
||||
<script type="text/javascript" src="https://cdn.datatables.net/v/bs5/jszip-2.5.0/dt-1.11.3/af-2.3.7/b-2.0.1/b-colvis-2.0.1/b-html5-2.0.1/b-print-2.0.1/cr-1.5.4/date-1.1.1/fc-4.0.0/fh-3.2.0/kt-2.6.4/r-2.2.9/rg-1.1.3/rr-1.2.8/sc-2.0.5/sb-1.2.2/sp-1.4.0/sl-1.3.3/datatables.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="{{ route('m3.assets', ['path' => 'liberty-theme/js/datatables-simple-demo.js']) }}"></script>
|
||||
{{-- Data Bootstrap Responsive --}}
|
||||
<script type="text/javascript" src="https://cdn.datatables.net/responsive/2.4.1/js/dataTables.responsive.min.js"></script>
|
||||
<script type="text/javascript" src="https://cdn.datatables.net/responsive/2.4.1/js/responsive.bootstrap.min.js"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.20/jquery.datetimepicker.full.js"></script>
|
||||
<script src="{{ route('m3.assets', ['path' => 'liberty-theme/js/dataTables.altEditor.free.js']) }}"></script>
|
||||
|
||||
<!-- Morris Charts -->
|
||||
<script src="{{ route('m3.assets', ['path' => 'liberty-theme/js/morris.min.js']) }}"></script>
|
||||
<script src="{{ route('m3.assets', ['path' => 'liberty-theme/js/raphael.min.js']) }}"></script>
|
||||
|
||||
<!-- Date range picker -->
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
|
||||
|
||||
<!-- highcharts -->
|
||||
<script src="https://code.highcharts.com/highcharts.js"></script>
|
||||
<script src="https://code.highcharts.com/modules/sunburst.js"></script>
|
||||
<script src="https://code.highcharts.com/modules/exporting.js"></script>
|
||||
<script src="https://code.highcharts.com/modules/export-data.js"></script>
|
||||
<script src="https://code.highcharts.com/modules/accessibility.js"></script>
|
||||
|
||||
<!-- Fontawesome -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/js/all.min.js" crossorigin="anonymous"></script>
|
||||
|
||||
<script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
|
||||
<script>
|
||||
|
||||
window.addEventListener('DOMContentLoaded', event => {
|
||||
|
||||
// Toggle the side navigation
|
||||
const sidebarToggle = document.body.querySelector('#sidebarToggle');
|
||||
if (sidebarToggle) {
|
||||
// Uncomment Below to persist sidebar toggle between refreshes
|
||||
if (localStorage.getItem('sb|sidebar-toggle') === 'true') {
|
||||
document.body.classList.toggle('sb-sidenav-toggled');
|
||||
}
|
||||
sidebarToggle.addEventListener('click', event => {
|
||||
event.preventDefault();
|
||||
document.body.classList.toggle('sb-sidenav-toggled');
|
||||
localStorage.setItem('sb|sidebar-toggle', document.body.classList.contains('sb-sidenav-toggled'));
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,17 @@
|
||||
<link href="https://cdn.jsdelivr.net/npm/simple-datatables@latest/dist/style.css" rel="stylesheet" />
|
||||
<link href="{{ route('m3.assets', ['path' => 'liberty-theme/css/styles.css']) }}" rel="stylesheet" />
|
||||
<link href="{{ route('m3.assets', ['path' => 'liberty-theme/css/morris.css']) }}" rel="stylesheet" />
|
||||
|
||||
<!-- Date range picker -->
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />
|
||||
|
||||
<!-- Datatable -->
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs5/jszip-2.5.0/dt-1.11.3/af-2.3.7/b-2.0.1/b-colvis-2.0.1/b-html5-2.0.1/b-print-2.0.1/cr-1.5.4/date-1.1.1/fc-4.0.0/fh-3.2.0/kt-2.6.4/r-2.2.9/rg-1.1.3/rr-1.2.8/sc-2.0.5/sb-1.2.2/sp-1.4.0/sl-1.3.3/datatables.min.css"/>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.20/jquery.datetimepicker.css">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.11.0/css/dataTables.bootstrap5.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/responsive/2.4.1/css/responsive.bootstrap.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/2.0.0/css/buttons.bootstrap5.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/select/1.3.3/css/select.bootstrap5.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/datetime/1.1.1/css/dataTables.dateTime.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="https://editor.datatables.net/extensions/Editor/css/editor.bootstrap5.min.css" />
|
||||
@@ -0,0 +1,49 @@
|
||||
<div style="margin:10px 10px 0 10px;">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="card text-white bg-secondary mb-3">
|
||||
<div class="card-body">
|
||||
<p class="card-text" style="color:#FFF">
|
||||
|
||||
<b>Current Hold Code:</b> {{ $order->SHHLDC }}<br>
|
||||
<b>Order number:</b> {{ $request->order }}<br>
|
||||
<b>Order Date:</b> {{ date('m/d/Y', strtotime($order->SHORDT)) }}<br>
|
||||
<b>Order Status:</b> {{ $order->SHOST }}<br>
|
||||
<b>Fill Code:</b> {{ $order->SHALBO }}<br>
|
||||
@foreach ($releases as $key=>$val)
|
||||
<b>Open Releases on this order:</b> <a href="./{{ $val->SLONO }}-{{ $val->SLRLNO }}" style="color:white" >{{ $val->SLONO }}-{{ $val->SLRLNO }}
|
||||
<i class="fa fa-eye pull-right"></i></a><br>
|
||||
@endforeach
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="card-header" style="margin-bottom:20px">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<h5 class="card-title"><b>Order number:</b> {{ $request->order }}</h5>
|
||||
</div>
|
||||
<div class="col-sm-6 text-end">
|
||||
<h5 class="card-title"><b>Order Date:</b> {{ date('m/d/Y', strtotime($order->SHORDT)) }}</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="example" class="table table-striped" style="width:100%;margin-top:20px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>User</th>
|
||||
<th>Created Date</th>
|
||||
<th>Reminder Date</th>
|
||||
<th>Comment</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,78 @@
|
||||
<div style="margin:10px 10px 0 10px;">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="card text-white bg-secondary mb-3">
|
||||
<div class="card-body">
|
||||
<p class="card-text" style="color:#FFF">
|
||||
|
||||
<b>Current Hold Code:</b> {{ $order->SHHLDC }}<br>
|
||||
<b>Order number:</b> {{ $request->order }}<br>
|
||||
<b>Order Date:</b> {{ date('m/d/Y', strtotime($order->SHORDT)) }}<br>
|
||||
<b>Order Status:</b> {{ $order->SHOST }}<br>
|
||||
<b>Fill Code:</b> {{ $order->SHALBO }}<br>
|
||||
@foreach ($releases as $key=>$val)
|
||||
<b>Open Releases on this order:</b> <a href="./{{ $val->SLONO }}-{{ $val->SLRLNO }}" style="color:white" >{{ $val->SLONO }}-{{ $val->SLRLNO }}
|
||||
<i class="fa fa-eye pull-right"></i></a><br>
|
||||
@endforeach
|
||||
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="card-header">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<h5 class="card-title"><b>Order number:</b> {{ $request->order }}</h5>
|
||||
</div>
|
||||
<div class="col-sm-6 text-end">
|
||||
<h5 class="card-title"><b>Order Date:</b> {{ date('m/d/Y', strtotime($order->SHORDT)) }}</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><strong>Status</strong></td>
|
||||
<td><strong>Src Whse</strong></td>
|
||||
<td><strong>Part</strong></td>
|
||||
<td><strong>Description</strong></td>
|
||||
<td><strong>Fill Code</strong></td>
|
||||
<td><strong>Ord</strong></td>
|
||||
<td><strong>Bal</strong></td>
|
||||
<td><strong>Res</strong></td>
|
||||
<td><strong>onPick</strong></td>
|
||||
<td><strong>Price</strong></td>
|
||||
<td><strong>Extension</strong></td>
|
||||
<td><strong>Promise Date</strong></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($details as $key=>$detail)
|
||||
<tr>
|
||||
<td>{{ $detail->SLLNST }}</td>
|
||||
<td>{{ $detail->SLSRWH }}</td>
|
||||
<td>{{ $detail->SLPTNO }}</td>
|
||||
<td>{{ $detail->SLPTD1 }}</td>
|
||||
<td>{{ $detail->SLALBO }}</td>
|
||||
<td>{{ $detail->SLORQY }}</td>
|
||||
<td>{{ $detail->BALANCE }}</td>
|
||||
<td>{{ $detail->RESERVED }}</td>
|
||||
<td>{{ $detail->ONPICK }}</td>
|
||||
<td>{{ $detail->SLUNPR }}</td>
|
||||
<td>{{ $detail->SLEXPR }}</td>
|
||||
<td>{{ $detail->SLPRDT }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,166 @@
|
||||
<div style="margin:10px 10px 0 10px;">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="card text-white bg-secondary mb-3">
|
||||
<div class="card-body">
|
||||
<p class="card-text" style="color:#FFF">
|
||||
|
||||
<b>Current Hold Code:</b> {{ $order->SHHLDC }}<br>
|
||||
<b>Order number:</b> {{ $request->order }}<br>
|
||||
<b>Order Date:</b> {{ date('m/d/Y', strtotime($order->SHORDT)) }}<br>
|
||||
<b>Order Status:</b> {{ $order->SHOST }}<br>
|
||||
<b>Fill Code:</b> {{ $order->SHALBO }}<br>
|
||||
@foreach ($releases as $key=>$val)
|
||||
<b>Open Releases on this order:</b> <a href="./{{ $val->SLONO }}-{{ $val->SLRLNO }}" style="color:white"> {{ $val->SLONO }}-{{ $val->SLRLNO }}
|
||||
<i class="fa fa-eye pull-right"></i></a><br>
|
||||
@endforeach
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="card text-white bg-info mb-3" id="div1">
|
||||
<div class="card-header"><h5 class="card-title">Billed To <span class="text-end"># {{$order->SHCSTN}}</span></h5></div>
|
||||
<div class="card-body">
|
||||
<p class="card-text">
|
||||
|
||||
{!! (isset($order->SHSLNM)&&trim($order->SHSLNM)!=''?'<b>'.$order->SHSLNM."</b><br>":'') !!}
|
||||
{!! (isset($order->SHSLA1)&&trim($order->SHSLA1)!=''?$order->SHSLA1."<br>":'') !!}
|
||||
{!! (isset($order->SHSLA2)&&trim($order->SHSLA2)!=''?$order->SHSLA2."<br>":'') !!}
|
||||
{!! (isset($order->SHSLCI)&&trim($order->SHSLCI)!=''?$order->SHSLCI.", ":'') !!}
|
||||
{!! (isset($order->SHSLST)&&trim($order->SHSLST)!=''?$order->SHSLST.", ":'') !!}
|
||||
{!! (isset($order->SHSLZP)&&trim($order->SHSLZP)!=''?$order->SHSLZP."<br>":'') !!}
|
||||
{!! (isset($order->SHSLCT)&&trim($order->SHSLCT)!=''?$order->SHSLCT."<br>":'') !!}
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
|
||||
<div id="shipTo">
|
||||
|
||||
<div class="card text-white bg-info mb-3" id="div2">
|
||||
<div class="card-header">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<h5 class="card-title">Shipped To <span class="text-end"># {{$order->SHSTCN}}</span></h5>
|
||||
</div>
|
||||
<div class="col-sm-6 text-end">
|
||||
@if ($order->SHHLDC=="F" && $order->SHOST=="Open" && $authuser[0]->COUNT!=0)
|
||||
<h5 class="card-title" id="shipToEdit_click" data-toggle="modal" style="cursor:pointer"><i class="fa fa-edit pull-right" ></i></h5>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p class="card-text">
|
||||
|
||||
{!! (isset($order->SHSHNM)&&trim($order->SHSHNM)!=''?'<b>'.$order->SHSHNM."</b><br>":'') !!}
|
||||
{!! (isset($order->SHSHA1)&&trim($order->SHSHA1)!=''?$order->SHSHA1."<br>":'') !!}
|
||||
{!! (isset($order->SHSHA2)&&trim($order->SHSHA2)!=''?$order->SHSHA2."<br>":'') !!}
|
||||
{!! (isset($order->SHSHA3)&&trim($order->SHSHA3)!=''?$order->SHSHA3."<br>":'') !!}
|
||||
{!! (isset($order->SHSHCI)&&trim($order->SHSHCI)!=''?$order->SHSHCI.", ":'') !!}
|
||||
{!! (isset($order->SHSHST)&&trim($order->SHSHST)!=''?$order->SHSHST.", ":'') !!}
|
||||
{!! (isset($order->SHSHZP)&&trim($order->SHSHZP)!=''?$order->SHSHZP."<br>":'') !!}
|
||||
{!! (isset($order->SHSHCT)&&trim($order->SHSHCT)!=''?$order->SHSHCT."<br>":'') !!}
|
||||
|
||||
@if ($order->SHHLDC=="F" && $order->SHOST=="Open" && $authuser[0]->COUNT!=0)
|
||||
<div class="btn btn-light" style="cursor:pointer; margin-top:15px; display:block" id="shipToCheckBox_click" data-toggle="modal">Ignore address checker error and process as is</div>
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="orderData">
|
||||
|
||||
@if($order->SHHLDC=="F" && count($reasonForF)>=1)
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title">Reasons for code F</h5>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><strong>Date/Time</strong></td>
|
||||
<td><strong>Message</strong></td>
|
||||
<td class="text-end"><strong>Code</strong></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($reasonForF as $key=>$whyF)
|
||||
<tr>
|
||||
<td>{{ date('m/d/Y', strtotime($whyF->AMDATENT ))}} {{ date('H:i:s', strtotime($whyF->AMTIMENT ))}}</td>
|
||||
<td>{{ $whyF->AMCOMM }}</td>
|
||||
<td class="text-end">{{ $whyF->AMERRCDE }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:20px;"></div>
|
||||
@endif
|
||||
|
||||
@if($order->SHHLDC!="F" && count($reasonOther['message'])>=1)
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title">Exemption Reasons</h5>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><strong>Message</strong></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($reasonOther['message'] as $key=>$why)
|
||||
<tr>
|
||||
<td>{{ $why }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:20px;"></div>
|
||||
@endif
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><strong>Date</strong></td>
|
||||
<td><strong>Comment</strong></td>
|
||||
<td class="text-end"><strong>Print Code</strong></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($comments as $key=>$comment)
|
||||
<tr>
|
||||
<td>{{ date('m/d/Y', strtotime($comment->SCCRDT ))}}</td>
|
||||
<td>{{ $comment->SCCM }}</td>
|
||||
<td class="text-end">{{ $comment->SCCMPR }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,36 @@
|
||||
<nav class="sb-topnav navbar navbar-expand navbar-dark bg-dark">
|
||||
<!-- Navbar Brand-->
|
||||
<a class="navbar-brand ps-3" href="index.html">Sentinel API Dashboard</a>
|
||||
<!-- Sidebar Toggle-->
|
||||
<button class="btn btn-link btn-sm order-1 order-lg-0 me-4 me-lg-0" id="sidebarToggle" href="#!"><i class="fas fa-bars"></i></button>
|
||||
<div class="d-none d-md-inline-block form-inline ms-auto me-0 me-md-3 my-2 my-md-0"></div>
|
||||
<!-- Navbar-->
|
||||
<ul class="navbar-nav ms-auto ms-md-0 me-3 me-lg-4">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" id="navbarDropdown" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false"><i class="fas fa-user fa-fw"></i></a>
|
||||
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
|
||||
<li><a class="dropdown-item" href="/logout">Logout</a></li>
|
||||
@if($execUser=='Y' || $csr=="Y" || $admin_users=='Y')
|
||||
{{-- <li><a class="dropdown-item" href="/userprofile">Change Warehouse</a></li> --}}
|
||||
<li>
|
||||
<div class="form-group">
|
||||
<label for="R428DPWSel">Div-Plt-Whs</label>
|
||||
<select class="form-select" id="R428DPWSel">
|
||||
<option value="" disabled hidden>Select</option>
|
||||
@foreach ($IC670MAllWHS as $key => $IC670MR)
|
||||
@php
|
||||
$selected = $UserCO == $IC670MR->WDCO && $UserWHS == $IC670MR->WDWHS && $UserPL == $IC670MR->WDPL ? 'selected' : '';
|
||||
@endphp
|
||||
<option value="{{ trim($IC670MR->WDCO).trim($IC670MR->WDPL).trim($IC670MR->WDWHS) }}" {{ $selected }}>
|
||||
{{ trim(Str::upper($IC670MR->WDWNAM)) }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
Reference in New Issue
Block a user