fix: store rent amount as whole currency units instead of cents

Changed rent amount handling to use whole currency units throughout the application
instead of storing in cents. This simplifies data entry and aligns with Zod validation
requiring integer values.

Changes:
- Set rent input step to "1" (whole numbers only)
- Remove cents-to-currency conversion (/ 100) when formatting for email

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Knee Cola
2025-12-31 10:03:12 +01:00
parent 2c4e0ee5c0
commit b44d5afca6
2 changed files with 2 additions and 2 deletions

View File

@@ -150,7 +150,7 @@ export async function sendRentDueNotifications(db: Db, budget: number): Promise<
const rentDueDate = `${location.yearMonth.month}/${location.rentDueDay}/${location.yearMonth.year}`;
// Format rent amount (convert from cents to display format)
const rentAmount = location.rentAmount ? (location.rentAmount / 100).toFixed(2) : '0.00';
const rentAmount = location.rentAmount ? (location.rentAmount).toFixed(2) : '0.00';
const currency = userSettings?.currency || 'EUR';
const html = loadAndRender('rent-due', {