Commit Graph
100 Commits
Author SHA1 Message Date
ricky 2fb21c34bb 2026.11.16 2026-11-04 15:04:19 -05:00
rickyandClaude Opus 5.5 1c71e3a4c9 Add discounts, unlocking paid invoices and editing payments
- Estimates and invoices take a discount, as a percent of the subtotal or an
  amount, saved as QuickBooks' discount line and taken off before sales tax.
  Duplicated estimates and invoices made from an estimate keep it. The box is
  hidden when discounts are off in QuickBooks.
- A paid invoice can be unlocked for editing after a confirmation. The
  payments stay linked, and the total can't go below what's been paid.
  Unlocking needs the new "Edit partially paid invoices" or "Edit paid
  invoices" permission, checked again when saving.
- Saved payments can be edited: date, method, reference, memo, amount and the
  invoices they pay. Each invoice keeps its amount unless the amount or the
  invoices change. Payments that also apply credit memos stay read-only.
- Locked estimates and invoices are readable again (disabled boxes had faint
  or invisible text, especially in Safari).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 15:04:19 -05:00
ricky 89f4797bbe 2026.11.15 2026-11-04 12:41:32 -05:00
rickyandClaude Opus 5.5 3bbceacda4 Don't take the sales person from a retired custom field
When an estimate didn't have the company's sales person field, the plugin fell back to
any field named like "Sales Rep", e.g. a retired "Sales Rep old" dropdown, which
QuickBooks returns as its option number. Invoices made from those estimates got "4"
as their sales person. Only the company's field is read now; an estimate without it
has no sales person, so the invoice gets the user who creates it. Matching by name is
left for when QuickBooks' settings can't be read, and never picks a hidden field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 12:41:32 -05:00
ricky d75dee2866 2026.11.14 2026-11-04 10:33:03 -05:00
rickyandClaude Opus 5.5 c8e2d2d92e Save new estimates and invoices as drafts
A draft is kept in Redmine only, however incomplete, so nothing is in QuickBooks
until it's saved from the editor. QuickBooks can't apply a deposit to an invoice
that's still being written, which made it read-only. Saving to QuickBooks deletes
the draft.

Drafts are listed on the customer's page, on a Drafts page linked from Customers,
and on a new invoice or estimate for a customer who already has one. Anyone with
Write invoices (or Write estimates) can continue or delete invoice (or estimate)
drafts. Adds the qbo_drafts table (migration 052).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 10:33:03 -05:00
ricky a1fb88e77c 2026.11.13 2026-11-04 10:07:54 -05:00
rickyandClaude Opus 5.5 0a7b2e34b8 Fix the settings page before QuickBooks is connected
The token expiry came back as "never synced" text, which the page treated as a
time, so it failed. It's now empty, shown as N/A.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 10:07:54 -05:00
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
ricky fa1b4eed06 2026.11.12 2026-11-04 09:47:36 -05:00
rickyandClaude Opus 5.5 95e76a41fd Use QuickBooks' newer custom fields once estimates show them
QuickBooks keeps listing the legacy sales form fields (DefinitionIds 1-3) in the
preferences after a company moves to its newer custom fields, often renamed or inactive
(e.g. "Sales Rep old"). Once estimates show any newer field, only those are used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 09:47:36 -05:00
ricky 92b2a18eb6 2026.11.11 2026-11-03 22:12:47 -05:00
rickyandClaude Opus 5.5 084df36061 Link the Customer column in issue lists to the customer
Only for users with View customers, who can open the customer page; others see
the name as plain text. CSV and PDF exports are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 22:12:47 -05:00
rickyandClaude Opus 5.5 3b51625df4 Fix sorting and grouping time entries by Billed
The time entry Billed column sorted by time_entries.name, which doesn't exist, so
sorting or grouping by it failed. The issue list's Billed column is removed: issues
have no billed value, so showing or sorting it always failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 22:12:47 -05:00
ricky 7cfc8a370e 2026.11.10 2026-11-03 21:53:13 -05:00
rickyandClaude Opus 5.5 d2cdd798cd Show names in issue history, and record invoices the webhook attaches
The history showed the customer and estimate as id numbers. It now shows their names,
for existing entries too. When the QuickBooks webhook attaches an invoice to an issue,
the issue's history gets "Invoice 1042 added", linking to the invoice PDF.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 21:53:13 -05:00
rickyandClaude Opus 5.5 159420fac1 Show estimate, invoice and payment activity on the activity page
Each type appears only on the overall activity page, and only for users who may see it:
estimates need View customers or Write estimates, invoices View customers or Write invoices,
and payments View or Receive payments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 21:53:13 -05:00
rickyandClaude Opus 5.5 dbee228cdf 2026.11.9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 22:22:51 -05:00
rickyandClaude Opus 5.5 ec00684edd Clear all lines asks in redmine_dark_mode's dialog when it's installed
On dark pages the confirmation is dark instead of the browser's bright box; without redmine_dark_mode
it's the browser's box as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 22:22:51 -05:00
rickyandClaude Opus 5.5 839ac976e6 2026.11.8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 21:52:41 -05:00
rickyandClaude Opus 5.5 dc72b11766 Business report charts take their colours from the page
The grid lines and labels read --qbo-chart-grid and --qbo-chart-text (Chart.js' own colours when
unset), and recolour on redmine_dark_mode's redmine:color-scheme event, so the charts get lighter
grid lines in dark mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 21:52:41 -05:00
rickyandClaude Opus 5.5 778111825b 2026.11.7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 17:56:49 -05:00
rickyandClaude Opus 5.5 4ba96e2dfd Warn about the customer's open issues on a new invoice
A new invoice lists the customer's open issues (any project, those the user can see) in a warning under
the title, so work orders aren't left open once the work is billed. It's there when the page opens with a
customer (from the customer page or an estimate) and follows the customer when it's changed: customer_info
returns open_issues_html for invoices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 17:55:14 -05:00
ricky 88160a985d 2026.11.6 2026-11-01 17:47:43 -05:00
rickyandClaude Opus 5.5 e2a871b1e8 Customer page: Customers » name trail, actions under it, Open in QuickBooks
- The title is a trail back to the customer list, like Redmine's pages, instead of "Customer #id - name"
- The action links sit on their own line under the title (qbo-under-title, also used by
  redmine_qbo_vehicles), so a long name and the many actions don't crowd each other
- Open in QuickBooks joins the action links, as on the payments, invoice and estimate pages, in place of
  the name linking to QuickBooks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 17:47:19 -05:00
rickyandClaude Opus 5.5 489edd97fa Customers page lists every customer, paged by Redmine instead of will_paginate
- The Customers page shows all customers without a search: a Redmine list with name, phone, mobile,
  issue count and last update, sortable by column, with Redmine's pagination and per-page choices
- Search works as before (best matches first, a single match opens the customer); clicking a column
  sorts the matches by it instead, and Clear goes back to everyone
- New Customer and Sync move to the page's action links
- will_paginate removed from the Gemfile and init.rb; redmine_qbo_vehicles 2026.11.3 no longer needs it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 17:47:19 -05:00
rickyandClaude Opus 5.5 64e4a149ab Business report: only open projects in the project filter
Closed and archived projects aren't listed. A saved project that has since closed is dropped from the
filter (and from "Opens with"), so the report never filters by a project the picker can't show.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 17:02:24 -05:00
ricky 6a638fe7bb 2026.11.5 2026-11-01 16:45:52 -05:00
rickyandClaude Opus 5.5 51159d5034 Business report: project filter, remembered per user
- Projects picker (project tree, visible projects only) limits issues' estimated time and spent time
  to the chosen projects, in the totals, charts, last-year lines and months; none picked is every project
- Estimates, invoices and payments have no project in QuickBooks, so they stay whole-business; the page
  says so while filtered (the CPI's invoiced hours included)
- "Remember these projects" saves the choice in the user's Redmine preferences; the report opens with it
  when the address has no projects, and saving none goes back to every project

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 16:44:03 -05:00
rickyandClaude Opus 5.5 b1ad2d5b40 2026.11.4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 14:17:15 -04:00
rickyandClaude Opus 5.5 e348042fef 2026.11.3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 13:17:51 -04:00
rickyandClaude Opus 5.5 ec6fecbd85 Show each estimate's status on the customer page
The estimate lists (customer page, and redmine_qbo_vehicles' vehicle page) show the QuickBooks status
badge (Pending, Accepted, Closed, Converted, Rejected) after the date. It's the status the estimate
sync already caches, kept current by the webhook. The badge styles are shared with the estimate
page's header (qbo_estimates/_status_styles).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:32:31 -04:00
rickyandClaude Opus 5.5 09e88232b0 2026.11.2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:11:36 -04:00
ricky d07d99109b 2026.11.0 2026-10-31 00:15:17 -04:00
ricky e61217b719 2026.10.1 2026-10-29 21:35:51 -04:00
ricky 609ddb098a 2026.10.0 2026-10-28 22:32:26 -04:00
ricky aacc2d645d Refactor customer form layout for improved readability and structure 2026-10-23 09:34:50 -04:00
ricky cf3342bcc5 2026.9.0 2026-09-09 21:12:57 -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 fd91bd6fa2 Bump version to 2026.8.3 for Redmine QBO plugin 2026-08-26 21:22:12 -04:00
ricky 04a0eede5f Register customer and estimate fields with SubtaskFieldCopier if the plugin is installed, ensuring uniqueness to prevent duplicates. 2026-08-26 21:21:22 -04:00
ricky ba40496421 Enhance autocomplete functionality to support name and phone queries with fuzzy matching 2026-08-25 16:05:51 -04:00
ricky 57dc8127b0 2026.8.2 2026-08-24 20:39:38 -04:00
ricky 9dc4b79355 Refactor customer controller and form to enhance error handling and conditional rendering 2026-08-24 20:17:21 -04:00
ricky 8ae82f1423 Updated pdf patch to support markdown tables 2026-08-18 13:14:53 -04:00
ricky b72c82fb2b Dynamically update the link with estimate id 2026-08-17 21:03:37 -04:00
ricky b901e64149 added new issue link to actions 2026-08-17 20:40:42 -04:00
ricky 7abb1aa06c fixed customer view to show attachments 2026-08-17 20:22:23 -04:00
ricky dfd3a641db Version 2026.8.1 2026-08-12 08:41:31 -04:00
ricky 75e5aeb668 Refactor customer details and form views for improved readability and consistency 2026-08-11 18:39:23 -04:00
ricky ea29990cfa Version 2026.8.0 2026-08-10 19:36:25 -04:00
ricky c31ec82e61 Normalize customer name before saving and update QBO display name accordingly 2026-08-10 15:20:14 -04:00
ricky 938f9d9f3b Add customer action hooks to _actions.html.erb for enhanced integration 2026-08-09 21:09:56 -04:00
ricky f2b0186ee2 Add EstimateService class 2026-08-09 20:50:20 -04:00
ricky 9373963c94 Fix association type for issues in Estimate model 2026-08-09 20:47:55 -04:00
ricky 396a56ceec Refactor associations in IssuePatch for clarity and consistency 2026-08-09 20:47:42 -04:00
ricky b3c3006b56 Added transaltion for Estimate 2026-08-06 16:22:12 -04:00
ricky 576ca5a0a9 Added transation for customer 2026-08-06 16:03:31 -04:00
ricky d18a0c180a added name function to estimate 2026-08-06 07:55:51 -04:00
ricky baca0ed6c7 updated readme 2026-07-02 22:48:25 -04:00
ricky 6bf84dd61a Added payment link 2026-07-01 14:06:02 -04:00
ricky 61b02831e3 removed comment 2026-03-28 06:40:59 -04:00
ricky 7c79f2388a removed Custom Field Synchronization 2026-03-28 00:32:22 -04:00
ricky 36267893bd 2026.3.17 2026-03-28 00:25:55 -04:00
ricky e681203a45 Removed custom field sync, it was never really useful anyways. 2026-03-28 00:25:07 -04:00
ricky 681e7f8047 2026.3.16 2026-03-26 08:13:01 -04:00
ricky 4a6c414d9e Updated customer form to use auto complete to help prevent duplicate customer enteries 2026-03-26 07:56:59 -04:00
ricky 925cb1d2bc 2026.3.15
Note: breaking change, need to update settings
2026-03-22 14:24:22 -04:00
ricky 1dcccd7b98 Merge branch 'master' into rails-7 2026-03-21 10:28:46 -04:00
ricky f73973a4e1 2026.3.14 2026-03-21 10:27:33 -04:00
ricky 7cd388dbd4 Fixed webhook 2026-03-21 10:26:57 -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 eacdecd65b Updated patches and hooks 2026-03-21 00:09:42 -04:00
ricky ee2ab04206 added placeholder 2026-03-19 18:15:04 -04:00
ricky 8a8c6f5fa0 renamed issue_customer_id to customer_id 2026-03-19 18:07:21 -04:00
ricky cc36bc16b4 use the autocomplete 2026-03-19 10:36:46 -04:00
ricky 874ec7c2dc updated plugin_config screenshot 2026-03-19 09:16:32 -04:00
ricky f3fe38cd57 2026.3.12 2026-03-19 08:34:27 -04:00
ricky 977cbfe0e1 removed coffee-rails 2026-03-19 08:22:25 -04:00
ricky 82712f361c fixed estimate path 2026-03-19 08:07:34 -04:00
ricky 4ae7d75478 removed jquery-ui-rails 2026-03-19 07:57:00 -04:00
ricky 8fb9d74277 removced placeholder for customer field 2026-03-19 07:20:59 -04:00
ricky b0e6236cee removed old autocomplete js 2026-03-18 21:56:52 -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 020ea01d36 renamed controllers and updated routes 2026-03-18 00:08:56 -04:00
ricky df079b767c 2026.3.11 2026-03-17 23:37:17 -04:00
ricky 7d3908ec41 fixed estimate#sync 2026-03-17 23:31:42 -04:00
ricky f60e507029 Updated settings page 2026-03-17 21:23:29 -04:00
ricky 3e6650ee65 Merge branch 'master' of https://github.com/rickbarrette/redmine_qbo 2026-03-16 08:20:07 -04:00
ricky c2d0e5c702 Improved qbo hooks to allow a single entity or an array of entities 2026-03-16 08:18:11 -04:00
ricky a4f461fd4d 2026.3.10 2026-03-15 18:01:54 -04:00
ricky 3e81d2840a fixed typo 2026-03-15 17:59:53 -04:00
ricky c9a5dc20f9 Added manual sync links 2026-03-15 08:01:04 -04:00
ricky db3c6021c5 2026.3.9 2026-03-14 21:54:12 -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 9fd7140e4a 2026.3.8 2026-03-14 17:30:22 -04:00
ricky a6c8923ea9 Fixed uncaught exception when there is no QBO connection 2026-03-14 17:27:01 -04:00
ricky eb1174cf7c Updated manual sync to to allow full or partial sync 2026-03-14 15:36:39 -04:00