Report designer montly filter

Post Reply
p.dimitrov
Posts: 166
Joined: 12 Jul 2017, 09:35
Name: Pavel
Location: Varna

Report designer montly filter

Post by p.dimitrov »

When using filter by month for example "2024-01" for some reason the dash acts as a minus sign and resulting filter is "2023", instead of orders for january 2024 the filter show all orders for 2023 instead. The dates format is set to "dd.mm.Y" in app config if that matters.
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Report designer montly filter

Post by support »

Please reproduce issue on personal demo https://www.rukovoditel.net/demo.php
p.dimitrov
Posts: 166
Joined: 12 Jul 2017, 09:35
Name: Pavel
Location: Varna

Re: Report designer montly filter

Post by p.dimitrov »

User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Report designer montly filter

Post by support »

The correct value in php code should be

Code: Select all

$date = '[filter_by_date]';
because [filter_by_date] is string.
p.dimitrov
Posts: 166
Joined: 12 Jul 2017, 09:35
Name: Pavel
Location: Varna

Re: Report designer montly filter

Post by p.dimitrov »

Ok, that shows correct value in php but as far as I see still not filtering right though:
-I have inserted 2 records in 01.2024 and 1 in 12.2023
-the counter is showing 0 records when the correct month is chosen in dropdown
-when I select 2025-01 (equals 2024) it's showing 2 records
-when I select 2024-01 (equals 2023) it's showing 1 records
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Report designer montly filter

Post by support »

Can be issue with time zone I think. This issue due to mysql query.
p.dimitrov
Posts: 166
Joined: 12 Jul 2017, 09:35
Name: Pavel
Location: Varna

Re: Report designer montly filter

Post by p.dimitrov »

Figured it out I think:

It should be '[filter_by_date]' in query otherwise with only [filter_by_date] won't work.
Storing it in php var $date = '[filter_by_date]' and using $date for filter also doesn't work, only '[filter_by_date]'.
Post Reply