Skip to content

Expenses, Bills,a and reporting Improvements on workflows.#7

Merged
compgeniuses merged 5 commits into
mainfrom
dev
May 18, 2026
Merged

Expenses, Bills,a and reporting Improvements on workflows.#7
compgeniuses merged 5 commits into
mainfrom
dev

Conversation

@compgeniuses
Copy link
Copy Markdown
Contributor

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

Fixes #(issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor (no functional changes)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

  • Unit tests
  • Integration tests
  • End-to-end tests
  • Manual testing

Test Configuration:

  • Node.js version:
  • PostgreSQL version:
  • OS:

Checklist:

  • My code follows the project's code style
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots (if appropriate):

Additional context:

Add any other context about the pull request here.

- refactor bill item category extraction to return all unique categories instead of single
- add groupBillItemsByCategory utility to organize bill items by their category ID
- implement logic to create individual expense entries for each category in multi-category bills
- reorder and improve form validation checks for amount, description, and future expense dates
- update bill category error messaging for better clarity
- add real-time budget validation when adding bill items to prevent exceeding bill total
- add summary row displaying bill amount, items total and remaining budget with alerts
- fix expense page logic: correct boolean check, simplify conditionals and update error messages
- clean up redundant code and improve type safety across both pages
Replace the single `categoryId` form state with a `categoryIds` array to support multiple selected categories. Add dynamic UI for toggling categories per bill line item when a bill has multiple unique categories, update validation logic, form effects, and submission handling to create grouped expenses per selected category, and adjust error messages and form reset to match the new structure.
This commit adds full support for multi-category expenses by introducing expense line items:
- create the expense_items database table with indexes and foreign keys
- add drizzle ORM schema and table relations
- extend the expenses API to accept line items in creation requests and add a getItems endpoint
- update the frontend Expenses page to use line items instead of multiple single expenses for multi-category bills
Add a resolveLocationFilter utility to validate and resolve allowed business locations for the current user. Switch all report routes to use reportQuery middleware instead of accountManage, update handlers to accept request context, and replace manual input location ID checks with validated business-level filters to ensure reports only access permitted data.
@compgeniuses compgeniuses merged commit 7b11d8e into main May 18, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant