mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-11-17 18:20:36 -05:00
The estimate item codes and "Replaced by imported time" become one list of products/services (RedmineQboBilling::LaborItems), used to create issues from an estimate's labor lines (and an appointment's minimum hours), to offer an invoice's labor lines to be replaced by imported time, and to total the hours on estimates and invoices for the business report. While none are chosen, products/services named Labor are used. The old settings and redmine_qbo_calendar's fallbacks are no longer read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
39 lines
2.1 KiB
ERB
39 lines
2.1 KiB
ERB
<div class="box tabular settings">
|
|
<p>
|
|
<label for="settings_expiration_days"><%= l(:label_estimate_expiration_days) %></label>
|
|
<%= number_field_tag 'settings[expiration_days]', @settings['expiration_days'], id: 'settings_expiration_days',
|
|
min: 0, step: 1, size: 6 %>
|
|
<em class="info"><%= l(:text_estimate_expiration_days) %></em>
|
|
</p>
|
|
<%# Labor: issues from estimates, lines imported time replaces on invoices, and hours for the business report.
|
|
While none are chosen, items named "Labor" are used and shown selected. %>
|
|
<p>
|
|
<label for="settings_labor_item_ids"><%= l(:label_labor_items) %></label>
|
|
<%= hidden_field_tag 'settings[labor_item_ids][]', '', id: nil %>
|
|
<%= select_tag 'settings[labor_item_ids][]',
|
|
options_from_collection_for_select(Item.where(active: true).order(:name), :id, :name,
|
|
RedmineQboBilling::LaborItems.item_ids),
|
|
multiple: true, size: 8, id: 'settings_labor_item_ids' %>
|
|
<em class="info"><%= l(:text_labor_items) %></em>
|
|
</p>
|
|
</div>
|
|
|
|
<% issue_builder = RedmineQboBilling::EstimateIssueBuilder %>
|
|
<fieldset class="box tabular">
|
|
<legend><%= l(:label_estimate_issue_settings) %></legend>
|
|
<p>
|
|
<label for="settings_issue_default_project_id"><%= l(:label_default_project) %></label>
|
|
<%= select_tag 'settings[issue_default_project_id]',
|
|
project_tree_options_for_select(Project.active.sorted, selected: Project.find_by(id: issue_builder.default_project_id)),
|
|
include_blank: true, id: 'settings_issue_default_project_id' %>
|
|
<em class="info"><%= l(:text_default_project_info) %></em>
|
|
</p>
|
|
<p>
|
|
<label for="settings_issue_default_tracker_id"><%= l(:label_default_tracker) %></label>
|
|
<%= select_tag 'settings[issue_default_tracker_id]',
|
|
options_from_collection_for_select(Tracker.sorted, :id, :name, issue_builder.default_tracker_id),
|
|
include_blank: true, id: 'settings_issue_default_tracker_id' %>
|
|
<em class="info"><%= l(:text_default_tracker_info) %></em>
|
|
</p>
|
|
</fieldset>
|