- Posts: 25
- Home
- Forum
- Community Forum
- Questions
- Tariffs
- Tax on the payment surcharge or discount
"Order by date" in Complex Tariff
- fabrikastyle
- Topic Author
- Offline
Less
More
10 years 2 months ago - 10 years 2 months ago #5135
by fabrikastyle
"Order by date" in Complex Tariff was created by fabrikastyle
Hi!
For example I have Tariffs for 3 diferent seasons.
- Fabruary-Mart - 200$,
- April 300$
- May - 400$
In front-end they appear in the same order. But if I would like to break first period for 2 periods (Fabruary and March),
tariff;s table ordered by ID and looks like this:
- Fabruary- 200$ (changed Fabruary-Mart period)
- April 300$
- May - 400$
- March - 250$.
Is it possible to ORDER array by "valid_from" ?
Thank you!
For example I have Tariffs for 3 diferent seasons.
- Fabruary-Mart - 200$,
- April 300$
- May - 400$
In front-end they appear in the same order. But if I would like to break first period for 2 periods (Fabruary and March),
tariff;s table ordered by ID and looks like this:
- Fabruary- 200$ (changed Fabruary-Mart period)
- April 300$
- May - 400$
- March - 250$.
Is it possible to ORDER array by "valid_from" ?
Thank you!
Last edit: 10 years 2 months ago by fabrikastyle.
Please Log in or Create an account to join the conversation.
- vietvh
-
- Offline
Less
More
- Posts: 1553
10 years 2 months ago #5138
by vietvh
Replied by vietvh on topic "Order by date" in Complex Tariff
Hi,
Sure, it is possible with simple modification:
1. Oepn file /administrator/components/com_solidres/models/tariffs.php
2. Replace line 155:
With these lines:
Hope this helps,
Sure, it is possible with simple modification:
1. Oepn file /administrator/components/com_solidres/models/tariffs.php
2. Replace line 155:
return $query;
With these lines:
$query->order('t.valid_from ASC');
return $query;
Hope this helps,
The following user(s) said Thank You: fabrikastyle
Please Log in or Create an account to join the conversation.
- fabrikastyle
- Topic Author
- Offline
Less
More
- Posts: 25
10 years 2 months ago #5176
by fabrikastyle
Replied by fabrikastyle on topic "Order by date" in Complex Tariff
Thank you!
This is very important, if you made a mistake in the period and add them "out of order"
This is very important, if you made a mistake in the period and add them "out of order"

Please Log in or Create an account to join the conversation.
- vietvh
-
- Offline
Less
More
- Posts: 1553
10 years 2 months ago #5180
by vietvh
Replied by vietvh on topic "Order by date" in Complex Tariff
Hi,
Nice to see it works for you.
We will include it in the upcoming release v0.8.1 as well.
Regards,
Nice to see it works for you.
We will include it in the upcoming release v0.8.1 as well.
Regards,
Please Log in or Create an account to join the conversation.
Moderators: solidres