Commit Graph

373 Commits

Author SHA1 Message Date
52ab533547 fixes 2026-05-28 21:37:09 -07:00
0c30a5c085 taste-redesign 2026-05-28 21:35:43 -07:00
daea729e8e Fixes logging issues. 2026-05-27 08:42:42 -07:00
11cc887671 unique locations 2026-05-26 21:56:58 -07:00
a4d7ac5982 Allows upload of CSV of sysco with line item parsing 2026-05-26 21:53:04 -07:00
8e3aa13f4d fixes 2026-05-24 21:54:37 -07:00
ba87805d4c Add vendor pre-population for bulk code and individual edit forms
- Add vendor-changed HTMX handlers for both bulk code and individual edit
- Pre-populate default account at 100% when vendor is selected and no accounts exist
- Fix render-accounts-section to render from step-params correctly
- Change bulk code vendor-changed from hx-get to hx-post to include form data
- Add routes for vendor-changed endpoints
- Update e2e tests to cover vendor pre-population
- Run lein cljfmt fix across codebase
2026-05-21 14:45:19 -07:00
b42e2a6a44 adds unresolved only 2026-05-20 20:45:39 -07:00
bc89a7d586 fixes 2026-05-18 15:39:31 -07:00
a156ac99fe tries sales changes 2026-05-18 15:38:07 -07:00
7eda6849d1 improved 2026-05-18 11:31:54 -07:00
df85e30bf6 merged 2026-05-17 08:17:51 -07:00
31179278e4 Adds a more actionable view 2026-05-17 08:16:11 -07:00
8367036f85 merged 2026-05-16 00:36:16 -07:00
cc31d8849b Feat/Complete Sales Summaries (#5)
## Summary

Completes the automatic sales summary pipeline end-to-end: the `sales-summaries-v2` job now calculates aggregate totals, preserves manual adjustments, and automatically posts balanced journal entries to the ledger.

## What Changed

**New Datomic transaction function** (`upsert-sales-summary-ledger`)
- Transforms detailed `sales-summary-item`s into aggregated `journal-entry` lines grouped by account and ledger side
- Handles the full upsert: posts a new journal entry for summaries with mapped accounts, or retracts the orphaned entry if items no longer qualify

**Enhanced `sales-summaries-v2` job**
- Calculates and stores 13 aggregate total attributes (card/cash/food-app/gift-card payments, refunds, fees, discounts, tax, tip, returns, unknown, net)
- Preserves manual items (`manual? true`) during recalculation — only auto-calculated items are replaced

**Ledger reconciliation**
- `reconcile-ledger` now queries for sales summaries missing journal entries and repairs them via `:upsert-sales-summary-ledger`, alongside existing invoice and transaction repairs

**Schema**
- Added 13 `total-*` attributes on `sales-summary` (all `db.type/double`, no history)
- Registered the new transaction function in `tx.clj` and `datomic.clj`

**Admin UI cleanup**
- Resolved "clientize" and HTMX `client-id` TODOs in the sales summaries admin page
- `new-summary-item` now correctly passes `client-id` via `hx-vals`
- Removed stale TODO comments and placeholder code

## Files Changed (8)

| File | Purpose |
|------|---------|
| `iol_ion/.../upsert_sales_summary_ledger.clj` | New Datomic tx function |
| `iol_ion/.../tx.clj` | Register new tx function |
| `resources/schema.edn` | 13 new `total-*` attributes |
| `src/.../datomic.clj` | Load new tx namespace |
| `src/.../jobs/sales_summaries.clj` | Aggregate totals + manual item preservation |
| `src/.../ledger.clj` | Sales summary repair in `reconcile-ledger` |
| `src/.../ssr/admin/sales_summaries.clj` | UI TODO cleanup |
| `docs/plans/...plan.md` | Implementation plan document |

Co-authored-by: Bryce <bryce@integreatconsult.com>
Reviewed-on: #5
Co-authored-by: Bryce <bryce@brycecovertoperations.com>
Co-committed-by: Bryce <bryce@brycecovertoperations.com>
2026-05-16 00:16:44 -07:00
d008ec71c3 merged 2026-01-05 21:37:30 -08:00
5a05c144ea progress on bulk activities 2025-03-31 10:55:47 -07:00
7f12b31fdf shows as locked 2025-03-29 19:36:52 -07:00
01329bbdf5 Disallows chatgpt for emailed invoices. 2025-03-25 21:26:40 -07:00
0bae8f3d1b Improvements for transaction page 2025-03-22 23:21:21 -07:00
d1b04f27c8 fixes 2025-03-15 21:20:30 -07:00
44a8a77027 merged 2025-03-11 21:11:05 -07:00
581033001b Adds the ability to filter down to unbalanced 2025-03-11 21:07:51 -07:00
04ec980b02 handles home page 2025-03-11 20:27:28 -07:00
e22beb149e much smaller build (hopefully) and transactions progress. 2025-03-10 22:13:53 -07:00
7373ef41d1 Removes old login page, more progress on transactions 2025-03-10 14:09:45 -07:00
0a797fea3a progress on combinining everything 2025-03-07 11:51:36 -08:00
d19a2988fd Every action kind of works. 2025-03-05 21:02:50 -08:00
59d48342ea Makes it so that the edit page works better 2025-03-05 14:25:43 -08:00
d0c93e1907 progress on transaction page 2025-03-02 20:58:29 -08:00
bd501b512a transaction links is visible. 2025-03-02 20:44:08 -08:00
7c7fc10a8d transactions page progress. 2025-03-02 20:09:40 -08:00
d078fb8a15 Makes better warning/errors 2025-02-03 21:06:28 -08:00
ca7a08452c Makes A&J Produce findable. 2025-01-17 20:53:17 -08:00
ce759acab4 Adds memo field 2024-12-29 21:52:53 -08:00
a0bfeb51a7 dates should be inclusive. 2024-12-16 22:30:18 -08:00
da2702f9e8 Supports more 2024-12-16 21:55:06 -08:00
b7826ad6ce uses the periods that are actually used. 2024-12-12 09:49:52 -08:00
aaeafae871 dates work again 2024-12-11 22:51:17 -08:00
717e89c799 Unpay autopays 2024-12-11 15:00:58 -08:00
98dcdb5a55 cleans stuff up. 2024-11-23 21:13:15 -08:00
a4a40fc9c2 applying feedback 2024-11-20 09:48:07 -08:00
18172df3f8 Periods selector 2024-11-14 22:26:43 -08:00
c860032eaf merged. 2024-11-14 21:14:03 -08:00
d119e01857 Adds advanced view 2024-11-13 20:03:04 -08:00
cb4f88f02a adds csv capability 2024-11-11 21:39:36 -08:00
df3183f85c progress on reports. 2024-11-10 22:09:14 -08:00
966deb232a tweaks 2024-11-04 21:43:41 -08:00
48d575fe70 create manual ledger experience 2024-10-28 15:18:07 -07:00
bf7e63f7e0 beginning on new journal entry 2024-10-26 20:11:03 -07:00