Ejemplo n.º 1
0
 def _check_total(self, check, total, computed_total):
     if total != computed_total:
         check.mark_fail(level=check.LEVEL_ERROR,
                         message="The computed amount isn't correct, it "
                         "should be {}, please edit and save the "
                         "{} to fix it.".format(currency_formatter(total),
                                                self._meta.verbose_name))
     else:
         check.mark_pass()
     return check
Ejemplo n.º 2
0
 def _check_total(self, check, total, computed_total):
     if total.quantize(TWO_PLACES) != computed_total.quantize(TWO_PLACES):
         check.mark_fail(level=check.LEVEL_ERROR,
                         message="The computed amount isn't correct, it "
                                 "should be {}, please edit and save the "
                                 "{} to fix it.".format(
                                     currency_formatter(total),
                                     self._meta.verbose_name))
     else:
         check.mark_pass()
     return check
Ejemplo n.º 3
0
 def __str__(self):
     if self.detail:
         return self.detail
     return "Payment of {}".format(currency_formatter(self.amount))
Ejemplo n.º 4
0
 def __str__(self):
     if self.detail:
         return self.detail
     return "Payment of {}".format(currency_formatter(self.amount))