Fix date conversion in getCaptiveMonthlyEconomy method to ensure accurate date range filtering
This commit is contained in:
parent
35e5a4a9bb
commit
21ad4e4b0b
@ -121,7 +121,7 @@ class EconomyRepository extends AbstractRepository implements EconomyContractInt
|
|||||||
->whereBetween(
|
->whereBetween(
|
||||||
DB::raw("TO_DATE(economia.mes, 'YYMM')"),
|
DB::raw("TO_DATE(economia.mes, 'YYMM')"),
|
||||||
[
|
[
|
||||||
DB::raw("TO_DATE(TO_CHAR(current_date , 'YYYY-01-01'), 'YYYY-MM-DD') - interval '13' month"),
|
DB::raw("TO_DATE(TO_CHAR(current_date , 'YYYY-MM-DD'), 'YYYY-MM-DD') - interval '13' month"),
|
||||||
DB::raw("TO_DATE(TO_CHAR(current_date, 'YYYY-MM-DD'), 'YYYY-MM-DD') ")
|
DB::raw("TO_DATE(TO_CHAR(current_date, 'YYYY-MM-DD'), 'YYYY-MM-DD') ")
|
||||||
])
|
])
|
||||||
// ->whereRaw("TO_DATE(economia.mes, 'YYMM') >= TO_DATE(TO_CHAR(current_date , 'YYYY-01-01'), 'YYYY-MM-DD') - INTERVAL '0' year")
|
// ->whereRaw("TO_DATE(economia.mes, 'YYMM') >= TO_DATE(TO_CHAR(current_date , 'YYYY-01-01'), 'YYYY-MM-DD') - INTERVAL '0' year")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user