mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-11-17 18:20:36 -05:00
Estimates, invoices and payments written in Redmine, issues from estimates, and the QuickBooks product/service list and accounts are now part of this plugin (the RedmineQboBilling code, its controllers, views, strings and permissions), so there's one plugin and one version instead of two that had to match. - The customer page, estimate and invoice lists and the issue page render the Create Estimate / Create invoice / Receive payment and Edit links directly; the hooks that only existed to let billing add them are gone. Users without the billing permissions still get the links to QuickBooks. - Migrations 043-046 create the items and accounts tables and the estimate line links, skipping whatever an existing database already has (redmine_qbo_lineitems' tables are used as they are), and copy calendar's existing estimate line links in. - The billing settings are a section of this plugin's settings page. - The hooks other plugins use stay: qbo_billing_issue_values, qbo_billing_validate, qbo_billing_issue_defaults, qbo_billing_issues_created and view_qbo_estimate_contextual. - rake redmine_qbo:relate_estimate_issues Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
84 lines
2.8 KiB
ERB
84 lines
2.8 KiB
ERB
<script type="text/javascript" src="https://appcenter.intuit.com/Content/IA/intuit.ipp.anywhere.js"></script>
|
|
<script>
|
|
intuit.ipp.anywhere.setup({menuProxy: '/path/to/blue-dot', grantUrl: '<%= qbo_authenticate_path %>'});
|
|
</script>
|
|
|
|
<div class="box tabular">
|
|
<p>
|
|
<label><%= t(:label_client_id) %></label>
|
|
<%= text_field_tag 'settings[oauth_consumer_key]', settings[:oauth_consumer_key], size: 50 %>
|
|
</p>
|
|
|
|
<p>
|
|
<label><%= t(:label_client_secret) %></label>
|
|
<%= password_field_tag 'settings[oauth_consumer_secret]', settings[:oauth_consumer_secret], size: 50 %>
|
|
</p>
|
|
|
|
<p>
|
|
<label><%= t(:label_webhook_token) %></label>
|
|
<%= text_field_tag 'settings[webhook_token]', settings[:webhook_token], size: 50 %>
|
|
</p>
|
|
|
|
<p>
|
|
<label><%= t(:label_sandbox) %></label>
|
|
<%= check_box_tag 'settings[sandbox]', 1, settings[:sandbox] %>
|
|
</p>
|
|
|
|
<hr />
|
|
|
|
<p>
|
|
<label><%= t(:label_oauth_expires) %></label>
|
|
<span class="icon <%= Qbo.oauth2_access_token_expires_at&.future? ? 'icon-ok' : 'icon-warning' %>">
|
|
<%= Qbo.oauth2_access_token_expires_at || 'N/A' %>
|
|
</span>
|
|
</p>
|
|
|
|
<p>
|
|
<label><%= t(:label_customer_count) %></label>
|
|
<%= Customer.count %>
|
|
<em style="color: #777; font-size: 0.9em; margin-left: 8px;">(@ <%= Customer.last_sync %>)</em>
|
|
</p>
|
|
|
|
<p>
|
|
<label><%= t(:label_employee_count) %></label>
|
|
<%= Employee.count %>
|
|
<em style="color: #777; font-size: 0.9em; margin-left: 8px;">(@ <%= Employee.last_sync %>)</em>
|
|
</p>
|
|
|
|
<p>
|
|
<label><%= t(:label_invoice_count) %></label>
|
|
<%= Invoice.count %>
|
|
<em style="color: #777; font-size: 0.9em; margin-left: 8px;">(@ <%= Invoice.last_sync %>)</em>
|
|
</p>
|
|
|
|
<p>
|
|
<label><%= t(:label_estimate_count) %></label>
|
|
<%= Estimate.count %>
|
|
<em style="color: #777; font-size: 0.9em; margin-left: 8px;">(@ <%= Estimate.last_sync %>)</em>
|
|
</p>
|
|
|
|
<p>
|
|
<label><%= t(:label_last_sync) %> (QBO)</label>
|
|
<%= Qbo.exists? ? Qbo.last_sync : 'Never synced' %>
|
|
</p>
|
|
</div>
|
|
|
|
<fieldset class="box">
|
|
<legend>Management & Synchronization</legend>
|
|
|
|
<div style="margin-bottom: 20px;">
|
|
<ipp:connectToIntuit></ipp:connectToIntuit>
|
|
</div>
|
|
|
|
<div style="margin-bottom: 15px;">
|
|
<%= link_to t(:label_sync_now_customers), sync_customers_path, class: 'button icon icon-reload' %>
|
|
<%= link_to t(:label_sync_now_employees), employees_sync_path, class: 'button icon icon-reload' %>
|
|
<%= link_to t(:label_sync_now_invoices), invoices_sync_path, class: 'button icon icon-reload' %>
|
|
<%= link_to t(:label_sync_now_estimate), estimates_sync_path, class: 'button icon icon-reload' %>
|
|
</div>
|
|
</fieldset>
|
|
|
|
<%# Billing: estimates, issues from estimates, invoices, the product/service list and accounts %>
|
|
<h3><%= l(:label_billing_settings) %></h3>
|
|
<%= render partial: 'qbo/billing_settings', locals: { settings: settings } %>
|