mirror of
https://github.com/i701/sarlink-portal-api.git
synced 2025-07-07 12:16:30 +00:00
fix(views): format topup amount to two decimal places in VerifyTopupPaymentAPIView 🐛
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 5m40s
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 5m40s
This commit is contained in:
@ -386,7 +386,7 @@ class VerifyTopupPaymentAPIView(StaffEditorPermissionMixin, generics.UpdateAPIVi
|
|||||||
data = {
|
data = {
|
||||||
"benefName": f"{user.first_name} {user.last_name}", # type: ignore
|
"benefName": f"{user.first_name} {user.last_name}", # type: ignore
|
||||||
"accountNo": user.acc_no, # type: ignore
|
"accountNo": user.acc_no, # type: ignore
|
||||||
"absAmount": topup_instance.amount.toFixed(2), # type: ignore
|
"absAmount": "{:.2f}".format(topup_instance.amount),
|
||||||
"time": localtime(topup_instance.created_at).strftime("%Y-%m-%d %H:%M"),
|
"time": localtime(topup_instance.created_at).strftime("%Y-%m-%d %H:%M"),
|
||||||
}
|
}
|
||||||
logger.info(
|
logger.info(
|
||||||
|
Reference in New Issue
Block a user