A Refund page on the customer: the canceled order's estimate fills in
the parts the 30% restocking fee is worked out on. Refunding makes the
fee invoice, pays it from the customer's credit, records the rest as a
Check (company check) or Expense (card refund on the terminal) with the
category Accounts Receivable, applies the credit to it so the balance
comes back to $0.00, and optionally marks the estimate Rejected,
cancels its work orders with the reason as a note and emails the
customer. Each refund has a page with a PDF of it.
New permission: Issue refunds. New settings under Billing » Refunds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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
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
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
- 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
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
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