INSERT INTO `menu` (`id`, `menu_id`, `nazov`, `page`, `poradie`, `level`, `visibility_type`) VALUES (41, 36, 'Zmeny zmluvných podmienok', 'zmena_zmluvnych_podmienok_vypis', 10, 2, 1);
INSERT INTO `menu` (`id`, `menu_id`, `nazov`, `page`, `poradie`, `level`, `visibility_type`) VALUES (42, 36, 'Pridanie zmeny zmluvných podmienok', 'zmena_zmluvnych_podmienok_pridaj', 20, 2, 3);
INSERT INTO `menu` (`id`, `menu_id`, `nazov`, `page`, `poradie`, `level`, `visibility_type`) VALUES (43, 41, 'Detail zmeny zmluvných podmienok', 'zmena_zmluvnych_podmienok_view', 10, 3, 1);
INSERT INTO `menu` (`id`, `menu_id`, `nazov`, `page`, `poradie`, `level`, `visibility_type`) VALUES (44, 41, 'Editovanie zmeny zmluvných podmienok', 'zmena_zmluvnych_podmienok_edituj', 20, 3, 1);
INSERT INTO `menu` (`id`, `menu_id`, `nazov`, `page`, `poradie`, `level`, `visibility_type`) VALUES (45, 41, 'Zmazanie zmeny zmluvných podmienok', 'zmena_zmluvnych_podmienok_zmaz', NULL, 3, NULL);
INSERT INTO `menu` (`id`, `menu_id`, `nazov`, `page`, `poradie`, `level`, `visibility_type`) VALUES (46, 41, 'Súbory zmeny zmluvných podmienok', 'zmena_zmluvnych_podmienok_subor', 40, 3, 1);
INSERT INTO `menu` (`id`, `menu_id`, `nazov`, `page`, `poradie`, `level`, `visibility_type`) VALUES (47, 41, 'Archív', 'zmena_zmluvnych_podmienok_archiv', 50, 3, 1);
INSERT INTO `menu` (`id`, `menu_id`, `nazov`, `page`, `poradie`, `level`, `visibility_type`) VALUES (48, 41, 'Foto k cenovej ponuke', 'zmena_zmluvnych_podmienok_foto', 30, 3, 1);
INSERT INTO `menu` (`id`, `menu_id`, `nazov`, `page`, `poradie`, `level`, `visibility_type`) VALUES (49, 41, 'Pridanie položky zmeny zmluvných podmienok', 'polozka_zmeny_zmluvnych_podmienok_pridaj', NULL, 3, NULL);
INSERT INTO `menu` (`id`, `menu_id`, `nazov`, `page`, `poradie`, `level`, `visibility_type`) VALUES (50, 41, 'Editovanie položky zmeny zmluvných podmienok', 'polozka_zmeny_zmluvnych_podmienok_edituj', NULL, 3, NULL);
INSERT INTO `menu` (`id`, `menu_id`, `nazov`, `page`, `poradie`, `level`, `visibility_type`) VALUES (51, 41, 'Zmazanie položky zmeny zmluvných podmienok', 'polozka_zmeny_zmluvnych_podmienok_zmaz', NULL, 3, NULL);

CREATE TABLE `zmena_zmluvnych_podmienok` (
                                 `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
                                 `visibility_type` INT(11) NULL DEFAULT NULL,
                                 `cislo` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
                                 `nazov` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
                                 `nadpis` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
                                 `cena_s_dph` DOUBLE(10,2) NULL DEFAULT NULL,
	`cena_bez_dph` DOUBLE(10,2) NULL DEFAULT NULL,
	`hash` VARCHAR(255) NULL DEFAULT '' COLLATE 'utf8_unicode_ci',
	`pocet_dni_splatnosti` INT(11) NULL DEFAULT NULL,
	`pocet_dni_platnosti` INT(11) NULL DEFAULT NULL,
	`interna_poznamka` TEXT NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
	`text_pre_zakaznika` TEXT NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
	`dolny_text` TEXT NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
	`obchodny_partner_id` INT(10) UNSIGNED NULL DEFAULT NULL,
	`osoba_id` INT(10) UNSIGNED NULL DEFAULT NULL,
	`projekt_id` INT(10) UNSIGNED NULL DEFAULT NULL,
	`vytvoril_id` INT(10) UNSIGNED NULL DEFAULT NULL,
	`stav_zmeny_zmluvnych_podmienok_id` INT(10) UNSIGNED NULL DEFAULT NULL,
	`datum_odoslania` DATETIME NULL DEFAULT NULL,
	`datum_vytvorenia` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
	`predpokladany_datum_dodania` DATE NULL DEFAULT NULL,
	`referencie_text` TEXT NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
	`verzia` INT(11) NULL DEFAULT NULL,
	`datum_pripomienky` DATETIME NULL DEFAULT NULL,
	`datum_odoslania_pripomienky` DATETIME NULL DEFAULT NULL,
	`zmena_zmluvnych_podmienok_id` INT(11) NULL DEFAULT NULL,
	`kategoria_produktu_id` INT(11) NULL DEFAULT NULL,
	`typ_zmeny_zmluvnych_podmienok_id` INT(11) NULL DEFAULT NULL,
	PRIMARY KEY (`id`) USING BTREE
)
    COLLATE='utf8_unicode_ci'
ENGINE=InnoDB
;

CREATE TABLE `polozka_zmeny_zmluvnych_podmienok` (
                                          `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
                                          `visibility_type` INT(11) NULL DEFAULT NULL,
                                          `zmena_zmluvnych_podmienok_id` INT(10) UNSIGNED NULL DEFAULT NULL,
                                          `nazov` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
                                          `kategoria_produktu_id` INT(10) UNSIGNED NULL DEFAULT NULL,
                                          `produkt_id` INT(10) UNSIGNED NULL DEFAULT NULL,
                                          `cena_bez_dph` DOUBLE(10,2) NULL DEFAULT NULL,
	`cena_info` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
	`mnozstvo` DOUBLE(8,2) NULL DEFAULT NULL,
	`popis` TEXT NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
	`merna_jednotka_id` INT(10) UNSIGNED NULL DEFAULT NULL,
	`zaruka` INT(11) NULL DEFAULT NULL,
	`poradie` INT(11) NULL DEFAULT NULL,
	`uloha_id` INT(11) NULL DEFAULT NULL,
	`skupina` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
	PRIMARY KEY (`id`) USING BTREE
)
    COLLATE='utf8_unicode_ci'
ENGINE=InnoDB
;

CREATE TABLE `stav_zmeny_zmluvnych_podmienok` (
                                       `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
                                       `nazov` VARCHAR(255) NOT NULL COLLATE 'utf8_unicode_ci',
                                       `code` VARCHAR(255) NOT NULL COLLATE 'utf8_unicode_ci',
                                       `poradie` INT(11) NOT NULL,
                                       PRIMARY KEY (`id`) USING BTREE
)
    COLLATE='utf8_unicode_ci'
ENGINE=InnoDB
;

INSERT INTO `stav_zmeny_zmluvnych_podmienok` (`id`, `nazov`, `code`, `poradie`) VALUES (1, 'Rozpracovaná', 'rozpracovana', 10);
INSERT INTO `stav_zmeny_zmluvnych_podmienok` (`id`, `nazov`, `code`, `poradie`) VALUES (2, 'Rozpracovaná (čaká sa na zákazníka)', 'rozpravcovana_zakaznik', 20);
INSERT INTO `stav_zmeny_zmluvnych_podmienok` (`id`, `nazov`, `code`, `poradie`) VALUES (3, 'Odložená', 'odlozena', 40);
INSERT INTO `stav_zmeny_zmluvnych_podmienok` (`id`, `nazov`, `code`, `poradie`) VALUES (4, 'Úspešná', 'uspesna', 50);
INSERT INTO `stav_zmeny_zmluvnych_podmienok` (`id`, `nazov`, `code`, `poradie`) VALUES (5, 'Neúspešná', 'neuspesna', 60);
INSERT INTO `stav_zmeny_zmluvnych_podmienok` (`id`, `nazov`, `code`, `poradie`) VALUES (7, 'Archív', 'archiv', 70);

CREATE TABLE `typ_zmeny_zmluvnych_podmienok` (
                                      `id` INT(11) NOT NULL AUTO_INCREMENT,
                                      `nazov` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8_general_ci',
                                      PRIMARY KEY (`id`) USING BTREE
)
    COLLATE='utf8_general_ci'
ENGINE=InnoDB
;

INSERT INTO `typ_zmeny_zmluvnych_podmienok` (`id`, `nazov`) VALUES (1, 'Bežné služby');
INSERT INTO `typ_zmeny_zmluvnych_podmienok` (`id`, `nazov`) VALUES (2, 'Koordinátor BOZP');
INSERT INTO `typ_zmeny_zmluvnych_podmienok` (`id`, `nazov`) VALUES (3, 'Typ 3');
INSERT INTO `typ_zmeny_zmluvnych_podmienok` (`id`, `nazov`) VALUES (4, 'Typ 4');

INSERT INTO `log_type` (`id`, `nazov`, `code`, `primary_table`) VALUES (632, 'Pridanie zmeny zmluvných podmienok', 'zmena_zmluvnych_podmienok_pridaj', NULL);
INSERT INTO `log_type` (`id`, `nazov`, `code`, `primary_table`) VALUES (633, 'Editovanie zmeny zmluvných podmienok', 'zmena_zmluvnych_podmienok_edituj', NULL);
INSERT INTO `log_type` (`id`, `nazov`, `code`, `primary_table`) VALUES (634, 'Zmazanie zmeny zmluvných podmienok', 'zmena_zmluvnych_podmienok_zmaz', NULL);

INSERT INTO `form` (`id`, `nazov`, `code`) VALUES (290, 'Zmena zmluvných podmienok', 'zmena_zmluvnych_podmienok');
INSERT INTO `form` (`id`, `nazov`, `code`) VALUES (291, 'Položka zmeny zmluvných podmienok', 'polozka_zmeny_zmluvnych_podmienok');

INSERT INTO `form_group` (`id`, `form_id`, `nazov`, `code`, `position`, `poznamka`, `group_type`) VALUES (290, 290, 'Základné informácie', 'zmena_zmluvnych_podmienok_zakladne_informacie', 10, NULL, 1);
INSERT INTO `form_group` (`id`, `form_id`, `nazov`, `code`, `position`, `poznamka`, `group_type`) VALUES (291, 290, 'Ďalšie informácie', 'zmena_zmluvnych_podmienok_dalsie_informacie', 20, NULL, 1);
INSERT INTO `form_group` (`id`, `form_id`, `nazov`, `code`, `position`, `poznamka`, `group_type`) VALUES (292, 290, 'Texty', 'zmena_zmluvnych_podmienok_texty', 30, NULL, 1);
INSERT INTO `form_group` (`id`, `form_id`, `nazov`, `code`, `position`, `poznamka`, `group_type`) VALUES (293, 291, 'Základné informácie', 'polozka_zmeny_zmluvnych_podmienok_zakladne_informacie', 10, NULL, 1);

INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (290, 290, 1, 'zmena_zmluvnych_podmienok', 'cislo', NULL, NULL, 'Číslo', 10, NULL, NULL, NULL, NULL, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '<vlvalidator name="customCislo" type="custom" function="vdaemonCislo">', NULL, NULL, NULL, NULL);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (291, 290, 11, 'zmena_zmluvnych_podmienok', 'datum_vytvorenia', NULL, NULL, 'Dátum vytvorenia', 20, '{"datetime_format":"d.m.Y H:i:s","step":1}', NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'NOW', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (292, 291, 4, 'zmena_zmluvnych_podmienok', 'predpokladany_datum_dodania', NULL, NULL, 'Predpokladný dátum dodania', 20, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (293, 290, 5, 'zmena_zmluvnych_podmienok', 'osoba_id', 'osoba', NULL, 'Kontaktná osoba', 50, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, 'select2', NULL, NULL, NULL, NULL, NULL, 1, '<a class="btn btn-primary get-ajax-form" href="osoba_pridaj_modal.php" title="Pridanie osoby" data-before-load="osoba.beforeLoad" data-parent="osoba_id"> <i class="fa fa-plus"></i></a>', NULL, NULL);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (294, 290, 5, 'zmena_zmluvnych_podmienok', 'stav_zmeny_zmluvnych_podmienok_id', 'stav_zmeny_zmluvnych_podmienok', NULL, 'Stav zmeny zmluvných podmienok', 70, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, 'select2', NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (295, 292, 10, 'zmena_zmluvnych_podmienok', 'interna_poznamka', NULL, NULL, 'Interná poznámka', 40, NULL, 600, 300, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (296, 290, 5, 'zmena_zmluvnych_podmienok', 'vytvoril_id', 'zamestnanec', NULL, 'Vytvoril', 30, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 'select2', NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, 1);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (297, 291, 1, 'zmena_zmluvnych_podmienok', 'pocet_dni_splatnosti', NULL, NULL, 'Počet dní splatnosti', 40, NULL, NULL, NULL, NULL, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '14', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (298, 291, 1, 'zmena_zmluvnych_podmienok', 'pocet_dni_platnosti', NULL, NULL, 'Počet dní platnosti', 50, NULL, NULL, NULL, NULL, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '30', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (300, 290, 5, 'zmena_zmluvnych_podmienok', 'obchodny_partner_id', 'obchodny_partner', NULL, 'Obchodný partner', 40, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, 'select2', NULL, 1, NULL, NULL, NULL, 1, '<a class="btn btn-primary get-ajax-form" href="obchodny_partner_pridaj_modal.php" title="Pridanie obchodného partnera" data-after_load="obchodnyPartner.afterLoad" data-parent="obchodny_partner_id"><i class="fa fa-plus"></i></a>', NULL, NULL);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (301, 292, 10, 'zmena_zmluvnych_podmienok', 'text_pre_zakaznika', NULL, NULL, 'Text pre zákazníka', 10, NULL, 600, 300, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (304, 290, 1, 'zmena_zmluvnych_podmienok', 'verzia', NULL, NULL, 'Verzia', 15, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '1', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (305, 291, 11, 'zmena_zmluvnych_podmienok', 'datum_pripomienky', NULL, NULL, 'Dátum pripomienky', 100, '{"datetime_format":"d.m.Y H:i","step":15}', NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (307, 292, 10, 'zmena_zmluvnych_podmienok', 'dolny_text', NULL, NULL, 'Dolný text', 30, NULL, 600, 300, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (308, 292, 1, 'zmena_zmluvnych_podmienok', 'nadpis', NULL, NULL, 'Nadpis', 5, NULL, 600, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (309, 292, 10, 'zmena_zmluvnych_podmienok', 'referencie_text', NULL, NULL, 'Referencie', 20, NULL, 600, 300, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (302, 290, 5, 'zmena_zmluvnych_podmienok', 'typ_zmeny_zmluvnych_podmienok_id', 'typ_zmeny_zmluvnych_podmienok', NULL, 'Typ', 5, NULL, NULL, NULL, NULL, NULL, 1, 1, NULL, NULL, NULL, NULL, 'select2', NULL, 1, NULL, NULL, NULL, 1, NULL, NULL, NULL);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (310, 293, 1, 'polozka_zmeny_zmluvnych_podmienok', 'nazov', NULL, NULL, 'Názov', 40, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (311, 293, 13, 'polozka_zmeny_zmluvnych_podmienok', 'zmena_zmluvnych_podmienok_id', 'zmena_zmluvnych_podmienok', NULL, 'Zmena zmluvných podmienok', 1, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (314, 293, 1, 'polozka_zmeny_zmluvnych_podmienok', 'cena_bez_dph', NULL, NULL, 'Cena bez DPH', 50, NULL, NULL, NULL, NULL, NULL, 1, 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (316, 293, 1, 'polozka_zmeny_zmluvnych_podmienok', 'mnozstvo', NULL, NULL, 'Množstvo', 70, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, '1', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (319, 293, 2, 'polozka_zmeny_zmluvnych_podmienok', 'popis', NULL, NULL, 'Popis', 100, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (320, 293, 5, 'polozka_zmeny_zmluvnych_podmienok', 'merna_jednotka_id', 'merna_jednotka', NULL, 'Merná jednotka', 80, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, 'select2', NULL, 1, NULL, NULL, NULL, 1, NULL, NULL, NULL);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (322, 293, 1, 'polozka_zmeny_zmluvnych_podmienok', 'poradie', NULL, NULL, 'Poradie', 120, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (323, 293, 1, 'polozka_zmeny_zmluvnych_podmienok', 'skupina', NULL, NULL, 'Skupina', 130, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (324, 293, 1, 'polozka_zmeny_zmluvnych_podmienok', 'cena_info', NULL, NULL, 'Informácia k cene', 60, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

INSERT INTO `priradenie_komunikacie` (`id`, `nazov`, `code`) VALUES (29, 'Zmena zmluvných podmienok', 'zmena_zmluvnych_podmienok');

INSERT INTO `log_type` (`id`, `nazov`, `code`, `primary_table`) VALUES (635, 'Pridanie položky zmeny zmluvných podmienok', 'polozka_zmeny_zmluvnych_podmienok_pridaj', NULL);
INSERT INTO `log_type` (`id`, `nazov`, `code`, `primary_table`) VALUES (636, 'Editovanie položky zmeny zmluvných podmienok', 'polozka_zmeny_zmluvnych_podmienok_edituj', NULL);
INSERT INTO `log_type` (`id`, `nazov`, `code`, `primary_table`) VALUES (637, 'Zmazanie položky zmeny zmluvných podmienok', 'polozka_zmeny_zmluvnych_podmienok_zmaz', NULL);
INSERT INTO `log_type` (`id`, `nazov`, `code`, `primary_table`) VALUES (638, 'Zmena stavu zmeny zmluvných podmienok', 'zmena_stavu_zmeny_zmluvnych_podmienok', NULL);
INSERT INTO `log_type` (`id`, `nazov`, `code`, `primary_table`) VALUES (639, 'Nová verzia zmeny zmluvných podmienok', 'zmena_zmluvnych_podmienok_nova_verzia', NULL);

UPDATE `menu` SET `poradie`=40 WHERE  `id`=41;

INSERT INTO `priradenie_suboru` (`id`, `nazov`, `code`) VALUES (290, 'Zmena zmluvných podmienok', 'zmena_zmluvnych_podmienok');

ALTER TABLE `zmena_zmluvnych_podmienok`
    ADD COLUMN `zmluva_id` INT NULL AFTER `typ_zmeny_zmluvnych_podmienok_id`;
INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES (325, 290, 5, 'zmena_zmluvnych_podmienok', 'zmluva_id', 'zmluva', NULL, 'Zmluva', 52, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, 'select2', NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL);

