Skip to content

feat: utility rebilling#75

Merged
elizabetheonoja-art merged 2 commits intoLeaseFlow-Protocol:mainfrom
tusharshah21:feat/utility-reconcile-14
Mar 27, 2026
Merged

feat: utility rebilling#75
elizabetheonoja-art merged 2 commits intoLeaseFlow-Protocol:mainfrom
tusharshah21:feat/utility-reconcile-14

Conversation

@tusharshah21
Copy link
Copy Markdown
Contributor

Summary

Implements variable utility billing reconciliation by allowing landlords to upload utility bill data, calculating each tenant’s share, and updating the tenant’s upcoming payment total for the next rent cycle.

Changes

  • Added utility bill upload endpoint: POST /api/leases/:leaseId/utility-bills.
  • Added tenant upcoming payment endpoint: GET /api/tenants/:tenantId/upcoming-payment.
  • Added utility bill persistence and reconciliation logic in the DB layer:
    • stores uploaded utility bill entries
    • recalculates cycle-level utility share total
    • updates/inserts payment_schedules with rent + utility share
  • Mounted payment routes under /api.
  • Added focused tests in tests/utilityBillingReconciliation.test.js to verify:
    • share calculation
    • upcoming payment updates
    • cycle-gated tenant approval payload
    • landlord-lease authorization checks

Closes #14

@elizabetheonoja-art elizabetheonoja-art merged commit 092653e into LeaseFlow-Protocol:main Mar 27, 2026
1 check failed
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.

#14 Support for Variable_Utility_Billing_Reconciliation

2 participants