Commit Graph
16 Commits
Author SHA1 Message Date
Claude b739b84917 Fix duplicate estimates: make QuickBooks ids unique
The customers, employees, estimates and invoices tables were created with
t.integer :id, options: 'PRIMARY KEY', which Rails ignores, so the QuickBooks id was never unique. Two
syncs of the same record at once (saving an estimate in Redmine, then QuickBooks' webhook) inserted it
twice, so it showed twice on the customer page and counted twice on the business report.

- Migration 050 keeps one row per id (the most recently updated) and adds a unique index on id.
- A sync that collides with another one's insert retries once as an update.
- Estimates, customers and employees validate a unique id, like invoices already did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-31 11:48:23 -04:00
ricky 2bcb1840a4 Added qbo_sync flag 2026-03-13 08:33:18 -04:00
ricky 4fa8be856a Refactored models to use base model 2026-03-12 11:14:45 -04:00
ricky f02b50ae26 Added time stamps to each qbo entity model 2026-03-02 07:10:13 -05:00
ricky 9a688c4841 Set primary_key 2026-02-27 23:39:34 -05:00
ricky ea0f42b68e Added comment 2026-02-27 23:18:40 -05:00
ricky 6f8af9bba8 Implement Employee synchronization; add EmployeeSyncJob and EmployeeSyncService for improved background processing and logging 2026-02-27 23:07:12 -05:00
ricky b80e1d4e28 loose the hash rocket, use symbol keys 2026-01-29 22:30:59 -05:00
ricky 1f03908040 Refactor employee and estimate models by removing redundant comments; update locale file to remove item references; delete unused QboItemTest file. 2026-01-28 07:45:20 -05:00
ricky 2aeb3fa028 Updated copyright dates 2026-01-21 20:40:06 -05:00
ricky dac9a7c756 Started Support for Redmine 6 2024-12-12 06:00:36 -05:00
ricky 02b5fb4d0e Fixed returned variable handling 2023-12-30 22:53:08 -05:00
ricky bf417c163c Rework performing authenticated requests 2023-12-30 22:33:28 -05:00
ricky b304c3a175 Fixed employee typo 2023-12-29 19:09:24 -05:00
ricky 09c497ff96 Removed old #attr_accessible... comments 2022-03-09 22:31:19 -05:00
ricky 24f8be6e80 Drop the Qbo prefix 2022-03-09 21:31:56 -05:00