Commit Graph
75 Commits
Author SHA1 Message Date
rickyandClaude Opus 5.5 9fa199aa98 Refunds for canceled orders and returned parts (SOP-OPS-014)
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>
2026-11-16 20:43:36 -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
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
Claude 06a78ebccb Move vehicle code out to redmine_qbo_vehicles
- IssueMileageListener removed: redmine_qbo_vehicles answers qbo_billing_issue_values with mileage.
- New hook qbo_billing_build_issue sets plugins' fields on issues created from an estimate; the vehicle
  lookup by VIN moved to redmine_qbo_vehicles.
- New hook qbo_billing_vin_options gives the VIN box's suggestions (RedmineQboBilling.vin_options)
  instead of reading customer.vehicles.
- The customer page's New issue link script is generic: any checkbox with
  data-new-issue-param="issue[field]" fills that field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-31 09:12:52 -04:00
Claude 9fd6e90c81 Drop QuickBooks estimate and payment links from customer actions
Estimates and payments are handled in Redmine; each action shows only to users with its permission.
The customer's name still links to their QuickBooks account page as a fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-31 00:12:03 -04:00
Claude 14f0409395 Add a customer payments page
Payments on the customer page lists the customer's QuickBooks payments, newest first, with the
invoices each was applied to, memo, amount, unapplied credit and totals; each links to the payment
page and its PDF. A new View payments permission allows the list, payment page and PDF; Receive
payments includes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-31 00:00:36 -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 48a4185c16 Replaceable Create Payment link on the customer page
view_customers_show_payment_link lets a plugin replace the link that opens
QuickBooks' receive payment screen (redmine_qbo_billing receives payments in
Redmine).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-30 23:28:32 -04:00
Claude afca8eb6ea Estimate hooks: replaceable Create Estimate link and per-estimate actions
view_customers_show_estimate_link lets a plugin replace the customer page's
Create Estimate link (which opens QuickBooks). view_estimate_actions adds
links after an estimate on the customer page's list and the issue page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-29 23:56:07 -04:00
Claude 6ec8853508 Customer page: actions in the contextual area, with a plugin hook
- New issue, Create estimate, Create payment and Edit now sit in
  Redmine's top-right contextual area (icons, like issue pages) instead
  of an "Actions" column next to the customer details
- New view hook :view_customers_show_contextual (context: customer) for
  plugins to add their own action links there; replaces
  customer_actions_top / customer_actions_bottom (README updated)
- The New issue link still picks up the estimate / vehicle ticked on the
  page (script moved to customers/_new_issue_link_script)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-29 23:29:46 -04:00
Claude 0dd3073841 Customer page: Edit link in the contextual area instead of a button
Moves "Edit customer" from a button under the actions list to Redmine's
standard top-right contextual area (pencil icon, "e" access key), shown
only to users with Edit customers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-29 22:56:06 -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 8ba99b7db2 Fixed eager loading issues 2026-03-04 19:18:06 -05:00
ricky 92460392b9 Refactor estimates and invoices rendering to use local variables for the abilty for other plugins to display filtered lists 2026-01-31 12:45:47 -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 d63bf809f2 Merge branch 'redmine-6' into dev-6 2026-01-26 10:16:40 -05:00
ricky c1af031d22 Link to sandbox if enabled 2026-01-23 21:40:08 -05:00
ricky 4ae9374401 Merge branch 'redmine-6' into dev-6 2026-01-22 21:50:40 -05:00
ricky 4983cd661c Fixed missing locale 2026-01-22 21:49:33 -05:00
ricky 3c2f1d0edd Merge branch 'redmine-6' into HEAD 2026-01-22 20:39:20 -05:00
ricky a5de879260 Fixed formatting 2024-08-26 08:41:56 -04:00
ricky 6464e1cbc6 Added actions 2024-08-26 07:58:40 -04:00
ricky 938999db91 Added quickbooks to customer's name 2024-03-28 12:54:36 -04:00
ricky 26433c9020 Added hour totals to customer job history 2023-01-14 06:38:48 -05:00
ricky a531ef4f87 Added hour totals to customer job history 2023-01-14 06:20:41 -05:00
ricky 8bdec410c4 Fixed render of hook :show_customer_view_right 2022-03-17 06:12:35 -04:00
ricky 2745ecf242 Added call_hook :show_customer_view_right 2022-03-14 07:52:33 -04:00
ricky b686110145 Initial Vehicle Delete 2022-03-14 07:22:43 -04:00
ricky 8b4a46f7eb H3 not H2 2022-03-06 16:27:39 -05:00
ricky 64a7ad844f Styling & formatting 2022-03-06 13:46:26 -05:00
ricky 70e6038215 Moved customer issue counts 2022-02-20 15:22:31 -05:00
ricky a459d84b00 Added Estimate & Invoice List to Customer view 2022-02-19 21:19:08 -05:00
ricky d6aebfcb99 Moved strings to Ruby I18n en.yml 2022-02-19 20:46:39 -05:00
ricky 5d7fc9dabd Don't include open issues in closed issue list 2020-03-28 20:39:04 -04:00
ricky 279e8b15e0 Added open/closed issue lists for customer/vehicles 2020-01-24 13:54:26 -05:00
ricky a0da53b6cf Fixed formatting & removed search from heading 2018-10-15 21:10:41 -04:00
ricky 558e2359f7 Added partial customers/search & fixed formatting 2018-09-19 09:45:36 -04:00
ricky 41195dc095 Update show.html.erb 2016-09-18 22:55:12 -04:00
ricky 4f613d3fe1 Update show.html.erb 2016-09-18 22:52:48 -04:00
ricky 1c7cdec600 Update show.html.erb 2016-09-18 22:41:24 -04:00
ricky 7ae60c0e62 Update show.html.erb 2016-09-18 22:38:26 -04:00
ricky 5dd04925e0 Update show.html.erb 2016-09-18 22:37:23 -04:00
ricky 92eedbd4d3 Update show.html.erb 2016-09-18 22:32:45 -04:00
ricky 475c86eabe Update show.html.erb 2016-08-04 09:52:32 -04:00
ricky 259737a488 Update show.html.erb 2016-08-04 09:51:47 -04:00
ricky 362cb77381 Update show.html.erb 2016-08-04 09:50:55 -04:00
ricky 8cfab17136 Update show.html.erb 2016-08-04 09:50:37 -04:00
ricky 8f87eb3e60 Update show.html.erb 2016-08-04 09:48:19 -04:00
ricky 2b093903b3 Update show.html.erb 2016-08-04 09:46:22 -04:00