Ejemplo n.º 1
0
 def unavailable_reason(self, invoice):
     if invoice.canceltime:
         if diff_workdays(
                 datetime.now(),
                 invoice.canceltime) < self.unavailable_less_than_days:
             return "Since this invoice will be automatically canceled in less than {0} working days, it requires the use of a faster payment method.".format(
                 self.unavailable_less_than_days)
Ejemplo n.º 2
0
 def available(self, invoice):
     if invoice.canceltime:
         if diff_workdays(
                 datetime.now(),
                 invoice.canceltime) < self.unavailable_less_than_days:
             return False
     return True
Ejemplo n.º 3
0
 def unavailable_reason(self, invoice):
     if invoice.canceltime:
         if diff_workdays(timezone.now(), invoice.canceltime) < 5:
             return "Since this invoice will be automatically canceled in less than 5 working days, it requires the use of a faster payment method."
Ejemplo n.º 4
0
 def available(self, invoice):
     if invoice.canceltime:
         if diff_workdays(timezone.now(), invoice.canceltime) < 5:
             return False
     return True