def shouldStartAfter(self):
     if self.endDate:
         return
     tender = self.__parent__
     if tender.lots or tender.status not in ['active.tendering', 'active.pre-qualification.stand-still', 'active.auction']:
         return
     start_after = None
     if tender.status == 'active.tendering' and tender.tenderPeriod.endDate:
         start_after = calculate_business_date(tender.tenderPeriod.endDate, TENDERING_AUCTION, tender)
     elif self.startDate and get_now() > calc_auction_end_time(tender.numberOfBids, self.startDate):
         start_after = calc_auction_end_time(tender.numberOfBids, self.startDate)
     elif tender.qualificationPeriod and tender.qualificationPeriod.endDate:
         start_after = tender.qualificationPeriod.endDate
     if start_after:
         return rounding_shouldStartAfter(start_after, tender).isoformat()
 def shouldStartAfter(self):
     if self.endDate:
         return
     tender = self.__parent__
     if tender.lots or tender.status not in ['active.tendering', 'active.pre-qualification.stand-still', 'active.auction']:
         return
     start_after = None
     if tender.status == 'active.tendering' and tender.tenderPeriod.endDate:
         start_after = calculate_business_date(tender.tenderPeriod.endDate, TENDERING_AUCTION, tender)
     elif self.startDate and get_now() > calc_auction_end_time(tender.numberOfBids, self.startDate):
         start_after = calc_auction_end_time(tender.numberOfBids, self.startDate)
     elif tender.qualificationPeriod and tender.qualificationPeriod.endDate:
         start_after = tender.qualificationPeriod.endDate
     if start_after:
         return rounding_shouldStartAfter(start_after, tender).isoformat()
 def shouldStartAfter(self):
     if self.endDate:
         return
     tender = self.__parent__
     if tender.lots or tender.status not in ['active.tendering', 'active.auction']:
         return
     if self.startDate and get_now() > calc_auction_end_time(tender.numberOfBids, self.startDate):
         start_after = calc_auction_end_time(tender.numberOfBids, self.startDate)
     else:
         decision_dates = [
             datetime.combine(complaint.dateDecision.date() + timedelta(days=3), time(0, tzinfo=complaint.dateDecision.tzinfo))
             for complaint in tender.complaints
             if complaint.dateDecision
         ]
         decision_dates.append(tender.tenderPeriod.endDate)
         start_after = max(decision_dates)
     return rounding_shouldStartAfter(start_after, tender).isoformat()
 def shouldStartAfter(self):
     if self.endDate:
         return
     tender = get_tender(self)
     lot = self.__parent__
     if tender.status not in [
             'active.pre-qualification.stand-still', 'active.auction'
     ] or lot.status != 'active':
         return
     start_after = None
     if self.startDate and get_now() > calc_auction_end_time(
             lot.numberOfBids, self.startDate):
         start_after = calc_auction_end_time(lot.numberOfBids,
                                             self.startDate)
     elif tender.qualificationPeriod and tender.qualificationPeriod.endDate:
         start_after = tender.qualificationPeriod.endDate
     if start_after:
         return rounding_shouldStartAfter(start_after, tender).isoformat()
Esempio n. 5
0
 def shouldStartAfter(self):
     if self.endDate:
         return
     tender = get_tender(self)
     lot = self.__parent__
     if tender.status not in ['active.tendering', 'active.auction'
                              ] or lot.status != 'active':
         return
     if self.startDate and get_now() > calc_auction_end_time(
             lot.numberOfBids, self.startDate):
         start_after = calc_auction_end_time(lot.numberOfBids,
                                             self.startDate)
     else:
         decision_dates = [
             datetime.combine(
                 complaint.dateDecision.date() + timedelta(days=3),
                 time(0, tzinfo=complaint.dateDecision.tzinfo))
             for complaint in tender.complaints if complaint.dateDecision
         ]
         decision_dates.append(tender.tenderPeriod.endDate)
         start_after = max(decision_dates)
     return rounding_shouldStartAfter(start_after, tender).isoformat()