diff --git a/hosting/models.py b/hosting/models.py index fb2a805b..b735bb8f 100644 --- a/hosting/models.py +++ b/hosting/models.py @@ -325,6 +325,15 @@ class MonthlyHostingBill(AssignPermissionsMixin, models.Model): instance.assign_permissions(instance.customer.user) return instance + def total_in_chf(self): + """ + Returns amount in chf. The total amount in this model is in cents. + Hence we multiply it by 0.01 to obtain the result + + :return: + """ + return self.total * 0.01 + class VMDetail(models.Model): user = models.ForeignKey(CustomUser)