change to rial

This commit is contained in:
aminhashemi92 2025-10-07 08:01:58 +03:30
parent dd64b7b47c
commit 02415f4dee
11 changed files with 56 additions and 56 deletions

View file

@ -57,13 +57,13 @@ class InvoiceAdmin(SimpleHistoryAdmin):
status_display.short_description = "وضعیت"
def paid_amount_display(self, obj):
return f"{obj.get_paid_amount():,.0f} تومان"
return f"{obj.get_paid_amount():,.0f} ریال"
paid_amount_display.short_description = "مبلغ پرداخت شده"
def remaining_amount_display(self, obj):
amount = obj.get_remaining_amount()
color = "green" if amount <= 0 else "red"
return format_html('<span style="color: {};">{:,.0f} تومان</span>', color, amount)
return format_html('<span style="color: {};">{:,.0f} ریال</span>', color, amount)
remaining_amount_display.short_description = "مبلغ باقی‌مانده"
@admin.register(Payment)