diff --git a/README.md b/README.md index 4ea6090..fb11ecc 100644 --- a/README.md +++ b/README.md @@ -146,7 +146,7 @@ Estimates and invoices keep their number, date, customer, total and **man-hours* * **Hours**: estimated hours on estimates, issues' estimated time, invoiced hours on invoices and time spent, with spent vs. estimated, and the **cost performance index** (CPI = invoiced hours รท spent hours): green at 1.00 or more, yellow below 1, red below 0.80. Each month shows its CPI too. * **Charts**: above each set of bars, a line chart of the same figures in the same colors (Chart.js 4.5.1, MIT licensed, bundled with the plugin in assets/javascripts so it doesn't clash with other plugins' copies such as redmine_indicator's Chart.js 2), with a point per day for a week, per week for up to about three months, and per month beyond. Hovering a point shows its figures. **Compare with last year** adds last year's lines, dashed and faded, without reloading: days and weeks go back 52 weeks so weekdays line up, months go back to the same month. Clicking a figure in the legend hides it (and its last-year line); clicking *last year* stops comparing. Today's line stops at today. * **By month**: every figure month by month, with totals. -* **Projects**: pick one or more projects (Ctrl/Cmd-click) to count only their issues' estimated time and spent time, in the totals, charts and months; none picked counts every project. Estimates, invoices and payments have no project in QuickBooks, so they always cover the whole business (as do the CPI's invoiced hours). **Remember these projects** saves the choice in your Redmine preferences, and the report opens with it until you save another (saving none goes back to every project). +* **Projects**: pick one or more open projects (Ctrl/Cmd-click; closed and archived projects aren't listed) to count only their issues' estimated time and spent time, in the totals, charts and months; none picked counts every project. Estimates, invoices and payments have no project in QuickBooks, so they always cover the whole business (as do the CPI's invoiced hours). **Remember these projects** saves the choice in your Redmine preferences, and the report opens with it until you save another (saving none goes back to every project). Estimates, invoices and payments count by their QuickBooks date. Issues' estimated time counts issues created in the period, leaving out parents so subtasks aren't counted twice. Spent time counts time logged in the period. While estimates, invoices or payments are syncing, the report says so (with how many have been read) and refreshes every 30 seconds; the settings page's Synchronization table shows the same per type. Estimates and invoices synced before these figures were added have no total or hours until a full sync (the report says how many); run one again after changing the labor products/services. diff --git a/app/controllers/qbo_reports_controller.rb b/app/controllers/qbo_reports_controller.rb index cca7d98..924cd83 100644 --- a/app/controllers/qbo_reports_controller.rb +++ b/app/controllers/qbo_reports_controller.rb @@ -19,8 +19,8 @@ class QboReportsController < ApplicationController PROJECTS_PREF = :qbo_report_project_ids def index - # Projects for the issues and spent time: the projects picker can choose some - @projects = Project.visible.to_a + # Projects for the issues and spent time: the projects picker can choose some of the open ones + @projects = Project.visible.active.to_a @project_ids = report_project_ids @report = RedmineQboBilling::BusinessReport.new(period: params[:period].presence || 'this_year', from: params[:from], to: params[:to], today: User.current.today, @@ -35,7 +35,7 @@ class QboReportsController < ApplicationController private # The form's projects (none picked is every project), or the user's saved ones when the address has none. - # "Remember these projects" saves the form's choice. Only projects the user can see are kept. + # "Remember these projects" saves the form's choice. Only open projects the user can see are kept. def report_project_ids visible = @projects.map(&:id) if params.key?(:project_ids)