Commit Graph
26 Commits
Author SHA1 Message Date
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 9a9efcbaf9 Implement permission checks for adding and deleting line items in issue forms 2026-09-07 21:32:44 -04:00
ricky 5b1d98aa07 Show running total even if issue doesn't have line items but it's children do 2026-04-17 21:31:46 -04:00
ricky c9d2a47a92 Added running total calculated using subtask totals from the entire issue tree 2026-04-17 21:13:33 -04:00
ricky 9820646857 allow math on unit price field 2026-03-18 22:02:53 -04:00
ricky 4367c77393 updaed locale 2026-03-17 20:49:58 -04:00
ricky 8c0ce8ce48 updated locale 2026-03-17 20:45:21 -04:00
ricky 9fd1f4fb7d removed back link 2026-03-17 20:37:58 -04:00
ricky cca822c570 better display flags 2026-03-17 20:35:40 -04:00
ricky 6bf5575f9c Updated views for items and accounts 2026-03-17 19:18:03 -04:00
ricky 24e3e4ba82 Added taxable flag 2026-03-17 12:25:58 -04:00
ricky f81fe0ef87 Added accounts to allow for assinging income account to items, and selecting default income account. Also added item type selection 2026-03-16 22:59:54 -04:00
ricky a52ff3b860 fixed sync link 2026-03-11 23:50:05 -04:00
ricky 4f8e5d9b2c implemented some basic CRUD for QBO Items 2026-03-11 23:39:24 -04:00
ricky bfdf6b3065 Added support for item name & sku. Also added manual sync link 2026-03-11 19:36:27 -04:00
ricky d1f8f027c0 Allow doing math in price field for each markups 2026-03-09 20:45:26 -04:00
ricky 9736f1ac96 Added settings page for Item stats 2026-03-09 00:00:46 -04:00
ricky 449910c941 minium qty is 1 2026-03-08 15:48:01 -04:00
ricky 60fb4e197c Added QBO Item support with autocomplete 2026-03-08 14:24:30 -04:00
ricky 151bbf2d7f tweaked layout, added JS for live totals 2026-03-07 21:47:03 -05:00
ricky 894741f60f Fixed remove button functionality 2026-03-07 13:03:44 -05:00
ricky 1d29d2a816 Don't save blank line items 2026-03-07 12:49:34 -05:00
ricky acd54a5e57 Added English strings for Rails i18n 2026-03-07 12:37:47 -05:00
ricky 03b94d251a Make the form read only if issue id closed 2026-03-07 10:49:07 -05:00
ricky b0c1da0b51 display line items on issue if any exist 2026-03-07 09:35:02 -05:00
ricky f297830750 Initial Commit 2026-03-05 08:40:23 -05:00