Commit Graph
16 Commits
Author SHA1 Message Date
Claude ff25bba08e Depend on redmine_qbo for items, accounts and estimates
Billing has been folded into redmine_qbo 2026.11.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-30 23:48:55 -04:00
Claude dec5b32165 Billing job: VIN and mileage from the work order via redmine_qbo_billing
The estimate made when an issue closes gets the issue's VIN and mileage from
redmine_qbo_billing's issue values hook, instead of reading the vehicle here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-30 22:32:24 -04:00
Claude 3a2d50ae8d Move items, accounts and estimate writing to redmine_qbo_billing
The QuickBooks product/service list and income accounts (models, syncs,
admin pages, routes, settings) now live in redmine_qbo_billing, which this
plugin requires. The closing-an-issue estimate is written through
RedmineQboBilling::EstimateWriter.create_estimate, so estimate building isn't
duplicated; it now also gets the customer email, VIN, default message and
expiration date.

Migrations: 002 now only links line items to items (skipped where the column
exists). 003 and 004 are removed; billing's migrations find the existing
items and accounts tables and leave them alone, so nothing is dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-30 13:50:15 -04:00
Claude 39f6b64049 Polish: permissions, billed-line locking, sync and billing fixes
Permissions
- Item catalog and accounts pages, and their syncs, are admin-only (they
  push to / pull from QuickBooks); shown in the Administration layout
- Item autocomplete is allowed with Add or Edit line items
- Permissions now map to real actions (they pointed at a non-existent
  line_items controller); line_items_attributes is only accepted from
  users with a line item permission
- Line item changes are checked on the server: adding, editing and
  deleting each need their permission, and billed lines (already on a
  QBO estimate) can't be changed or removed

Bugs
- Billing on close now runs from an Issue after_commit, so closing via
  bulk edit or the context menu bills too (replaces the save hook);
  the job takes an issue id
- Full sync runs Accounts before Items, and item sync no longer fails
  when an item has no income account or its account hasn't synced
- New QBO items default to Non-inventory in the default income account
  (the account ref was being assigned to the item type)
- Choosing a blank account on an item no longer raises; set_default
  handles no selection
- Item autocomplete escapes item names, SKUs and descriptions (they were
  inserted into the page as HTML)
- Items list showed "translation missing" for Yes/No

Polish
- Fractional quantities allowed (0.5 hrs, 2.5 qts)
- Billed lines show a Billed badge and are read-only; remove button only
  where allowed; add button only with Add line items
- Removed dead code (Item belongs_to :issue, Item#ref, no-op in new,
  swallowed errors); validation failures return 422

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-28 22:37:41 -04:00
ricky c968893f94 fixed taxable check 2026-03-17 19:29:05 -04:00
ricky 2703d6cc3e Default to taxable, otherwise folllow tax flag 2026-03-17 18:27:56 -04:00
ricky 7088550184 Removed ItemSyncJob as it was replaced withj QboSyncJob 2026-03-15 17:44:14 -04:00
ricky 2302679c3a updated ItemSyncService init call 2026-03-15 07:50:07 -04:00
ricky ec1ef72267 Use a private note to make it clear where the estimate came from. 2026-03-14 22:13:45 -04:00
ricky 60fb4e197c Added QBO Item support with autocomplete 2026-03-08 14:24:30 -04:00
ricky d3d039f191 added locale notice_added_from 2026-03-07 22:06:05 -05:00
ricky bb55c45b9b update copyright year 2026-03-07 22:01:11 -05:00
ricky 9767870db4 added issue subject to estimate note 2026-03-07 09:39:03 -05:00
ricky 366104c454 Added tax and a notice line item 2026-03-06 22:27:02 -05:00
ricky 512d9690e5 fixed comments and check for customer 2026-03-06 21:53:49 -05:00
ricky 47a7447688 Create estimate on issue close. 2026-03-06 21:42:27 -05:00