Add Other Purchases to budget page
- New other_purchases table (date, total, notes) - /api/other CRUD endpoints - Budget stats now include other costs in cost/egg and cost/dozen math - Budget page: new Log Other Purchases form, stat cards for other costs, combined Purchase History table showing feed and other entries together Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -33,3 +33,13 @@ class FeedPurchase(Base):
|
||||
price_per_bag: Mapped[float] = mapped_column(Numeric(10, 2), nullable=False)
|
||||
notes: Mapped[str] = mapped_column(Text, nullable=True)
|
||||
created_at: Mapped[datetime] = mapped_column(DateTime, server_default=func.now())
|
||||
|
||||
|
||||
class OtherPurchase(Base):
|
||||
__tablename__ = "other_purchases"
|
||||
|
||||
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
|
||||
date: Mapped[date] = mapped_column(Date, nullable=False, index=True)
|
||||
total: Mapped[float] = mapped_column(Numeric(10, 2), nullable=False)
|
||||
notes: Mapped[str] = mapped_column(Text, nullable=True)
|
||||
created_at: Mapped[datetime] = mapped_column(DateTime, server_default=func.now())
|
||||
|
||||
Reference in New Issue
Block a user