m3 Security Fixes

This commit is contained in:
Mark Gregory
2026-09-16 17:14:26 +01:00
parent 1602bdd72e
commit d68687f062
78 changed files with 1297 additions and 1228 deletions
@@ -19,7 +19,7 @@
<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
@php
$REPORTDATEDisp = old('REPORTDATEDisp') ?? \DateTime::createFromFormat('Ymd',$REPORTDATEDisp)->format('Y-m-d');
@endphp
<div class="col">
@@ -32,8 +32,8 @@
<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) }}"
<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>
@@ -68,7 +68,7 @@
<th>Close Date</th>
<th>Delivery #</th>
<th>Order #</th>
<th>Terms</th>
<th>Weight</th>
<th>Carrier</th>
@@ -255,7 +255,7 @@
],
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'
@@ -264,19 +264,19 @@
? 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 });;
api.column(13).footer().innerHTML = total.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 });;
}
});
// Update Division/WH/Plant on Warehouse change
// 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"));