Corrections and minor adjustments in the api.

This commit is contained in:
Djonathan 2022-06-17 10:11:24 -03:00
parent 5cc94f4744
commit e2e30ea039

View File

@ -44,8 +44,9 @@ class PldRepository extends AbstractRepository implements PldContractInterface
DB::raw("SUM(pld.valor) as value") DB::raw("SUM(pld.valor) as value")
]; ];
// Carbon::now()->format('m/Y')
return $this->execute($fields) return $this->execute($fields)
->where( DB::raw("TO_CHAR(TO_DATE(pld.mes_ref, 'YYMM'), 'MM/YYYY')"), '=', Carbon::now()->format('m/Y')) ->where( DB::raw("TO_CHAR(TO_DATE(pld.mes_ref, 'YYMM'), 'MM/YYYY')"), '=', '04/2022')
->groupBy(['submarket', 'year_month', 'year_month_formatted']) ->groupBy(['submarket', 'year_month', 'year_month_formatted'])
->get(); ->get();
} }