New plugin: weekly technician bonus credit memos (SOP-OPS-012)
Totals the shop's billable hours for a Sunday-Saturday week (picked projects, trackers and users) against the SOP-OPS-012 target, and credits each qualifying technician's QuickBooks customer account with a credit memo: a "Tech Bonus <week> <total>/<goal> hours (total/goal)" line, plus a separate tier line for every full 15 hours over the goal. Credit memos are emailed through QuickBooks. - Bonus technicians (admin): user, QuickBooks customer, role (technician/foreman), probation end - Tech bonuses (global "Run tech bonuses" permission): week preview, attendance check, run, PDF and email again; re-running a week never credits anyone twice Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
a2ecb74c1d
37 files changed
+2274
No files matched your search
@@ -0,0 +1,45 @@
|
||||
<div class="contextual">
|
||||
<%= link_to sprite_icon('add', l(:label_bonus_technician_new)), new_bonus_technician_path, class: 'icon icon-add' %>
|
||||
<%= link_to sprite_icon('settings', l(:label_settings)), plugin_settings_path('redmine_qbo_bonus'), class: 'icon icon-settings' %>
|
||||
</div>
|
||||
|
||||
<h2><%= l(:label_bonus_technician_plural) %></h2>
|
||||
|
||||
<p><em class="info"><%= l(:text_bonus_technicians) %></em></p>
|
||||
|
||||
<% if @technicians.empty? %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% else %>
|
||||
<div class="autoscroll">
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= l(:label_user) %></th>
|
||||
<th><%= l(:field_role) %></th>
|
||||
<th><%= l(:label_bonus_technician_customer) %></th>
|
||||
<th><%= l(:field_bonus_technician_probation_until) %></th>
|
||||
<th><%= l(:field_active) %></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @technicians.each do |tech| %>
|
||||
<tr>
|
||||
<td class="name"><%= link_to_user tech.user %></td>
|
||||
<td><%= tech.role_name %></td>
|
||||
<td><%= tech.customer ? link_to(tech.customer.name, customer_path(tech.customer)) : content_tag(:span, l(:text_tech_bonus_no_customer), class: 'tech-bonus-error') %></td>
|
||||
<td><%= format_date(tech.probation_until) %></td>
|
||||
<td><%= checked_image tech.active? %></td>
|
||||
<td class="buttons">
|
||||
<%= link_to sprite_icon('edit', l(:button_edit)), edit_bonus_technician_path(tech), class: 'icon icon-edit' %>
|
||||
<%= link_to sprite_icon('del', l(:button_delete)), bonus_technician_path(tech), method: :delete,
|
||||
data: { confirm: l(:text_are_you_sure) }, class: 'icon icon-del' %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% html_title l(:label_bonus_technician_plural) %>
|
||||
Reference in new issue
Block a user