diff options
author | Petr Šmerkl <46304018+SveterCZE@users.noreply.github.com> | 2021-02-23 21:10:28 +0100 |
---|---|---|
committer | Petr Šmerkl <46304018+SveterCZE@users.noreply.github.com> | 2021-02-23 21:10:28 +0100 |
commit | c0af3f89b423d89c13d0212f713655ad3d534b86 (patch) | |
tree | 76b2f34ef8a86926ec6e9cfa7127265a81d2ef01 | |
parent | 1d15f31257a9d2a6591840ffd742ae3150f88bc2 (diff) | |
download | justice-c0af3f89b423d89c13d0212f713655ad3d534b86.tar.gz |
Adding a supervisory board
-rw-r--r-- | justice_main.py | 73 | ||||
-rw-r--r-- | main.py | 4 | ||||
-rw-r--r-- | models.py | 54 | ||||
-rw-r--r-- | templates/extract.html | 272 |
4 files changed, 370 insertions, 33 deletions
diff --git a/justice_main.py b/justice_main.py index eaae69f..6f4b6c1 100644 --- a/justice_main.py +++ b/justice_main.py @@ -43,6 +43,8 @@ def purge_DB(): c.execute("DELETE FROM adresy")
c.execute("DELETE FROM akcie")
c.execute("DELETE FROM companies")
+ c.execute("DELETE FROM dozorci_rada_relation")
+ c.execute("DELETE FROM dr_organ_clen_relation")
c.execute("DELETE FROM fyzicke_osoby")
c.execute("DELETE FROM insolvency_events")
c.execute("DELETE FROM konkurz_events")
@@ -51,6 +53,7 @@ def purge_DB(): c.execute("DELETE FROM obce_relation")
c.execute("DELETE FROM osoby")
c.execute("DELETE FROM ostatni_skutecnosti")
+ c.execute("DELETE FROM pocty_clenu_DR")
c.execute("DELETE FROM pocty_clenu_organu")
c.execute("DELETE FROM pravni_formy")
c.execute("DELETE FROM pravni_formy_relation")
@@ -79,9 +82,11 @@ def purge_DB(): def find_other_properties(c, ICO, element, conn, primary_sql_key):
try:
- my_iter = element.iter("udaje")
+ # my_iter = element.iter("udaje")
+ my_iter = element.findall("udaje")
for elem in my_iter:
- my_iter2 = elem.iter("Udaj")
+ # my_iter2 = elem.iter("Udaj")
+ my_iter2 = elem.findall("Udaj")
for elem2 in my_iter2:
udajTyp_name = str(get_prop(elem2, ".//udajTyp/kod"))
if udajTyp_name == "SIDLO":
@@ -108,6 +113,8 @@ def find_other_properties(c, ICO, element, conn, primary_sql_key): find_sp_zn(c, ICO, elem2, conn, primary_sql_key, element)
elif udajTyp_name == "PRAVNI_FORMA":
find_pravni_forma(c, ICO, elem2, conn, primary_sql_key, element)
+ elif udajTyp_name == "DOZORCI_RADA":
+ find_dozorci_rada(c, ICO, elem2, conn, primary_sql_key, element)
except:
pass
@@ -154,6 +161,25 @@ def find_statutar(c, ICO, elem2, conn, primary_sql_key, element): except Exception as f:
print(f)
+def find_dozorci_rada(c, ICO, elem2, conn, primary_sql_key, element):
+ try:
+ zapis_datum = str(get_prop(elem2, "zapisDatum"))
+ vymaz_datum = str(get_prop(elem2, "vymazDatum"))
+ c.execute("INSERT into dozorci_rada_relation (company_id, zapis_datum, vymaz_datum) VALUES (?, ?, ?)", (primary_sql_key, zapis_datum, vymaz_datum,))
+ c.execute("SELECT id FROM dozorci_rada_relation WHERE company_id = (?) and zapis_datum = (?)", (primary_sql_key,zapis_datum,))
+ relationship_table_key = c.fetchone()[0]
+ my_iter = elem2.findall("podudaje/Udaj")
+ for elem in my_iter:
+ udajTyp_name = str(get_prop(elem, "udajTyp/kod"))
+ if udajTyp_name == "POCET_CLENU_DOZORCI_RADA":
+ find_pocet_clenu_dr(c, ICO, elem, conn, relationship_table_key, element)
+ elif udajTyp_name == "DOZORCI_RADA_CLEN":
+ find_clen_dr(c, ICO, elem, conn, relationship_table_key, element)
+ # find_clen_dr(c, ICO, elem, conn, relationship_table_key, element)
+ except Exception as f:
+ print(f)
+
+
def find_clen_statut_org(c, ICO, elem, conn, relationship_table_key, element):
try:
zapis_datum = str(get_prop(elem, "zapisDatum"))
@@ -171,6 +197,23 @@ def find_clen_statut_org(c, ICO, elem, conn, relationship_table_key, element): except Exception as f:
print(f)
+def find_clen_dr(c, ICO, elem, conn, relationship_table_key, element):
+ try:
+ zapis_datum = str(get_prop(elem, "zapisDatum"))
+ vymaz_datum = str(get_prop(elem, "vymazDatum"))
+ funkce_statutar_organu = str(get_prop(elem, "funkce"))
+ typ_osoby = str(get_prop(elem, "hodnotaText"))
+ funkceOd = str(get_prop(elem, "funkceOd"))
+ clenstviOd = str(get_prop(elem, "clenstviOd"))
+ funkceDo = str(get_prop(elem, "funkceDo"))
+ clenstviDo = str(get_prop(elem, "clenstviDo"))
+ if typ_osoby == "AngazmaFyzicke":
+ osoba_id = find_fyzicka_osoba(c, ICO, elem, conn, relationship_table_key, element)
+ adresa_id = find_and_store_address(c, elem)
+ c.execute("INSERT into dr_organ_clen_relation (dozorci_rada_id, osoba_id, adresa_id, zapis_datum, vymaz_datum, funkce_od, funkce_do, clenstvi_od, clenstvi_do, funkce) VALUES (?,?,?,?,?,?,?,?,?,?)", (relationship_table_key, osoba_id, adresa_id, zapis_datum, vymaz_datum, funkceOd, funkceDo, clenstviOd, clenstviDo, funkce_statutar_organu,))
+ except Exception as f:
+ print(f)
+
def find_fyzicka_osoba(c, ICO, elem, conn, relationship_table_key, element):
try:
jmeno = str(get_prop(elem, "osoba/jmeno"))
@@ -262,6 +305,17 @@ def find_pocet_clenu(c, ICO, elem, conn, relationship_table_key, element): except Exception as f:
print(f)
+# COMBINE WITH THE ABOVE
+def find_pocet_clenu_dr(c, ICO, elem, conn, relationship_table_key, element):
+ try:
+ zapis_datum = str(get_prop(elem, "zapisDatum"))
+ vymaz_datum = str(get_prop(elem, "vymazDatum"))
+ pocet_clenu_number = str(get_prop(elem, "hodnotaText"))
+ c.execute("INSERT into pocty_clenu_DR (organ_id, pocet_clenu_value, zapis_datum, vymaz_datum) VALUES (?,?,?,?)", (relationship_table_key, pocet_clenu_number, zapis_datum, vymaz_datum,))
+ # print(ICO, zapis_datum, vymaz_datum, pocet_clenu_number)
+ except Exception as f:
+ print(f)
+
def find_zpusob_jednani(c, ICO, elem, conn, relationship_table_key, element):
try:
zapis_datum = str(get_prop(elem, "zapisDatum"))
@@ -727,6 +781,10 @@ class adresa(object): return str(self.obec + " " + self.cisloText + " " + "okres " + self.okres + ", PSČ " + self.psc)
elif self.ulice == None:
return str(self.obec + " " + self.cisloText + " " + "okres " + self.okres)
+ elif self.obec != None and self.ulice != None and self.psc != None:
+ return str(self.obec + ", " + self.ulice + " " + self.cisloText + ", PSČ " + self.psc)
+ elif self.obec != None and self.ulice != None:
+ return str(self.obec + ", " + self.ulice + " " + self.cisloText)
if self.ulice != None :
if self.cisloOr != None:
if self.cisloPo == None:
@@ -883,17 +941,16 @@ def delete_archive(file): send2trash.send2trash(file)
purge_DB()
-# general_update("db_update")
-parse_to_DB("as-full-ostrava-2021.xml")
+# parse_to_DB("data/as-full-ceske_budejovice-2021.xml")
# parse_to_DB("sro-full-ceske_budejovice-2021.xml")
# parse_to_DB("sro-actual-praha-2020.xml")
-# def do_both():
-# general_update("down")
-# general_update("db_update")
+def do_both():
+ general_update("down")
+ general_update("db_update")
# do_both()
-# cProfile.run('general_update("db_update")')
\ No newline at end of file +cProfile.run('general_update("db_update")')
\ No newline at end of file @@ -4,7 +4,9 @@ from db_setup import init_db, db_session from forms import JusticeSearchForm, CompanyForm from flask import flash, render_template, request, redirect # from models import Company, Soud -from models import Company, Obce, Ulice, Insolvency_Events, Predmet_Podnikani, Predmety_Podnikani_Association, Predmet_Cinnosti, Predmety_Cinnosti_Association, Zakladni_Kapital, Akcie, Nazvy, Sidlo, Sidlo_Association, Pravni_Forma_Association_v2, Pravni_Formy, Statutarni_Organ_Association, Statutarni_Organy, Pocty_Clenu_Organu, Zpusob_Jednani_Association, Zpusob_Jednani, Statutarni_Organ_Clen_Association, Fyzicka_Osoba +from models import Company, Obce, Ulice, Insolvency_Events, Predmet_Podnikani, Predmety_Podnikani_Association, Predmet_Cinnosti, Predmety_Cinnosti_Association +from models import Zakladni_Kapital, Akcie, Nazvy, Sidlo, Sidlo_Association, Pravni_Forma_Association_v2, Pravni_Formy, Statutarni_Organ_Association, Statutarni_Organy, Pocty_Clenu_Organu +from models import Zpusob_Jednani_Association, Zpusob_Jednani, Statutarni_Organ_Clen_Association, Fyzicka_Osoba from tables import Results init_db() @@ -12,12 +12,15 @@ import sqlalchemy.types as types def convert_date_to_string(converted_date): - if converted_date == 0: - return converted_date - else: - separated_string = converted_date.split("-") - converted_string = "".join([strip_zero_from_date(separated_string[2]), ". ", convert_month_to_string(separated_string[1]), " ", separated_string[0]]) - return converted_string + try: + if converted_date == 0: + return converted_date + else: + separated_string = converted_date.split("-") + converted_string = "".join([strip_zero_from_date(separated_string[2]), ". ", convert_month_to_string(separated_string[1]), " ", separated_string[0]]) + return converted_string + except: + return "" def strip_zero_from_date(converted_date): if converted_date[0] == "0": @@ -178,6 +181,19 @@ class Statutarni_Organ_Association(db.Model): zpusoby_jednani = db.relationship("Zpusob_Jednani_Association", back_populates="statutarni_organ") clenove = db.relationship("Statutarni_Organ_Clen_Association") +class Dozorci_Rada_Association(db.Model): + __tablename__ = 'dozorci_rada_relation' + id = db.Column(db.Integer, primary_key=True) + company_id = db.Column(db.Integer, db.ForeignKey('companies.id'), nullable=False) + # statutarni_organ_id = db.Column(db.Integer, db.ForeignKey('statutarni_organy.id'), nullable=False, primary_key=True) + zapis_datum = db.Column(MyType) + vymaz_datum = db.Column(MyType) + # statutarni_organ_text = db.relationship("Statutarni_Organy", back_populates="company_statutarni_organ") + # company = db.relationship("Company", back_populates="statutarni_organ_text") + pocet_clenu = db.relationship("Pocty_Clenu_DR", backref="dozorci_rada_relation") + # zpusoby_jednani = db.relationship("Zpusob_Jednani_Association", back_populates="statutarni_organ") + clenove = db.relationship("Dozorci_Rada_Clen_Association") + class Statutarni_Organ_Clen_Association(db.Model): __tablename__ = 'statutarni_organ_clen_relation' id = db.Column(db.Integer, primary_key=True) @@ -194,6 +210,22 @@ class Statutarni_Organ_Clen_Association(db.Model): adresa = db.relationship("Sidlo") jmeno = db.relationship("Fyzicka_Osoba") +class Dozorci_Rada_Clen_Association(db.Model): + __tablename__ = 'dr_organ_clen_relation' + id = db.Column(db.Integer, primary_key=True) + dozorci_rada_id = db.Column(db.Integer, db.ForeignKey('dozorci_rada_relation.id'), nullable=False) + osoba_id = db.Column(db.Integer, db.ForeignKey('fyzicke_osoby.id'), nullable=False) + adresa_id = db.Column(db.Integer, db.ForeignKey('adresy.id'), nullable=False) + zapis_datum = db.Column(MyType) + vymaz_datum = db.Column(MyType) + funkce_od = db.Column(MyType) + funkce_do = db.Column(MyType) + clenstvi_od = db.Column(MyType) + clenstvi_do = db.Column(MyType) + funkce = db.Column(db.String) + adresa = db.relationship("Sidlo") + jmeno = db.relationship("Fyzicka_Osoba") + class Zpusob_Jednani_Association(db.Model): __tablename__ = 'zpusoby_jednani_relation' id = db.Column(db.Integer, primary_key=True) @@ -204,7 +236,6 @@ class Zpusob_Jednani_Association(db.Model): zpusob_jednani = relationship("Zpusob_Jednani", back_populates="zpusob_jednani_rship") statutarni_organ = relationship("Statutarni_Organ_Association", back_populates="zpusoby_jednani") - class Company(db.Model): __tablename__ = "companies" id = db.Column(db.Integer, primary_key=True) @@ -230,6 +261,7 @@ class Company(db.Model): sidlo_text = db.relationship("Sidlo_Association", back_populates="company") pravni_forma_text = db.relationship("Pravni_Forma_Association_v2", back_populates="company") statutarni_organ_text = db.relationship("Statutarni_Organ_Association", back_populates="company") + dozorci_rada_text = db.relationship("Dozorci_Rada_Association") class Obce(db.Model): __tablename__ = "obce" @@ -355,6 +387,14 @@ class Pocty_Clenu_Organu(db.Model): vymaz_datum = db.Column(MyType) pocet_clenu_value = db.Column(db.String) +class Pocty_Clenu_DR(db.Model): + __tablename__ = "pocty_clenu_DR" + id = db.Column(db.Integer, primary_key=True) + organ_id = db.Column(db.String, db.ForeignKey("dozorci_rada_relation.id")) + zapis_datum = db.Column(MyType) + vymaz_datum = db.Column(MyType) + pocet_clenu_value = db.Column(db.String) + class Zpusob_Jednani(db.Model): __tablename__ = "zpusoby_jednani" id = db.Column(db.Integer, primary_key=True) diff --git a/templates/extract.html b/templates/extract.html index 7f1585f..b404a74 100644 --- a/templates/extract.html +++ b/templates/extract.html @@ -351,22 +351,48 @@ <td>{{ underlne_style_open|safe }} Zapsáno: {{ row.statutarni_organ_text[0].zapis_datum }} {% if row.statutarni_organ_text[0].vymaz_datum != 0 %} <br> Vymazáno: {{ row.statutarni_organ_text[0].vymaz_datum }} {% endif %} {{ underlne_style_close|safe }}</td> </tr> - <!-- Zde zacinam --> + <!-- Insert board members --> {% if row.statutarni_organ_text[0].clenove|length > 0 %} <tr> - <td style = padding-left:2em>{{ row.statutarni_organ_text[0].clenove[0].funkce }}</td> - <td>{{ row.statutarni_organ_text[0].clenove[0].jmeno.jmeno }} {{ row.statutarni_organ_text[0].clenove[0].jmeno.prijmeni }}, nar. {{ row.statutarni_organ_text[0].clenove[0].jmeno.datum_naroz }} <br> {{ row.statutarni_organ_text[0].clenove[0].adresa.adresa_text }} </td> - <td></td> + <td style = padding-left:2em>{% if row.statutarni_organ_text[0].clenove[0].funkce != "0" %} {{ row.statutarni_organ_text[0].clenove[0].funkce }} {% endif %}</td> + {% if row.statutarni_organ_text[0].clenove[0].vymaz_datum != 0 %} + {% set underlne_style_open = undedrline_open_deleted %} + {% set underlne_style_close = undedrline_closed_deleted %} + {% else %} + {% set underlne_style_open = "" %} + {% set underlne_style_close = "" %} + {% endif %} + <td>{{ underlne_style_open|safe }} {{ row.statutarni_organ_text[0].clenove[0].jmeno.jmeno }} {{ row.statutarni_organ_text[0].clenove[0].jmeno.prijmeni }}{% if row.statutarni_organ_text[0].clenove[0].jmeno.datum_naroz != "" %}, nar. {{ row.statutarni_organ_text[0].clenove[0].jmeno.datum_naroz }} {% endif %} <br> + {{ row.statutarni_organ_text[0].clenove[0].adresa.adresa_text }} + {% if row.statutarni_organ_text[0].clenove[0].funkce_od != 0 %}<br>Den vzniku funkce: {{ row.statutarni_organ_text[0].clenove[0].funkce_od}}{% endif %} + {% if row.statutarni_organ_text[0].clenove[0].funkce_do != 0 %}<br>Den zániku funkce: {{ row.statutarni_organ_text[0].clenove[0].funkce_do}}{% endif %} + {% if row.statutarni_organ_text[0].clenove[0].clenstvi_od != 0 %}<br>Den vzniku členství: {{ row.statutarni_organ_text[0].clenove[0].clenstvi_od}}{% endif %} + {% if row.statutarni_organ_text[0].clenove[0].clenstvi_do != 0 %}<br>Den zániku členství: {{ row.statutarni_organ_text[0].clenove[0].clenstvi_do}}{% endif %} + {{ underlne_style_close|safe }}</td> + <td>{{ underlne_style_open|safe }} Zapsáno: {{ row.statutarni_organ_text[0].clenove[0].zapis_datum }} {% if row.statutarni_organ_text[0].clenove[0].vymaz_datum != 0 %} <br> Vymazáno: {{ row.statutarni_organ_text[0].clenove[0].vymaz_datum }} {% endif %} {{ underlne_style_close|safe }}</td> </tr> {% for i in range (1, row.statutarni_organ_text[0].clenove|length) %} <tr> - <td style = padding-left:2em>{{ row.statutarni_organ_text[0].clenove[i].funkce }}</td> - <td>{{ row.statutarni_organ_text[0].clenove[i].jmeno.jmeno }} {{ row.statutarni_organ_text[0].clenove[i].jmeno.prijmeni }}, nar. {{ row.statutarni_organ_text[0].clenove[i].jmeno.datum_naroz }} <br> {{ row.statutarni_organ_text[0].clenove[i].adresa.adresa_text }} </td> - <td></td> + <td style = padding-left:2em>{% if row.statutarni_organ_text[0].clenove[i].funkce != "0" %} {{ row.statutarni_organ_text[0].clenove[i].funkce }} {% endif %}</td> + {% if row.statutarni_organ_text[0].clenove[i].vymaz_datum != 0 %} + {% set underlne_style_open = undedrline_open_deleted %} + {% set underlne_style_close = undedrline_closed_deleted %} + {% else %} + {% set underlne_style_open = "" %} + {% set underlne_style_close = "" %} + {% endif %} + <td>{{ underlne_style_open|safe }} {{ row.statutarni_organ_text[0].clenove[i].jmeno.jmeno }} {{ row.statutarni_organ_text[0].clenove[i].jmeno.prijmeni }}{% if row.statutarni_organ_text[0].clenove[i].jmeno.datum_naroz != "" %}, nar. {{ row.statutarni_organ_text[0].clenove[i].jmeno.datum_naroz }}{% endif %} <br> + {{ row.statutarni_organ_text[0].clenove[i].adresa.adresa_text }} + {% if row.statutarni_organ_text[0].clenove[i].funkce_od != 0 %}<br>Den vzniku funkce: {{ row.statutarni_organ_text[0].clenove[i].funkce_od}}{% endif %} + {% if row.statutarni_organ_text[0].clenove[i].funkce_do != 0 %}<br>Den zániku funkce: {{ row.statutarni_organ_text[0].clenove[i].funkce_do}}{% endif %} + {% if row.statutarni_organ_text[0].clenove[i].clenstvi_od != 0 %}<br>Den vzniku členství: {{ row.statutarni_organ_text[0].clenove[i].clenstvi_od}}{% endif %} + {% if row.statutarni_organ_text[0].clenove[i].clenstvi_do != 0 %}<br>Den zániku členství: {{ row.statutarni_organ_text[0].clenove[i].clenstvi_do}}{% endif %} + {{ underlne_style_close|safe }}</td> + <td>{{ underlne_style_open|safe }} Zapsáno: {{ row.statutarni_organ_text[0].clenove[i].zapis_datum }} {% if row.statutarni_organ_text[0].clenove[i].vymaz_datum != 0 %} <br> Vymazáno: {{ row.statutarni_organ_text[0].clenove[i].vymaz_datum }} {% endif %} {{ underlne_style_close|safe }}</td> </tr> {% endfor %} {% endif %} - <!-- Zde koncim --> + <!-- End insert of board members --> {% if row.statutarni_organ_text[0].pocet_clenu|length > 0 %} <tr> @@ -440,22 +466,48 @@ <td>{{ underlne_style_open|safe }} Zapsáno: {{ row.statutarni_organ_text[i].zapis_datum }} {% if row.statutarni_organ_text[i].vymaz_datum != 0 %} <br> Vymazáno: {{ row.statutarni_organ_text[i].vymaz_datum }} {% endif %} {{ underlne_style_close|safe }}</td> </tr> - <!-- Zde zacinam --> + <!-- Insert Board Members --> {% if row.statutarni_organ_text[i].clenove|length > 0 %} <tr> - <td style = padding-left:2em>{{ row.statutarni_organ_text[i].clenove[0].funkce }}</td> - <td>{{ row.statutarni_organ_text[i].clenove[0].jmeno.jmeno }} {{ row.statutarni_organ_text[i].clenove[0].jmeno.prijmeni }}, nar. {{ row.statutarni_organ_text[i].clenove[0].jmeno.datum_naroz }} <br> {{ row.statutarni_organ_text[i].clenove[0].adresa.adresa_text }} </td> - <td></td> + <td style = padding-left:2em>{% if row.statutarni_organ_text[i].clenove[0].funkce != "0" %} {{ row.statutarni_organ_text[i].clenove[0].funkce }} {% endif %}</td> + {% if row.statutarni_organ_text[i].clenove[0].vymaz_datum != 0 %} + {% set underlne_style_open = undedrline_open_deleted %} + {% set underlne_style_close = undedrline_closed_deleted %} + {% else %} + {% set underlne_style_open = "" %} + {% set underlne_style_close = "" %} + {% endif %} + <td>{{ underlne_style_open|safe }} {{ row.statutarni_organ_text[i].clenove[0].jmeno.jmeno }} {{ row.statutarni_organ_text[i].clenove[0].jmeno.prijmeni }}{% if row.statutarni_organ_text[i].clenove[0].jmeno.datum_naroz != "" %}, nar. {{ row.statutarni_organ_text[i].clenove[0].jmeno.datum_naroz }}{% endif %} <br> + {{ row.statutarni_organ_text[i].clenove[0].adresa.adresa_text }} + {% if row.statutarni_organ_text[i].clenove[0].funkce_od != 0 %}<br>Den vzniku funkce: {{ row.statutarni_organ_text[i].clenove[0].funkce_od}}{% endif %} + {% if row.statutarni_organ_text[i].clenove[0].funkce_do != 0 %}<br>Den zániku funkce: {{ row.statutarni_organ_text[i].clenove[0].funkce_do}}{% endif %} + {% if row.statutarni_organ_text[i].clenove[0].clenstvi_od != 0 %}<br>Den vzniku členství: {{ row.statutarni_organ_text[i].clenove[0].clenstvi_od}}{% endif %} + {% if row.statutarni_organ_text[i].clenove[0].clenstvi_do != 0 %}<br>Den zániku členství: {{ row.statutarni_organ_text[i].clenove[0].clenstvi_do}}{% endif %} + {{ underlne_style_close|safe }}</td> + <td>{{ underlne_style_open|safe }} Zapsáno: {{ row.statutarni_organ_text[i].clenove[0].zapis_datum }} {% if row.statutarni_organ_text[i].clenove[0].vymaz_datum != 0 %} <br> Vymazáno: {{ row.statutarni_organ_text[i].clenove[0].vymaz_datum }} {% endif %} {{ underlne_style_close|safe }}</td> </tr> {% for j in range (1, row.statutarni_organ_text[i].clenove|length) %} <tr> - <td style = padding-left:2em>{{ row.statutarni_organ_text[i].clenove[j].funkce }}</td> - <td>{{ row.statutarni_organ_text[i].clenove[j].jmeno.jmeno }} {{ row.statutarni_organ_text[i].clenove[j].jmeno.prijmeni }}, nar. {{ row.statutarni_organ_text[i].clenove[j].jmeno.datum_naroz }} <br> {{ row.statutarni_organ_text[i].clenove[j].adresa.adresa_text }} </td> - <td></td> + <td style = padding-left:2em>{% if row.statutarni_organ_text[i].clenove[j].funkce != "0" %} {{ row.statutarni_organ_text[i].clenove[j].funkce }} {% endif %}</td> + {% if row.statutarni_organ_text[i].clenove[j].vymaz_datum != 0 %} + {% set underlne_style_open = undedrline_open_deleted %} + {% set underlne_style_close = undedrline_closed_deleted %} + {% else %} + {% set underlne_style_open = "" %} + {% set underlne_style_close = "" %} + {% endif %} + <td>{{ underlne_style_open|safe }} {{ row.statutarni_organ_text[i].clenove[j].jmeno.jmeno }} {{ row.statutarni_organ_text[i].clenove[j].jmeno.prijmeni }}{% if row.statutarni_organ_text[i].clenove[j].jmeno.datum_naroz != "" %}, nar. {{ row.statutarni_organ_text[i].clenove[j].jmeno.datum_naroz }}{% endif %} <br> + {{ row.statutarni_organ_text[i].clenove[j].adresa.adresa_text }} + {% if row.statutarni_organ_text[i].clenove[j].funkce_od != 0 %}<br>Den vzniku funkce: {{ row.statutarni_organ_text[i].clenove[j].funkce_od}}{% endif %} + {% if row.statutarni_organ_text[i].clenove[j].funkce_do != 0 %}<br>Den zániku funkce: {{ row.statutarni_organ_text[i].clenove[j].funkce_do}}{% endif %} + {% if row.statutarni_organ_text[i].clenove[j].clenstvi_od != 0 %}<br>Den vzniku členství: {{ row.statutarni_organ_text[i].clenove[j].clenstvi_od}}{% endif %} + {% if row.statutarni_organ_text[i].clenove[j].clenstvi_do != 0 %}<br>Den zániku členství: {{ row.statutarni_organ_text[i].clenove[j].clenstvi_do}}{% endif %} + {{ underlne_style_close|safe }}</td> + <td>{{ underlne_style_open|safe }} Zapsáno: {{ row.statutarni_organ_text[i].clenove[j].zapis_datum }} {% if row.statutarni_organ_text[i].clenove[j].vymaz_datum != 0 %} <br> Vymazáno: {{ row.statutarni_organ_text[i].clenove[j].vymaz_datum }} {% endif %} {{ underlne_style_close|safe }}</td> </tr> {% endfor %} {% endif %} - <!-- Zde koncim --> + <!-- End Insert of Board Members --> {% if row.statutarni_organ_text[i].pocet_clenu|length > 0 %} @@ -519,7 +571,193 @@ {% endfor %} {% endif %} - + + +<!--SUPERVISORY BOARD BEGINNING--> + {% if row.dozorci_rada_text|length > 0 %} + <tr> + <td>Dozorčí rada:</td> + {% if row.dozorci_rada_text[0].vymaz_datum != 0 %} + {% set underlne_style_open = undedrline_open_deleted %} + {% set underlne_style_close = undedrline_closed_deleted %} + {% else %} + {% set underlne_style_open = "" %} + {% set underlne_style_close = "" %} + {% endif %} + <td>{{ underlne_style_open|safe }} {{ underlne_style_close|safe }}</td> + <td>{{ underlne_style_open|safe }} Zapsáno: {{ row.dozorci_rada_text[0].zapis_datum }} {% if row.dozorci_rada_text[0].vymaz_datum != 0 %} <br> Vymazáno: {{ row.dozorci_rada_text[0].vymaz_datum }} {% endif %} {{ underlne_style_close|safe }}</td> + </tr> + + <!-- Insert supervisory board members --> + {% if row.dozorci_rada_text[0].clenove|length > 0 %} + <tr> + <td style = padding-left:2em>{% if row.dozorci_rada_text[0].clenove[0].funkce != "0" %} {{ row.dozorci_rada_text[0].clenove[0].funkce }} {% endif %}</td> + {% if row.dozorci_rada_text[0].clenove[0].vymaz_datum != 0 %} + {% set underlne_style_open = undedrline_open_deleted %} + {% set underlne_style_close = undedrline_closed_deleted %} + {% else %} + {% set underlne_style_open = "" %} + {% set underlne_style_close = "" %} + {% endif %} + <td>{{ underlne_style_open|safe }} {{ row.dozorci_rada_text[0].clenove[0].jmeno.jmeno }} {{ row.dozorci_rada_text[0].clenove[0].jmeno.prijmeni }}{% if row.dozorci_rada_text[0].clenove[0].jmeno.datum_naroz != "" %}, nar. {{ row.dozorci_rada_text[0].clenove[0].jmeno.datum_naroz }} {% endif %} <br> + {{ row.dozorci_rada_text[0].clenove[0].adresa.adresa_text }} + {% if row.dozorci_rada_text[0].clenove[0].funkce_od != 0 %}<br>Den vzniku funkce: {{ row.dozorci_rada_text[0].clenove[0].funkce_od}}{% endif %} + {% if row.dozorci_rada_text[0].clenove[0].funkce_do != 0 %}<br>Den zániku funkce: {{ row.dozorci_rada_text[0].clenove[0].funkce_do}}{% endif %} + {% if row.dozorci_rada_text[0].clenove[0].clenstvi_od != 0 %}<br>Den vzniku členství: {{ row.dozorci_rada_text[0].clenove[0].clenstvi_od}}{% endif %} + {% if row.dozorci_rada_text[0].clenove[0].clenstvi_do != 0 %}<br>Den zániku členství: {{ row.dozorci_rada_text[0].clenove[0].clenstvi_do}}{% endif %} + {{ underlne_style_close|safe }}</td> + <td>{{ underlne_style_open|safe }} Zapsáno: {{ row.dozorci_rada_text[0].clenove[0].zapis_datum }} {% if row.dozorci_rada_text[0].clenove[0].vymaz_datum != 0 %} <br> Vymazáno: {{ row.dozorci_rada_text[0].clenove[0].vymaz_datum }} {% endif %} {{ underlne_style_close|safe }}</td> + </tr> + {% for i in range (1, row.dozorci_rada_text[0].clenove|length) %} + <tr> + <td style = padding-left:2em>{% if row.dozorci_rada_text[0].clenove[i].funkce != "0" %} {{ row.dozorci_rada_text[0].clenove[i].funkce }} {% endif %}</td> + {% if row.dozorci_rada_text[0].clenove[i].vymaz_datum != 0 %} + {% set underlne_style_open = undedrline_open_deleted %} + {% set underlne_style_close = undedrline_closed_deleted %} + {% else %} + {% set underlne_style_open = "" %} + {% set underlne_style_close = "" %} + {% endif %} + <td>{{ underlne_style_open|safe }} {{ row.dozorci_rada_text[0].clenove[i].jmeno.jmeno }} {{ row.dozorci_rada_text[0].clenove[i].jmeno.prijmeni }}{% if row.dozorci_rada_text[0].clenove[i].jmeno.datum_naroz != "" %}, nar. {{ row.dozorci_rada_text[0].clenove[i].jmeno.datum_naroz }}{% endif %} <br> + {{ row.dozorci_rada_text[0].clenove[i].adresa.adresa_text }} + {% if row.dozorci_rada_text[0].clenove[i].funkce_od != 0 %}<br>Den vzniku funkce: {{ row.dozorci_rada_text[0].clenove[i].funkce_od}}{% endif %} + {% if row.dozorci_rada_text[0].clenove[i].funkce_do != 0 %}<br>Den zániku funkce: {{ row.dozorci_rada_text[0].clenove[i].funkce_do}}{% endif %} + {% if row.dozorci_rada_text[0].clenove[i].clenstvi_od != 0 %}<br>Den vzniku členství: {{ row.dozorci_rada_text[0].clenove[i].clenstvi_od}}{% endif %} + {% if row.dozorci_rada_text[0].clenove[i].clenstvi_do != 0 %}<br>Den zániku členství: {{ row.dozorci_rada_text[0].clenove[i].clenstvi_do}}{% endif %} + {{ underlne_style_close|safe }}</td> + <td>{{ underlne_style_open|safe }} Zapsáno: {{ row.dozorci_rada_text[0].clenove[i].zapis_datum }} {% if row.dozorci_rada_text[0].clenove[i].vymaz_datum != 0 %} <br> Vymazáno: {{ row.dozorci_rada_text[0].clenove[i].vymaz_datum }} {% endif %} {{ underlne_style_close|safe }}</td> + </tr> + {% endfor %} + {% endif %} + <!-- Insert supervisory board members END --> + + <!-- Insert number of supervisory board members --> + {% if row.dozorci_rada_text[0].pocet_clenu|length > 0 %} + <tr> + <td style = padding-left:2em>Počet členů orgánů:</td> + {% if row.dozorci_rada_text[0].pocet_clenu[0].vymaz_datum != 0 %} + {% set underlne_style_open = undedrline_open_deleted %} + {% set underlne_style_close = undedrline_closed_deleted %} + {% else %} + {% set underlne_style_open = "" %} + {% set underlne_style_close = "" %} + {% endif %} + <td>{{ underlne_style_open|safe }} {{ row.dozorci_rada_text[0].pocet_clenu[0].pocet_clenu_value }} {{ underlne_style_close|safe }}</td> + <td>{{ underlne_style_open|safe }} Zapsáno: {{ row.dozorci_rada_text[0].pocet_clenu[0].zapis_datum }} {% if row.dozorci_rada_text[0].pocet_clenu[0].vymaz_datum != 0 %} <br> Vymazáno: {{ row.dozorci_rada_text[0].pocet_clenu[0].vymaz_datum }} {% endif %} {{ underlne_style_close|safe }}</td> + </tr> + {% for i in range (1, row.dozorci_rada_text[0].pocet_clenu|length) %} + <tr> + <td></td> + {% if row.dozorci_rada_text[0].pocet_clenu[i].vymaz_datum != 0 %} + {% set underlne_style_open = undedrline_open_deleted %} + {% set underlne_style_close = undedrline_closed_deleted %} + {% else %} + {% set underlne_style_open = "" %} + {% set underlne_style_close = "" %} + {% endif %} + <td>{{ underlne_style_open|safe }} {{ row.dozorci_rada_text[0].pocet_clenu[i].pocet_clenu_value }} {{ underlne_style_close|safe }}</td> + <td>{{ underlne_style_open|safe }} Zapsáno: {{ row.dozorci_rada_text[0].pocet_clenu[i].zapis_datum }} {% if row.dozorci_rada_text[0].pocet_clenu[i].vymaz_datum != 0 %} <br> Vymazáno: {{ row.dozorci_rada_text[0].pocet_clenu[i].vymaz_datum }} {% endif %} {{ underlne_style_close|safe }}</td> + </tr> + {% endfor %} + {% endif %} +<!-- Insert number of supervisory board members --> + +<!--Alternative if there are more records for supervisory board--> + + {% for i in range (1, row.dozorci_rada_text|length) %} + <tr> + <td>Dozorčí rada:</td> + {% if row.dozorci_rada_text[i].vymaz_datum != 0 %} + {% set underlne_style_open = undedrline_open_deleted %} + {% set underlne_style_close = undedrline_closed_deleted %} + {% else %} + {% set underlne_style_open = "" %} + {% set underlne_style_close = "" %} + {% endif %} + <td>{{ underlne_style_open|safe }} {{ underlne_style_close|safe }}</td> + <td>{{ underlne_style_open|safe }} Zapsáno: {{ row.dozorci_rada_text[i].zapis_datum }} {% if row.dozorci_rada_text[i].vymaz_datum != 0 %} <br> Vymazáno: {{ row.dozorci_rada_text[i].vymaz_datum }} {% endif %} {{ underlne_style_close|safe }}</td> + </tr> + + <!-- Insert Supervisory Board Members --> + {% if row.dozorci_rada_text[i].clenove|length > 0 %} + <tr> + <td style = padding-left:2em>{% if row.dozorci_rada_text[i].clenove[0].funkce != "0" %} {{ row.dozorci_rada_text[i].clenove[0].funkce }} {% endif %}</td> + {% if row.dozorci_rada_text[i].clenove[0].vymaz_datum != 0 %} + {% set underlne_style_open = undedrline_open_deleted %} + {% set underlne_style_close = undedrline_closed_deleted %} + {% else %} + {% set underlne_style_open = "" %} + {% set underlne_style_close = "" %} + {% endif %} + <td>{{ underlne_style_open|safe }} {{ row.dozorci_rada_text[i].clenove[0].jmeno.jmeno }} {{ row.dozorci_rada_text[i].clenove[0].jmeno.prijmeni }}{% if row.dozorci_rada_text[i].clenove[0].jmeno.datum_naroz != "" %}, nar. {{ row.dozorci_rada_text[i].clenove[0].jmeno.datum_naroz }}{% endif %} <br> + {{ row.dozorci_rada_text[i].clenove[0].adresa.adresa_text }} + {% if row.dozorci_rada_text[i].clenove[0].funkce_od != 0 %}<br>Den vzniku funkce: {{ row.dozorci_rada_text[i].clenove[0].funkce_od}}{% endif %} + {% if row.dozorci_rada_text[i].clenove[0].funkce_do != 0 %}<br>Den zániku funkce: {{ row.dozorci_rada_text[i].clenove[0].funkce_do}}{% endif %} + {% if row.dozorci_rada_text[i].clenove[0].clenstvi_od != 0 %}<br>Den vzniku členství: {{ row.dozorci_rada_text[i].clenove[0].clenstvi_od}}{% endif %} + {% if row.dozorci_rada_text[i].clenove[0].clenstvi_do != 0 %}<br>Den zániku členství: {{ row.dozorci_rada_text[i].clenove[0].clenstvi_do}}{% endif %} + {{ underlne_style_close|safe }}</td> + <td>{{ underlne_style_open|safe }} Zapsáno: {{ row.dozorci_rada_text[i].clenove[0].zapis_datum }} {% if row.dozorci_rada_text[i].clenove[0].vymaz_datum != 0 %} <br> Vymazáno: {{ row.dozorci_rada_text[i].clenove[0].vymaz_datum }} {% endif %} {{ underlne_style_close|safe }}</td> + </tr> + {% for j in range (1, row.dozorci_rada_text[i].clenove|length) %} + <tr> + <td style = padding-left:2em>{% if row.dozorci_rada_text[i].clenove[j].funkce != "0" %} {{ row.dozorci_rada_text[i].clenove[j].funkce }} {% endif %}</td> + {% if row.dozorci_rada_text[i].clenove[j].vymaz_datum != 0 %} + {% set underlne_style_open = undedrline_open_deleted %} + {% set underlne_style_close = undedrline_closed_deleted %} + {% else %} + {% set underlne_style_open = "" %} + {% set underlne_style_close = "" %} + {% endif %} + <td>{{ underlne_style_open|safe }} {{ row.dozorci_rada_text[i].clenove[j].jmeno.jmeno }} {{ row.dozorci_rada_text[i].clenove[j].jmeno.prijmeni }}{% if row.dozorci_rada_text[i].clenove[j].jmeno.datum_naroz != "" %}, nar. {{ row.dozorci_rada_text[i].clenove[j].jmeno.datum_naroz }}{% endif %} <br> + {{ row.dozorci_rada_text[i].clenove[j].adresa.adresa_text }} + {% if row.dozorci_rada_text[i].clenove[j].funkce_od != 0 %}<br>Den vzniku funkce: {{ row.dozorci_rada_text[i].clenove[j].funkce_od}}{% endif %} + {% if row.dozorci_rada_text[i].clenove[j].funkce_do != 0 %}<br>Den zániku funkce: {{ row.dozorci_rada_text[i].clenove[j].funkce_do}}{% endif %} + {% if row.dozorci_rada_text[i].clenove[j].clenstvi_od != 0 %}<br>Den vzniku členství: {{ row.dozorci_rada_text[i].clenove[j].clenstvi_od}}{% endif %} + {% if row.dozorci_rada_text[i].clenove[j].clenstvi_do != 0 %}<br>Den zániku členství: {{ row.dozorci_rada_text[i].clenove[j].clenstvi_do}}{% endif %} + {{ underlne_style_close|safe }}</td> + <td>{{ underlne_style_open|safe }} Zapsáno: {{ row.dozorci_rada_text[i].clenove[j].zapis_datum }} {% if row.dozorci_rada_text[i].clenove[j].vymaz_datum != 0 %} <br> Vymazáno: {{ row.dozorci_rada_text[i].clenove[j].vymaz_datum }} {% endif %} {{ underlne_style_close|safe }}</td> + </tr> + {% endfor %} + {% endif %} + <!-- End Insert of Board Members --> + + + {% if row.dozorci_rada_text[i].pocet_clenu|length > 0 %} + <tr> + <td style = padding-left:2em>Počet členů orgánů:</td> + {% if row.dozorci_rada_text[i].pocet_clenu[0].vymaz_datum != 0 %} + {% set underlne_style_open = undedrline_open_deleted %} + {% set underlne_style_close = undedrline_closed_deleted %} + {% else %} + {% set underlne_style_open = "" %} + {% set underlne_style_close = "" %} + {% endif %} + <td>{{ underlne_style_open|safe }} {{ row.dozorci_rada_text[i].pocet_clenu[0].pocet_clenu_value }} {{ underlne_style_close|safe }}</td> + <td>{{ underlne_style_open|safe }} Zapsáno: {{ row.dozorci_rada_text[i].pocet_clenu[0].zapis_datum }} {% if row.dozorci_rada_text[i].pocet_clenu[0].vymaz_datum != 0 %} <br> Vymazáno: {{ row.dozorci_rada_text[i].pocet_clenu[0].vymaz_datum }} {% endif %} {{ underlne_style_close|safe }}</td> + </tr> + {% for j in range (1, row.dozorci_rada_text[i].pocet_clenu|length) %} + <tr> + <td></td> + {% if row.dozorci_rada_text[i].pocet_clenu[j].vymaz_datum != 0 %} + {% set underlne_style_open = undedrline_open_deleted %} + {% set underlne_style_close = undedrline_closed_deleted %} + {% else %} + {% set underlne_style_open = "" %} + {% set underlne_style_close = "" %} + {% endif %} + <td>{{ underlne_style_open|safe }} {{ row.dozorci_rada_text[i].pocet_clenu[j].pocet_clenu_value }} {{ underlne_style_close|safe }}</td> + <td>{{ underlne_style_open|safe }} Zapsáno: {{ row.dozorci_rada_text[i].pocet_clenu[j].zapis_datum }} {% if row.dozorci_rada_text[i].pocet_clenu[j].vymaz_datum != 0 %} <br> Vymazáno: {{ row.dozorci_rada_text[i].pocet_clenu[j].vymaz_datum }} {% endif %} {{ underlne_style_close|safe }}</td> + </tr> + {% endfor %} + {% endif %} + + {% endfor %} + {% endif %} + +<!--Alternative if there are more records for supervisory board END--> + +<!--SUPERVISORY BOARD END--> + {% if row.akcie|length > 0 %} <tr> <td>Akcie:</td> |