From e2e30ea03952e0b7a6b1e695adcea14d97f3aa8b Mon Sep 17 00:00:00 2001 From: Djonathan Date: Fri, 17 Jun 2022 10:11:24 -0300 Subject: [PATCH] Corrections and minor adjustments in the api. --- app/Repositories/Pld/PldRepository.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Repositories/Pld/PldRepository.php b/app/Repositories/Pld/PldRepository.php index fb64c1b..1bceee7 100644 --- a/app/Repositories/Pld/PldRepository.php +++ b/app/Repositories/Pld/PldRepository.php @@ -44,8 +44,9 @@ class PldRepository extends AbstractRepository implements PldContractInterface DB::raw("SUM(pld.valor) as value") ]; + // Carbon::now()->format('m/Y') 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']) ->get(); }