updates to M3 module

This commit is contained in:
Mark Gregory
2026-09-16 16:55:33 +01:00
parent 0237b1dc2a
commit 14357ade4d
2 changed files with 8 additions and 6 deletions
@@ -97,7 +97,9 @@ class userPickingStats4 extends Controller
#echo "$sqlstmt<br>";
$lbpf1 = DB::connection(config('m3.connection', 'pgsql'))->select($sqlstmt);
$lbpf1 = $schema->hasTable('lbpf')
? DB::connection(config('m3.connection', 'pgsql'))->select($sqlstmt)
: [];
$lbpf = 0;
foreach ($lbpf1 as $key => $val) {
@@ -107,7 +109,7 @@ class userPickingStats4 extends Controller
$sql = "select * from perfstat where dt='$starting' and a5pickcomu='$user' ";
#@dd($sql);
if (isset($request->dates) || isset($request->user)) {
if ((isset($request->dates) || isset($request->user)) && $schema->hasTable('perfstat')) {
$statistic4 = DB::connection(config('m3.connection', 'pgsql'))->select($sql);
} else {
$statistic4 = array();
@@ -306,7 +308,7 @@ class userPickingStats4 extends Controller
#error_log("Time required to xyz: " . $duration . "\n", 3, "/temp/v4.log");
return view(
'liberty-theme.pages.userPickingStats4',
'm3::liberty-theme.pages.userPickingStats4',
compact('statistic4', 'starting', 'user', 'user_array', 'monitor_array', 'totals_array', 'perf_array', 'request', 'no_data')
);
@@ -9,9 +9,9 @@
<div class="card mb-4">
<div class="card-header">
@if($power_user[0]->R428PWRUSR=="Y")
@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>
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>
@@ -39,7 +39,7 @@
<tr>
<td></td>
<td align="center">
@if($power_user[0]->R428PWRUSR=="Y")
@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)}}"