-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdzo_service.py
31 lines (25 loc) · 1.07 KB
/
dzo_service.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/python
# -*- coding: utf-8 -*-
from datetime import datetime, timedelta
def subtract_from_time(date_time, subtr_min, subtr_sec):
sub = datetime.strptime(date_time, "%d.%m.%Y %H:%M")
sub = (sub - timedelta(minutes=int(subtr_min),
seconds=int(subtr_sec))).isoformat()
return sub
def procuringEntity_name_dzo(INITIAL_TENDER_DATA):
INITIAL_TENDER_DATA.data.procuringEntity['name'] = u"ПрАТ <Комбайн Інк.>"
# INITIAL_TENDER_DATA.data.items.unit['name'] = u"кг"
return INITIAL_TENDER_DATA
def convert_title_dzo(string):
return string.replace(string[14:], string[14:].lower())
def convert_string_from_dict_dzo(string):
return {
# u"м. Київ": u"Київська область",
# u"Київська область": u"м. Київ",
# u"кг": u"кілограм",
u"грн": u"UAH",
u"(з ПДВ)": u"True",
u"(без ПДВ)": u"false",
# u"Картонні коробки": u"Картонки",
u"ДК": u"ДКПП",
}.get(string, string)