updates to M3 module
This commit is contained in:
@@ -17,10 +17,19 @@ class carrierMaintController extends Controller
|
||||
public static function index(Request $request) {
|
||||
$currentUser = Helper::getUserCOWHSPLT();
|
||||
$UserCO = $currentUser['UserCO'] ?? '';
|
||||
$ICM160M = DB::connection(config('m3.connection', 'pgsql'))->select("
|
||||
select canum, canam, substr(CATPID,1,3) as TwoshipCarrierCode, substr(CATPID,4,1) as ParcelCarrierCode, caspr10A01, caspr1A01
|
||||
from icm160m WHERE CACO='$UserCO'");
|
||||
$power_user = DB::connection(config('m3.connection', 'pgsql'))->select("select R428PWRUSR, R428CO, R428PL, R428WH from ICM428M where R428US='".strtoUpper(m3_user())."'");
|
||||
$ICM160M = [];
|
||||
$power_user = [];
|
||||
$schema = \Illuminate\Support\Facades\Schema::connection(config('m3.connection', 'pgsql'));
|
||||
if ($schema->hasTable('icm160m')) {
|
||||
$ICM160M = DB::connection(config('m3.connection', 'pgsql'))->select("
|
||||
select canum, canam, substr(CATPID,1,3) as TwoshipCarrierCode, substr(CATPID,4,1) as ParcelCarrierCode, caspr10A01, caspr1A01
|
||||
from icm160m WHERE CACO=?", [$UserCO]);
|
||||
}
|
||||
if ($schema->hasTable('icm428m')) {
|
||||
$power_user = DB::connection(config('m3.connection', 'pgsql'))->table('icm428m')
|
||||
->select('R428PWRUSR', 'R428CO', 'R428PL', 'R428WH')
|
||||
->where('R428US', strtoUpper(m3_user()))->get()->all();
|
||||
}
|
||||
return view('m3::liberty-theme.pages.carrierMaint', compact('ICM160M','power_user'));
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user