Commit Graph
662 Commits
Author SHA1 Message Date
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 c31ec82e61 Normalize customer name before saving and update QBO display name accordingly 2026-08-10 15:20:14 -04:00
ricky 9373963c94 Fix association type for issues in Estimate model 2026-08-09 20:47:55 -04:00
ricky d18a0c180a added name function to estimate 2026-08-06 07:55:51 -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 b8327be5d6 Updated to handle no qbo exception 2026-03-14 21:45:15 -04:00
ricky c4e1ece82c Merge branch 'master' into dev 2026-03-14 17:30:53 -04:00
ricky a6c8923ea9 Fixed uncaught exception when there is no QBO connection 2026-03-14 17:27:01 -04:00
ricky bb57af71ae Simplified detail calls 2026-03-14 08:20:18 -04:00
ricky cd109f16b5 Refactored QBO service calls 2026-03-14 00:10:10 -04:00
ricky fd18205c10 Refactored all Sync Jobs into QboSyncJob 2026-03-13 23:26:02 -04:00
ricky 2bcb1840a4 Added qbo_sync flag 2026-03-13 08:33:18 -04:00
ricky beb4a66a93 Updated comments 2026-03-12 17:53:06 -04:00
ricky 40f7a3335c Reworked push on save and refactored variable names 2026-03-12 15:58:28 -04:00
ricky 4fa8be856a Refactored models to use base model 2026-03-12 11:14:45 -04:00
ricky 00b1baa1f3 Fixed create new customer 2026-03-05 21:33:49 -05:00
ricky b96678a2e9 fixed accident deleteion details_cache_key 2026-03-04 20:09:13 -05:00
ricky bccfcd9dbc cache qbo details to reduce api calls 2026-03-04 20:06:22 -05:00
ricky 4403267abb Moved QBO fetch from customer model into service 2026-03-03 19:49:36 -05:00
ricky 28db5cb8c8 removed unused code 2026-03-02 22:50:43 -05:00
ricky f8b1c72394 show all customer when search is blank 2026-03-02 22:49:18 -05:00
ricky 899237c5ab Reduced blanket rescues, added respond_to_missing?, and extracted push into CustomerPushService 2026-03-02 22:41:22 -05:00
ricky f02b50ae26 Added time stamps to each qbo entity model 2026-03-02 07:10:13 -05:00
ricky b15b88f48d Fix: Correct I18n reference in last_sync method for proper translation 2026-03-01 01:07:43 -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 6e90548dbb Removed unused method 2026-02-28 22:56:03 -05:00
ricky 19911b7940 Refactor EstimateSyncJob to support syncing by ID and document number; add EstimateSyncService for handling estimate synchronization 2026-02-28 08:24:25 -05:00
ricky a80f59cc45 Refactor sync_by_id method in Estimate model to use EstimateSyncJob for syncing 2026-02-28 07:50:23 -05:00
ricky eee99e4d83 Implement CustomerSyncService for customer synchronization and update CustomerSyncJob to support syncing by ID 2026-02-28 07:50:07 -05:00
ricky 9a688c4841 Set primary_key 2026-02-27 23:39:34 -05:00
ricky e94352e2c4 Added comment 2026-02-27 23:19:44 -05:00
ricky ea0f42b68e Added comment 2026-02-27 23:18:40 -05:00
ricky 5a31c194a5 Added comments 2026-02-27 23:15:37 -05:00
ricky 6f8af9bba8 Implement Employee synchronization; add EmployeeSyncJob and EmployeeSyncService for improved background processing and logging 2026-02-27 23:07:12 -05:00
ricky 03109d5775 Refactor invoice processing and synchronization; implement InvoiceSyncJob and related services for improved background processing and logging 2026-02-27 22:33:04 -05:00
ricky 9c0f153518 Refactor logging across controllers and jobs to use a centralized log method; improve consistency and readability of log messages 2026-02-27 22:32:07 -05:00
ricky f32b48296d Refactor estimate synchronization to use EstimateSyncJob; remove direct sync logic from Estimate model for improved background processing 2026-02-27 08:29:52 -05:00
ricky 889e9bf31f Refactor customer synchronization to use CustomerSyncJob; remove direct sync logic from Customer model for improved background processing 2026-02-27 08:00:38 -05:00
ricky 208e839e6a Refactor CustomerToken model for improved token management; streamline token generation and expiration handling, and enhance association with issues 2026-02-26 21:05:02 -05:00
ricky a64016eb95 Refactor QBO billing to use ActiveJob; remove threaded billing and add manual job enqueue support 2026-02-26 19:48:29 -05:00
ricky 5d858ae186 Enhance customer search functionality by ordering results and refining search method 2026-02-25 22:05:52 -05:00
ricky 138e55933b Fixed creation of new customers. 2026-02-25 15:32:45 -05:00
ricky 5fbc169ade Restored old search 2026-02-25 08:08:02 -05:00
ricky 65db8f00a8 Improve customer search with Full-Text index and phonetic matching 2026-02-22 19:07:20 -05:00
ricky 0197dc2a30 removed unused method 2026-02-22 13:34:23 -05:00
ricky 4b45d24a75 Enhance Customer model with redmine's built in searchable and event capabilities 2026-02-22 13:31:28 -05:00
ricky 3deafd8a6d Fixed search event_url 2026-02-21 11:35:15 -05:00
ricky a54de28db5 Extending customers to Redmine's built in search 2026-02-21 11:20:20 -05:00
ricky 9b656534ae Sanitize search, no little bobby tables 2026-02-21 08:23:58 -05:00