m3 Security Fixes
This commit is contained in:
@@ -33,7 +33,7 @@ class execSummaryController extends Controller
|
||||
}
|
||||
|
||||
$reportPeriod = isset($request->reportPeriod) ? $request->reportPeriod : ''; # monthly , quarter , year , daily
|
||||
# Current
|
||||
# Current
|
||||
$checkSales = isset($request->checkSales) ? $request->checkSales : ''; # on
|
||||
$checkWeight = isset($request->checkWeight) ? $request->checkWeight : ''; # on
|
||||
$checkLines = isset($request->checkLines) ? $request->checkLines : ''; # on
|
||||
@@ -49,14 +49,14 @@ class execSummaryController extends Controller
|
||||
$toreportDate = $lastDay->modify('last day of December')->format('Ymd');
|
||||
|
||||
# Build SQL
|
||||
$selectContent = "with tempfile as (
|
||||
$selectContent = "with tempfile as (
|
||||
select a5rsvqty,a5packed,a5slunpr*a5packed as dollars,a5lnwght,a5whs,
|
||||
(select max(ayapr8N002) as ayapr8N002 from icm695m1 where a5macpkr=aymacpkr fetch first 1 rows only)
|
||||
from icm688m2 where a5macpkr in (
|
||||
select distinct aymacpkr from icm695m1 where (AYSTATUS in ('Z','z') and ayapr8N002>=$reportDate and ayapr8N002<=$toreportDate )
|
||||
) and a5co='".$CO."' and a5whs in(".implode(",", $WHArr).")
|
||||
)
|
||||
select substr(ayapr8N002,1,4) as years,count(*) as lines,sum(a5rsvqty) as reserveqty,sum(a5packed) as packed,sum(a5lnwght*a5packed/a5rsvqty) as weight,sum(dollars) as dollars,a5whs as whs from tempfile
|
||||
(select max(ayapr8N002) as ayapr8N002 from icm695m1 where a5macpkr=aymacpkr fetch first 1 rows only)
|
||||
from icm688m2 where a5macpkr in (
|
||||
select distinct aymacpkr from icm695m1 where (AYSTATUS in ('Z','z') and ayapr8N002>=$reportDate and ayapr8N002<=$toreportDate )
|
||||
) and a5co='".$CO."' and a5whs in(".implode(",", $WHArr).")
|
||||
)
|
||||
select substr(ayapr8N002,1,4) as years,count(*) as lines,sum(a5rsvqty) as reserveqty,sum(a5packed) as packed,sum(a5lnwght*a5packed/a5rsvqty) as weight,sum(dollars) as dollars,a5whs as whs from tempfile
|
||||
group by substr(ayapr8N002,1,4),a5whs order by 1 ";
|
||||
break;
|
||||
|
||||
@@ -69,16 +69,16 @@ class execSummaryController extends Controller
|
||||
$toreportDate = $lastDay->modify('last day of December')->format('Ymd');
|
||||
|
||||
# Build SQL
|
||||
$selectContent = "with tempfile as (
|
||||
$selectContent = "with tempfile as (
|
||||
select a5rsvqty,a5packed,a5slunpr*a5packed as dollars,a5lnwght,a5whs,
|
||||
(select max(ayapr8N002) as ayapr8N002 from icm695m1 where a5macpkr=aymacpkr fetch first 1 rows only)
|
||||
from icm688m2 where a5macpkr in (
|
||||
select distinct aymacpkr from icm695m1 where (AYSTATUS in ('Z','z') and ayapr8N002>=$reportDate and ayapr8N002<=$toreportDate )
|
||||
(select max(ayapr8N002) as ayapr8N002 from icm695m1 where a5macpkr=aymacpkr fetch first 1 rows only)
|
||||
from icm688m2 where a5macpkr in (
|
||||
select distinct aymacpkr from icm695m1 where (AYSTATUS in ('Z','z') and ayapr8N002>=$reportDate and ayapr8N002<=$toreportDate )
|
||||
) and a5co='".$CO."' and a5whs in (".implode(",", $WHArr).")
|
||||
)
|
||||
)
|
||||
select substr(ayapr8N002,3,2) ||'-' || 'Q' || EXTRACT(QUARTER FROM TO_DATE(CAST(ayapr8n002 AS TEXT),'YYYYMMDD')) as years,count(*) as lines,
|
||||
sum(a5rsvqty) as reserveqty, sum(a5packed) as packed,sum (a5lnwght*a5packed/a5rsvqty) as weight,sum(dollars) as dollars, a5whs as whs
|
||||
from tempfile
|
||||
from tempfile
|
||||
group by substr(ayapr8N002,3,2) ||'-' || 'Q' || EXTRACT(QUARTER FROM TO_DATE(CAST(ayapr8n002 AS TEXT),'YYYYMMDD')),a5whs order by 1 ";
|
||||
break;
|
||||
|
||||
@@ -91,16 +91,16 @@ class execSummaryController extends Controller
|
||||
$toreportDate =$lastDay->modify('last day of this month')->format('Ymd');
|
||||
|
||||
# Build SQL
|
||||
$selectContent = "with tempfile as (
|
||||
$selectContent = "with tempfile as (
|
||||
select a5rsvqty,a5packed,a5slunpr*a5packed as dollars,a5lnwght,a5whs,
|
||||
(select max(ayapr8N002) as ayapr8N002 from icm695m1 where a5macpkr=aymacpkr fetch first 1 rows only)
|
||||
from icm688m2 where a5macpkr in (
|
||||
select distinct aymacpkr from icm695m1 where (AYSTATUS in ('Z','z') and ayapr8N002>=$reportDate and ayapr8N002<=$toreportDate )
|
||||
(select max(ayapr8N002) as ayapr8N002 from icm695m1 where a5macpkr=aymacpkr fetch first 1 rows only)
|
||||
from icm688m2 where a5macpkr in (
|
||||
select distinct aymacpkr from icm695m1 where (AYSTATUS in ('Z','z') and ayapr8N002>=$reportDate and ayapr8N002<=$toreportDate )
|
||||
) and a5co='".$CO."' and a5whs in (".implode(",", $WHArr).")
|
||||
)
|
||||
)
|
||||
select substr(ayapr8N002,1,4) || '-' || substr(ayapr8N002,5,2) as years,count(*) as lines,sum(a5rsvqty) as reserveqty,sum(a5packed) as packed,
|
||||
sum(a5lnwght*a5packed/a5rsvqty) as weight,sum(dollars) as dollars, a5whs as whs
|
||||
from tempfile
|
||||
from tempfile
|
||||
group by substr(ayapr8N002,1,4) || '-' || substr(ayapr8N002,5,2),a5whs order by 1 ";
|
||||
break;
|
||||
|
||||
@@ -114,16 +114,16 @@ class execSummaryController extends Controller
|
||||
// $toreportDate =$lastDay->modify('last day of this month')->format('Ymd');
|
||||
|
||||
# Build SQL
|
||||
$selectContent = "with tempfile as (
|
||||
$selectContent = "with tempfile as (
|
||||
select a5rsvqty,a5packed,a5slunpr*a5packed as dollars,a5lnwght,a5whs,
|
||||
(select max(ayapr8N002) as ayapr8N002 from icm695m1 where a5macpkr=aymacpkr fetch first 1 rows only)
|
||||
from icm688m2 where a5macpkr in (
|
||||
select distinct aymacpkr from icm695m1 where (AYSTATUS in ('Z','z') and ayapr8N002>=$reportDate and ayapr8N002<=$toreportDate )
|
||||
(select max(ayapr8N002) as ayapr8N002 from icm695m1 where a5macpkr=aymacpkr fetch first 1 rows only)
|
||||
from icm688m2 where a5macpkr in (
|
||||
select distinct aymacpkr from icm695m1 where (AYSTATUS in ('Z','z') and ayapr8N002>=$reportDate and ayapr8N002<=$toreportDate )
|
||||
) and a5co='".$CO."' and a5whs in (".implode(",", $WHArr).")
|
||||
)
|
||||
)
|
||||
select substr(ayapr8N002,7,2) as years,count(*) as lines,sum(a5rsvqty) as reserveqty,sum(a5packed) as packed,
|
||||
sum(a5lnwght*a5packed/a5rsvqty) as weight, sum(dollars) as dollars, a5whs as whs
|
||||
from tempfile
|
||||
from tempfile
|
||||
group by substr(ayapr8N002,7,2),a5whs order by 1 ";
|
||||
break;
|
||||
|
||||
@@ -155,7 +155,7 @@ class execSummaryController extends Controller
|
||||
->select('R428US','R428CO', 'R428WH','R428PL')
|
||||
->where('R428US','=',$SHUSER)
|
||||
->first();
|
||||
|
||||
|
||||
$R428US = isset($ICM428M->R428US) ? $ICM428M->R428US : ''; # User
|
||||
$COMPANY = isset($ICM428M->R428CO) ? $ICM428M->R428CO : '110'; # Company
|
||||
$PLANT = isset($ICM428M->R428PL) ? $ICM428M->R428PL : '144'; # Plant
|
||||
@@ -168,7 +168,7 @@ class execSummaryController extends Controller
|
||||
}
|
||||
catch (\Throwable $th) {
|
||||
Log::error($th);
|
||||
}
|
||||
}
|
||||
|
||||
return view('m3::liberty-theme.pages.execSummary',compact('IC670M','WHDDA'));
|
||||
// ,'ICM688M2',,'COMPANY','PLANT','WHS','reportDate'
|
||||
|
||||
Reference in New Issue
Block a user