|
|
@@ -179,10 +179,7 @@ class RecordINOUT extends Component
|
|
|
}
|
|
|
|
|
|
public function show($m, $y)
|
|
|
- //public function show($dt)
|
|
|
{
|
|
|
- //list($m, $y) = explode("_", $dt);
|
|
|
-
|
|
|
if ($m != "" && $y != "" && !in_array($m . "-" . $y, $this->datas))
|
|
|
$this->datas[] = $m . "-" . $y;
|
|
|
|
|
|
@@ -196,16 +193,11 @@ class RecordINOUT extends Component
|
|
|
{
|
|
|
foreach($this->datas as $filter)
|
|
|
{
|
|
|
- // $filter = $m . "-" . $this->year;
|
|
|
-
|
|
|
$this->columns[] = $filter;
|
|
|
|
|
|
$f = $filter;
|
|
|
if ($m == 'x')
|
|
|
$f = str_replace("x-", "", $filter);
|
|
|
-
|
|
|
- //$dt = $y . "-0" . $m;
|
|
|
-
|
|
|
$records = \App\Models\Record::where('type', 'IN')
|
|
|
->join('records_rows', 'records.id', '=', 'records_rows.record_id')
|
|
|
->whereNotIn('records_rows.causal_id', $this->excludeCausals)
|
|
|
@@ -216,12 +208,8 @@ class RecordINOUT extends Component
|
|
|
$query->where('financial_movement', false)->orWhere('financial_movement', null);
|
|
|
})
|
|
|
->whereNotIn('member_id', $exclude_from_records)
|
|
|
- /*->where(function ($query) use ($f, $dt) {
|
|
|
- $query->where('records.date', 'like', '%' . $dt . '%')->orWhere('records_rows.when', 'like', '%' . $f . '%');
|
|
|
- })*/
|
|
|
->where('records_rows.when', 'like', '%"' . $f . '"%')
|
|
|
->get();
|
|
|
- //$records = $records->orderBy('date', 'DESC')->get();
|
|
|
|
|
|
foreach($records as $record)
|
|
|
{
|
|
|
@@ -251,9 +239,10 @@ class RecordINOUT extends Component
|
|
|
->where(function ($query) {
|
|
|
$query->where('financial_movement', false)->orWhere('financial_movement', null);
|
|
|
})
|
|
|
- ->whereNotIn('member_id', $exclude_from_records)
|
|
|
+ ->orWhere(function ($subquery) use ($exclude_from_records) {
|
|
|
+ $subquery->whereNotIn('member_id', $exclude_from_records);
|
|
|
+ })
|
|
|
->where('records_rows.when', 'like', '%"' . $f . '"%')->get();
|
|
|
- //$records = $records->orderBy('date', 'DESC')->get();
|
|
|
|
|
|
foreach($records as $record)
|
|
|
{
|