# Path: openprocurement/tender/openua/constants.py
# ENQUIRY_PERIOD_TIME = timedelta(days=10)
# 
# ENQUIRY_STAND_STILL_TIME = timedelta(days=3)


from pyramid.events import subscriber
from openprocurement.tender.core.events import TenderInitializeEvent
from openprocurement.tender.core.utils import get_now, calculate_business_date
from openprocurement.tender.core.models import EnquiryPeriod
from openprocurement.tender.openua.constants import ENQUIRY_PERIOD_TIME, ENQUIRY_STAND_STILL_TIME



@subscriber(TenderInitializeEvent, procurementMethodType="aboveThresholdUA")
def tender_init_handler(event):
    """ initialization handler for openua tenders """
    tender = event.tender
    endDate = calculate_business_date(

# Path: openprocurement/tender/openua/constants.py
# ENQUIRY_PERIOD_TIME = timedelta(days=10)
# 
# ENQUIRY_STAND_STILL_TIME = timedelta(days=3)


# Path: openprocurement/tender/openua/subscribers.py
from pyramid.events import subscriber
from openprocurement.tender.core.events import TenderInitializeEvent
from openprocurement.tender.core.utils import get_now, calculate_business_date
from openprocurement.tender.core.models import EnquiryPeriod
from openprocurement.tender.openua.constants import ENQUIRY_PERIOD_TIME, ENQUIRY_STAND_STILL_TIME




@subscriber(TenderInitializeEvent, procurementMethodType="aboveThresholdUA")
def tender_init_handler(event):
    """ initialization handler for openua tenders """
    tender = event.tender
    endDate = calculate_business_date(

        tender.tenderPeriod.endDate, -ENQUIRY_PERIOD_TIME, tender