Commit Graph
73 Commits
Author SHA1 Message Date
rickyandClaude Opus 5.5 895733f534 Let admins hide QuickBooks custom fields from estimates and invoices
QuickBooks doesn't tell apps which custom fields are inactive, and a field stays on
its old estimates after it's turned off, so an inactive "Sales Rep old" kept showing
and was filled in with the sales person. The billing settings now list the fields
found, with a box to hide each; hidden fields are left out of the editor, the sales
person and other plugins' field lookups.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 10:07:54 -05:00
Claude 28538d4c7f Show when a QuickBooks sync is running
Syncs record their state in a new qbo_sync_statuses table: queued when asked for, running with how
many records have been read, removed when finished (stale rows are ignored after 6 hours). The
business report says when estimates, invoices or payments are still syncing and refreshes every 30
seconds until they finish; the settings page's Synchronization table shows the same per type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-31 10:03:12 -04:00
Claude bf7c7b0905 Sync services and other items without a description or rate
QuickBooks only requires an item's name, but the local Item required a description and a rate, so
services such as Labor (often with neither) failed validation and were silently skipped by the sync.
Name is now the only requirement; a missing description syncs as blank and a missing rate as 0.
Product/service pickers and the labor setting list sellable items only (no Categories or Bundles).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-31 09:34:22 -04:00
Claude 4732c32409 Combine the labor settings into Labor products/services
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
2026-10-31 08:22:32 -04:00
Claude 616ee13725 Tidy the plugin settings page
- Three sections: QuickBooks connection, Synchronization and Billing.
- Synchronization is one table of every synced type (customers, employees, estimates, invoices,
  payments, items, accounts) with its count, last sync and a Sync link, plus Sync changes and Full sync.
  The separate billing stats and management boxes are folded into it.
- New payments sync (admin only).
- Sync links return to the page they were clicked on instead of the home page.
- Remove locale strings nothing uses any more.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-31 08:11:27 -04:00
Claude 9121e079a0 Fold redmine_qbo_billing into redmine_qbo
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
2026-10-30 23:47:01 -04:00
Claude 0523e8dd24 Security, permission and search fixes
Security
- Connecting to QuickBooks (authenticate/oauth_callback) and all syncs
  are admin-only; the OAuth state is stored and verified on callback
- New "Bill issue time to QuickBooks" project permission; billing is now
  a POST and checks the permission and issue visibility
- Estimate/invoice PDFs require a logged-in user, or a customer share
  link limited to the estimate and invoices attached to that issue
  (the old require_user check never ran)
- Attachments patch keeps the share token per request instead of in
  Thread.current, so it can't leak into other requests

Permissions and share links
- customers#autocomplete and the filter_* actions are part of View
  customers, so non-admins can pick customers on forms
- customers#view no longer goes through authorize_global; share needs
  the new "Share issues with customers" permission and a visible issue
- Removed a check in customers#view that compared a value to itself

Bugs
- Subjects and customer names capitalize each word without lowercasing
  the rest (LED, JL, 4x4 stay as typed); subjects only when changed
- Settings page shows Invoice/Estimate sync times (Item/Account models
  no longer exist)
- customers#update shows validation errors instead of reporting success
- Billing marks each activity billed once sent to QBO, so retries and
  token refreshes don't create duplicate TimeActivities

Search
- New CustomerSearchService for autocomplete and the customer search
  page: nicknames (Bill/William), typos, word order, partial words,
  accents, and phone digits in any format; ranked, with the candidate
  list cached until a customer changes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-28 22:08:36 -04:00
ricky bab019a152 Implement global permissions for customer actions and update views to check permissions before rendering buttons 2026-09-08 22:35:52 -04:00
ricky 7149e85d37 Updated how settings are handled.
Note: Breaking change. Will need to update settings after update
2026-03-21 10:25:46 -04:00
ricky b367687113 Implmented custom autocomplete for customer field 2026-03-18 21:55:55 -04:00
ricky 460bcd466f Fixed routes 2026-03-18 19:11:33 -04:00
ricky f60e507029 Updated settings page 2026-03-17 21:23:29 -04:00
ricky b8327be5d6 Updated to handle no qbo exception 2026-03-14 21:45:15 -04:00
ricky eb1174cf7c Updated manual sync to to allow full or partial sync 2026-03-14 15:36:39 -04:00
ricky f02b50ae26 Added time stamps to each qbo entity model 2026-03-02 07:10:13 -05:00
ricky 485a977d1a Use Safe Navigation Operator &. 2026-03-01 21:31:28 -05:00
ricky 03d5a5d148 Always show sync status 2026-03-01 21:25:07 -05:00
ricky ed111fefe7 Refactor: Update QBO connection handling to use QboConnectionService for consistency across services and controllers 2026-03-01 00:27:06 -05:00
ricky 139f5dd618 render partial on footer 2026-02-13 22:39:54 -05:00
ricky 637cfa89b4 Refactored view hooks 2026-02-03 22:52:34 -05:00
ricky c3d7c1c867 Use symbols 2026-01-30 16:58:14 -05:00
ricky b80e1d4e28 loose the hash rocket, use symbol keys 2026-01-29 22:30:59 -05:00
ricky 2aeb3fa028 Updated copyright dates 2026-01-21 20:40:06 -05:00
ricky 55d00f9005 Added sandbox to settings 2025-07-08 21:01:48 -04:00
ricky e99f5d2e52 Added webhook view 2024-08-19 22:36:44 -04:00
ricky 472bdec4fa Use qbo_authenticate_path 2024-08-19 19:17:45 -04:00
ricky 275af9be82 Fixed formatting 2023-12-30 20:53:39 -05:00
ricky b13abe51bf Display token expiration times 2023-12-30 19:27:37 -05:00
ricky 47a19a7e77 Removed Qbo index & sync html, methods, & routes
This stuff isn't really used for anything
2022-03-09 23:06:54 -05:00
ricky 24f8be6e80 Drop the Qbo prefix 2022-03-09 21:31:56 -05:00
ricky 70d9d5063a Moved issues show details to issue folder 2022-03-09 18:25:07 -05:00
ricky 7dc04b4a07 QboItem doesn’t exist anymore 2022-03-08 20:30:52 -05:00
ricky c72d0a83ca New line @ EOF & formating 2022-03-06 17:50:22 -05:00
ricky 54d4be9762 Only show sidebar views when user is logged in 2022-03-06 07:32:01 -05:00
ricky d6aebfcb99 Moved strings to Ruby I18n en.yml 2022-02-19 20:46:39 -05:00
ricky 4582b8c5b9 Added estimate search in side bar 2022-02-13 10:03:43 -05:00
ricky b1192a1912 Use host name from settings for auth & added exception handing in QboInvoice 2022-02-06 16:37:00 -05:00
ricky b5d17dc862 Removed oauth1 database columns & updated settings 2020-01-05 12:21:36 -05:00
ricky 15b214c800 Moved html into partial view 2018-10-15 20:57:03 -04:00
ricky e24b704571 Added qbo partial views 2018-09-19 22:57:45 -04:00
ricky 88a6be0d27 Remove Edmunds API Key Setting 2018-03-03 12:26:25 -05:00
ricky 0b96a1412c Rename app/views/qbo/list_simple.html.erb to app/views/issues/_list_simple.html.erb 2017-11-13 22:07:12 -05:00
ricky 29de191d26 Rename app/views/issues/list_simple.html.erb to app/views/qbo/list_simple.html.erb 2017-11-13 22:06:45 -05:00
ricky 1098accc8a Bug Fix #2 2016-09-15 07:06:52 -04:00
ricky 0bc935d3dd Bug Fix #2 2016-09-15 07:03:54 -04:00
ricky 0dea5917a7 Update _settings.html.erb 2016-08-04 10:06:07 -04:00
ricky a8ccde6c81 Update _settings.html.erb 2016-08-04 10:05:07 -04:00
ricky 787ae1b8df Update _settings.html.erb 2016-08-04 10:03:28 -04:00
ricky 4ff2b2bdc6 Update _settings.html.erb 2016-08-01 21:28:15 -04:00
ricky 3af5caef4a Update index.html.erb 2016-08-01 16:41:59 -04:00