Skip to content

Commit

Permalink
Rounded off amount and tax_amount (#82)
Browse files Browse the repository at this point in the history
* Rounded off amount and tax_amount

* Fix tax amount none rounding
  • Loading branch information
Hrishabh17 committed Jun 11, 2024
1 parent 96dc5d6 commit 22ac695
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/fyle/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def create_expense_objects(expenses: List[Dict], workspace_id: int):
'expense_number': expense['expense_number'],
'org_id': expense['org_id'],
'claim_number': expense['claim_number'],
'amount': expense['amount'],
'amount': round(expense['amount'], 2),
'currency': expense['currency'],
'foreign_amount': expense['foreign_amount'],
'foreign_currency': expense['foreign_currency'],
Expand All @@ -108,7 +108,7 @@ def create_expense_objects(expenses: List[Dict], workspace_id: int):
'fund_source': SOURCE_ACCOUNT_MAP[expense['source_account_type']],
'verified_at': expense['verified_at'],
'custom_properties': expense['custom_properties'],
'tax_amount': expense['tax_amount'],
'tax_amount': round(expense['tax_amount'], 2) if expense['tax_amount'] is not None else None,
'tax_group_id': expense['tax_group_id'],
'billable': expense['billable'] if expense['billable'] else False
}
Expand Down

0 comments on commit 22ac695

Please sign in to comment.