M3 Integration fixes
This commit is contained in:
@@ -13,11 +13,11 @@ class PalletQtyController extends Controller
|
||||
public static function index(Request $request)
|
||||
{
|
||||
$connection = config('m3.connection', 'pgsql');
|
||||
$power_user = (object) ['R428PWRUSR' => 'N', 'R428US' => strtoupper(m3_user()), 'R428CO' => '', 'R428PL' => '', 'R428WH' => ''];
|
||||
$power_user = (object) ['R428PWRUSR' => 'N', 'R428US' => strtoupper(m3User()), 'R428CO' => '', 'R428PL' => '', 'R428WH' => ''];
|
||||
if (Schema::connection($connection)->hasTable('icm428m')) {
|
||||
$power_user = DB::connection($connection)->table('icm428m')
|
||||
->select('R428PWRUSR', 'R428US', 'R428CO', 'R428PL', 'R428WH')
|
||||
->where('R428US', '=', strtoupper(m3_user()))->first() ?? $power_user;
|
||||
->where('R428US', '=', strtoupper(m3User()))->first() ?? $power_user;
|
||||
}
|
||||
$co = $power_user->R428CO;
|
||||
$plant = $power_user->R428PL;
|
||||
|
||||
Reference in New Issue
Block a user