Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/30/2017 in all areas

  1. Tyson

    Billing overview

    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
    1 point
×
×
  • Create New...