Update expense creation to include current user ID for better tracking. Introduce a utility function to round monetary values to two decimal places. Enhance ListDetailPage styles by adding overflow handling for improved UI layout.
This commit is contained in:
parent
17bebbfab8
commit
185e89351e
@ -187,7 +187,7 @@ async def get_list_cost_summary(
|
|||||||
split_type=SplitTypeEnum.ITEM_BASED,
|
split_type=SplitTypeEnum.ITEM_BASED,
|
||||||
paid_by_user_id=db_list.creator.id
|
paid_by_user_id=db_list.creator.id
|
||||||
)
|
)
|
||||||
db_expense = await crud_expense.create_expense(db=db, expense_in=expense_in)
|
db_expense = await crud_expense.create_expense(db=db, expense_in=expense_in, current_user_id=current_user.id)
|
||||||
|
|
||||||
# 4. Calculate cost summary from expense splits
|
# 4. Calculate cost summary from expense splits
|
||||||
participating_users = set()
|
participating_users = set()
|
||||||
|
@ -39,6 +39,10 @@ from app.core.exceptions import (
|
|||||||
|
|
||||||
logger = logging.getLogger(__name__) # Initialize logger
|
logger = logging.getLogger(__name__) # Initialize logger
|
||||||
|
|
||||||
|
def _round_money(amount: Decimal) -> Decimal:
|
||||||
|
"""Rounds a Decimal to two decimal places using ROUND_HALF_UP."""
|
||||||
|
return amount.quantize(Decimal("0.01"), rounding=ROUND_HALF_UP)
|
||||||
|
|
||||||
async def get_users_for_splitting(db: AsyncSession, expense_group_id: Optional[int], expense_list_id: Optional[int], expense_paid_by_user_id: int) -> PyList[UserModel]:
|
async def get_users_for_splitting(db: AsyncSession, expense_group_id: Optional[int], expense_list_id: Optional[int], expense_paid_by_user_id: int) -> PyList[UserModel]:
|
||||||
"""
|
"""
|
||||||
Determines the list of users an expense should be split amongst.
|
Determines the list of users an expense should be split amongst.
|
||||||
|
@ -832,6 +832,7 @@ const editItem = (item: Item) => {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border: 3px solid #111;
|
border: 3px solid #111;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.neo-item-list {
|
.neo-item-list {
|
||||||
|
Loading…
Reference in New Issue
Block a user