Beispiel #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)
Beispiel #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
Beispiel #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."
Beispiel #4
0
 def available(self, invoice):
     if invoice.canceltime:
         if diff_workdays(timezone.now(), invoice.canceltime) < 5:
             return False
     return True