jarek Posted November 29, 2017 Report Share Posted November 29, 2017 Hi, I would like to change the date range in Billing at a glance --> Revenue this Year. I know it's showing calendar year but I would like to have my fiscal year (1 April - 31 March). Is it possible? Thank you, Jarek Quote Link to comment Share on other sites More sharing options...
0 Tyson Posted November 30, 2017 Report Share Posted November 30, 2017 You would have to update the Billing Overview plugin source code in order to set those dates. If you change them, they will be overridden when you upgrade Blesta so you will need to remember to re-add your changes back in afterward. Open /plugins/billing_overview/controllers/admin_main.php Look for the following toward the top of the file: $dates = [ 'today_start' => $this->Date->cast($datetime, 'Y-m-d 00:00:00'), 'today_end' => $this->Date->cast($datetime, 'Y-m-d 23:59:59'), 'month_start' => $this->Date->cast($datetime, 'Y-m-01 00:00:00'), 'month_end' => $this->Date->cast($datetime, 'Y-m-t 23:59:59'), 'year_start' => $this->Date->cast($datetime, 'Y-01-01 00:00:00'), 'year_end' => $this->Date->cast($datetime, 'Y-12-31 23:59:59') ]; Replace that with: $month = $this->Date->format('n'); $new_fiscal_year = ($month >= 4); $datetime_last_year = $this->Date->format('c', date('c', strtotime('now -1 year'))); $datetime_next_year = $this->Date->format('c', date('c', strtotime('now +1 year'))); $dates = [ 'today_start' => $this->Date->cast($datetime, 'Y-m-d 00:00:00'), 'today_end' => $this->Date->cast($datetime, 'Y-m-d 23:59:59'), 'month_start' => $this->Date->cast($datetime, 'Y-m-01 00:00:00'), 'month_end' => $this->Date->cast($datetime, 'Y-m-t 23:59:59'), 'year_start' => $this->Date->cast(($new_fiscal_year ? $datetime : $datetime_last_year), 'Y-04-01 00:00:00'), 'year_end' => $this->Date->cast(($new_fiscal_year ? $datetime_next_year : $datetime), 'Y-03-31 23:59:59') ]; Save Blesta Addons 1 Quote Link to comment Share on other sites More sharing options...
0 Jono Posted November 30, 2017 Report Share Posted November 30, 2017 1 hour ago, jarek said: I would like to change the date range in Billing at a glance --> Revenue this Year. I know it's showing calendar year but I would like to have my fiscal year (1 April - 31 March). Is it possible? Not without changing the source code. Quote Link to comment Share on other sites More sharing options...
0 Blesta Addons Posted November 30, 2017 Report Share Posted November 30, 2017 2 hours ago, jarek said: Hi, I would like to change the date range in Billing at a glance --> Revenue this Year. I know it's showing calendar year but I would like to have my fiscal year (1 April - 31 March). Is it possible? Thank you, Jarek you have got me a idea to our stats & reports plugin. we will add it to our next release . activa 1 Quote Link to comment Share on other sites More sharing options...
0 activa Posted December 4, 2017 Report Share Posted December 4, 2017 On 30/11/2017 at 1:52 AM, Blesta Addons said: you have got me a idea to our stats & reports plugin. we will add it to our next release . You never stop Michael 1 Quote Link to comment Share on other sites More sharing options...
0 jarek Posted December 5, 2017 Author Report Share Posted December 5, 2017 Thank you Tyson!!! That's what I wanted. Works perfectly fine. Thank you once again. Jarek Paul 1 Quote Link to comment Share on other sites More sharing options...
Question
jarek
Hi,
I would like to change the date range in Billing at a glance --> Revenue this Year. I know it's showing calendar year but I would like to have my fiscal year (1 April - 31 March).
Is it possible?
Thank you,
Jarek
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.