a.binder 8 éve
szülő
commit
13d8224405

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 690 - 288
SE/schema/ant-object/default_db.DEVICES/DEVICES/DEVICES.xsd


+ 439 - 54
SE/schema/ant-object/default_db.DEVICES/FORMA/FORMA.xsd

@@ -13,18 +13,20 @@
            xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
            xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
            xmlns:system_cache__resources_tree_generate_xsl_required_occurs_raport="http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/resources_tree_generate_xsl_require_occurs_raport"
            xmlns:system_cache__resources_tree_generate_xsl_required_occurs_raport="http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/resources_tree_generate_xsl_require_occurs_raport"
            xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
            xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+           xmlns:fix_se_defaultdb_schema="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/fix_se_defaultdb_schema/fix_se_defaultdb_schema.xsd"
+           xmlns:p5Type="http://biuro.biall-net.pl/p5/schema/types"
            targetNamespace="https://biuro.biall-net.pl/wfs/default_db/table/DEVICES.xsd"
            targetNamespace="https://biuro.biall-net.pl/wfs/default_db/table/DEVICES.xsd"
            vc:minVersion="1.1">
            vc:minVersion="1.1">
+   <xs:import namespace="http://biuro.biall-net.pl/p5/schema/types"
+              schemaLocation="../../../types.xsd"/>
    <xs:import namespace="http://www.opengis.net/gml/3.2"
    <xs:import namespace="http://www.opengis.net/gml/3.2"
-              schemaLocation="../Types/gml.xsd"/>
+              schemaLocation="http://www.opengis.net/gml/3.2"/>
    <xs:import namespace="https://biuro.biall-net.pl/wfs/default_db/table/IN7_DZIENNIK_KORESP.xsd"
    <xs:import namespace="https://biuro.biall-net.pl/wfs/default_db/table/IN7_DZIENNIK_KORESP.xsd"
-              schemaLocation="../table/IN7_DZIENNIK_KORESP.xsd"/>
+              schemaLocation="../../default_db.IN7_DZIENNIK_KORESP/IN7_DZIENNIK_KORESP/IN7_DZIENNIK_KORESP.xsd"/>
    <xs:import namespace="https://biuro.biall-net.pl/wfs/default_db/table/IN7_MK_BAZA_DYSTRYBUCJI.xsd"
    <xs:import namespace="https://biuro.biall-net.pl/wfs/default_db/table/IN7_MK_BAZA_DYSTRYBUCJI.xsd"
-              schemaLocation="../table/IN7_MK_BAZA_DYSTRYBUCJI.xsd"/>
-   <xs:import namespace="https://biuro.biall-net.pl/wfs/default_db/SystemObjects/AccessGroup.xsd"
-              schemaLocation="../SystemObjects/AccessGroup.xsd"/>
-   <xs:import namespace="https://biuro.biall-net.pl/wfs/default_db/SystemObjects/AccessOwner.xsd"
-              schemaLocation="../SystemObjects/AccessOwner.xsd"/>
+              schemaLocation="../../default_db.IN7_MK_BAZA_DYSTRYBUCJI/IN7_MK_BAZA_DYSTRYBUCJI/IN7_MK_BAZA_DYSTRYBUCJI.xsd"/>
+   <xs:import namespace="https://biuro.biall-net.pl/wfs/default_db/table/ADMIN_USERS.xsd"
+              schemaLocation="../../default_db.ADMIN_USERS/ADMIN_USERS/ADMIN_USERS.xsd"/>
    <xs:simpleType name="A_STATUS_Type" id="a3A__DEVICES___d5e78873-1_A_STATUS_T">
    <xs:simpleType name="A_STATUS_Type" id="a3A__DEVICES___d5e78873-1_A_STATUS_T">
       <xs:restriction base="xs:string">
       <xs:restriction base="xs:string">
          <xs:enumeration value="NORMAL"/>
          <xs:enumeration value="NORMAL"/>
@@ -50,8 +52,22 @@
       </xs:restriction>
       </xs:restriction>
    </xs:simpleType>
    </xs:simpleType>
    <xs:complexType name="DEVICES" id="a3A__DEVICES___d5e78890-1_DEVICES">
    <xs:complexType name="DEVICES" id="a3A__DEVICES___d5e78890-1_DEVICES">
+      <xs:annotation>
+         <xs:appinfo>
+            <system_cache__appinfo:heritage>
+               <system_cache__appinfo:inherit system_cache__appinfo:inherit_ref="default_db:DEVICES"
+                                              system_cache__appinfo:heritage_acl="true">
+                  <system_cache__appinfo:acl_rule_inherit_to_all_same_name_elements_and_refs/>
+                  <acl_rule_inherit_to_all_refs_by_primary/>
+                  <acl_rule_inherit_to_all_refs_by_local_element system_cache__appinfo:acl_rule_inherit_local_element_name="A_STATUS"/>
+               </system_cache__appinfo:inherit>
+               <system_cache__appinfo:exherit_all system_cache__appinfo:heritage_acl="true"
+                                                  system_cache__appinfo:heritage_sort="true"/>
+            </system_cache__appinfo:heritage>
+         </xs:appinfo>
+      </xs:annotation>
       <xs:sequence id="a3A__DEVICES___d5e78891-1">
       <xs:sequence id="a3A__DEVICES___d5e78891-1">
-         <xs:element ref="SystemObjects__x3A__AccessOwner:AccessOwner"
+         <!--<xs:element ref="SystemObjects__x3A__AccessOwner:AccessOwner"
                      id="a3A__DEVICES___d5e78892-1">
                      id="a3A__DEVICES___d5e78892-1">
             <xs:annotation>
             <xs:annotation>
                <xs:appinfo>
                <xs:appinfo>
@@ -61,8 +77,8 @@
                   </system_cache__appinfo:flat_relation_cache>
                   </system_cache__appinfo:flat_relation_cache>
                </xs:appinfo>
                </xs:appinfo>
             </xs:annotation>
             </xs:annotation>
-         </xs:element>
-         <xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupRead"
+         </xs:element>-->
+         <!--<xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupRead"
                      id="a3A__DEVICES___d5e78897-1">
                      id="a3A__DEVICES___d5e78897-1">
             <xs:annotation>
             <xs:annotation>
                <xs:appinfo>
                <xs:appinfo>
@@ -72,8 +88,8 @@
                   </system_cache__appinfo:flat_relation_cache>
                   </system_cache__appinfo:flat_relation_cache>
                </xs:appinfo>
                </xs:appinfo>
             </xs:annotation>
             </xs:annotation>
-         </xs:element>
-         <xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupWrite"
+         </xs:element>-->
+         <!--<xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupWrite"
                      id="a3A__DEVICES___d5e78902-1">
                      id="a3A__DEVICES___d5e78902-1">
             <xs:annotation>
             <xs:annotation>
                <xs:appinfo>
                <xs:appinfo>
@@ -83,11 +99,23 @@
                   </system_cache__appinfo:flat_relation_cache>
                   </system_cache__appinfo:flat_relation_cache>
                </xs:appinfo>
                </xs:appinfo>
             </xs:annotation>
             </xs:annotation>
-         </xs:element>
+         </xs:element>-->
          <xs:element name="ID" type="xs:integer" id="a3A__DEVICES___d5e78907-1_ID"/>
          <xs:element name="ID" type="xs:integer" id="a3A__DEVICES___d5e78907-1_ID"/>
          <xs:element name="PARENT_ID"
          <xs:element name="PARENT_ID"
                      type="xs:integer"
                      type="xs:integer"
-                     id="a3A__DEVICES___d5e78908-1_PARENT_ID"/>
+                     id="a3A__DEVICES___d5e78908-1_PARENT_ID"
+                     minOccurs="0"/>
+         <xs:element ref="default_db__x3A__DEVICES:DEVICES" minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:name="PARENT_ID"
+                                                   system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:xpath="default_db__x3A__DEVICES:DEVICES/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="A_RECORD_CREATE_DATE"
          <xs:element name="A_RECORD_CREATE_DATE"
                      type="xs:string"
                      type="xs:string"
                      id="a3A__DEVICES___d5e78909-1_A_RECORD_C"/>
                      id="a3A__DEVICES___d5e78909-1_A_RECORD_C"/>
@@ -179,6 +207,20 @@
          <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
          <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
                      type="xs:integer"
                      type="xs:integer"
                      id="a3A__DEVICES___d5e78942-1_T_TELBOX_N"/>
                      id="a3A__DEVICES___d5e78942-1_T_TELBOX_N"/>
+         <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="T_TELBOX_NEIGHBOUR_IN_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #2225 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="the_geom"
          <xs:element name="the_geom"
                      type="xs:string"
                      type="xs:string"
                      id="a3A__DEVICES___d5e78943-1_the_geom"/>
                      id="a3A__DEVICES___d5e78943-1_the_geom"/>
@@ -255,18 +297,60 @@
          <xs:element name="CRM_LISTA_ZASOBOW_ID"
          <xs:element name="CRM_LISTA_ZASOBOW_ID"
                      type="xs:integer"
                      type="xs:integer"
                      id="a3A__DEVICES___d5e78970-1_CRM_LISTA_"/>
                      id="a3A__DEVICES___d5e78970-1_CRM_LISTA_"/>
+         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #224
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="CRM_LISTA_ZASOBOW_xpath"
          <xs:element name="CRM_LISTA_ZASOBOW_xpath"
                      type="xs:string"
                      type="xs:string"
                      id="a3A__DEVICES___d5e78971-1_CRM_LISTA_"/>
                      id="a3A__DEVICES___d5e78971-1_CRM_LISTA_"/>
          <xs:element name="ID_PROJECT"
          <xs:element name="ID_PROJECT"
                      type="xs:integer"
                      type="xs:integer"
                      id="a3A__DEVICES___d5e78972-1_ID_PROJECT"/>
                      id="a3A__DEVICES___d5e78972-1_ID_PROJECT"/>
+         <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_PROJECT"
+                                                   system_cache__appinfo:xpath="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #204
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="L_APPOITMENT_DATE"
          <xs:element name="L_APPOITMENT_DATE"
                      type="xs:string"
                      type="xs:string"
                      id="a3A__DEVICES___d5e78973-1_L_APPOITME"/>
                      id="a3A__DEVICES___d5e78973-1_L_APPOITME"/>
          <xs:element name="L_APPOITMENT_USER"
          <xs:element name="L_APPOITMENT_USER"
                      type="xs:string"
                      type="xs:string"
                      id="a3A__DEVICES___d5e78974-1_L_APPOITME"/>
                      id="a3A__DEVICES___d5e78974-1_L_APPOITME"/>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #166
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="L_APPOITMENT_PERIOD"
          <xs:element name="L_APPOITMENT_PERIOD"
                      type="xs:string"
                      type="xs:string"
                      id="a3A__DEVICES___d5e78976-1_L_APPOITME"/>
                      id="a3A__DEVICES___d5e78976-1_L_APPOITME"/>
@@ -285,9 +369,37 @@
          <xs:element name="ID_BILLING_USERS"
          <xs:element name="ID_BILLING_USERS"
                      type="xs:integer"
                      type="xs:integer"
                      id="a3A__DEVICES___d5e78981-1_ID_BILLING"/>
                      id="a3A__DEVICES___d5e78981-1_ID_BILLING"/>
+         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_USERS"
+                                                   system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="ID_SERVICES"
          <xs:element name="ID_SERVICES"
                      type="xs:integer"
                      type="xs:integer"
                      id="a3A__DEVICES___d5e78982-1_ID_SERVICE"/>
                      id="a3A__DEVICES___d5e78982-1_ID_SERVICE"/>
+         <xs:element ref="default_db__x3A__SERVICES:SERVICES">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_SERVICES"
+                                                   system_cache__appinfo:xpath="default_db__x3A__SERVICES:SERVICES/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #183
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="A_CLASSIFIED"
          <xs:element name="A_CLASSIFIED"
                      type="xs:string"
                      type="xs:string"
                      id="a3A__DEVICES___d5e78983-1_A_CLASSIFI"/>
                      id="a3A__DEVICES___d5e78983-1_A_CLASSIFI"/>
@@ -297,13 +409,39 @@
          <xs:element name="S_PASSWD"
          <xs:element name="S_PASSWD"
                      type="xs:string"
                      type="xs:string"
                      id="a3A__DEVICES___d5e78985-1_S_PASSWD"/>
                      id="a3A__DEVICES___d5e78985-1_S_PASSWD"/>
-         <xs:element name="SYNC_SQIX_STATUS"
-                     type="xs:string"
-                     id="a3A__DEVICES___d5e78986-1_SYNC_SQIX_"/>
          <xs:element name="ADMIN_USERS_ID"
          <xs:element name="ADMIN_USERS_ID"
                      type="xs:integer"
                      type="xs:integer"
                      id="a3A__DEVICES___d5e78988-1_ADMIN_USER"/>
                      id="a3A__DEVICES___d5e78988-1_ADMIN_USER"/>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:ADMIN_USERS_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ADMIN_USERS_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:ADMIN_USERS_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #185
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:ADMIN_USERS"
+                     maxOccurs="1"
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:name="ADMIN_USERS_ID"
+                                                   system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:ADMIN_USERS/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
       </xs:sequence>
       </xs:sequence>
+      <xs:attribute name="label" type="xs:string"/>
+      <xs:assert test="@label = concat(ID, ' ', T_DEVICE_TYPE)"/>
    </xs:complexType>
    </xs:complexType>
    <xs:element name="DEVICES"
    <xs:element name="DEVICES"
                type="default_db__x3A__DEVICES:DEVICES"
                type="default_db__x3A__DEVICES:DEVICES"
@@ -312,43 +450,52 @@
       <xs:complexContent id="a3A__DEVICES___d5e8570-1">
       <xs:complexContent id="a3A__DEVICES___d5e8570-1">
          <xs:restriction base="default_db__x3A__DEVICES:DEVICES">
          <xs:restriction base="default_db__x3A__DEVICES:DEVICES">
             <xs:sequence id="a3A__DEVICES___d5e78994-1">
             <xs:sequence id="a3A__DEVICES___d5e78994-1">
-               <xs:element ref="SystemObjects__x3A__AccessOwner:AccessOwner"
-                           id="a3A__DEVICES___d5e78995-1">
+               <!--<xs:element ref="SystemObjects__x3A__AccessOwner:AccessOwner"
+                  id="a3A__DEVICES___d5e78995-1">
                   <xs:annotation>
                   <xs:annotation>
                      <xs:appinfo>
                      <xs:appinfo>
                         <system_cache__appinfo:flat_relation_cache>
                         <system_cache__appinfo:flat_relation_cache>
-                           <system_cache__appinfo:source system_cache__appinfo:name="L_APPOITMENT_USER"
-                                                         system_cache__appinfo:xpath="SystemObjects__x3A__AccessOwner:AccessOwner/login"/>
+                           <system_cache__appinfo:source system_cache__appinfo:name="L_APPOITMENT_USER" system_cache__appinfo:xpath="SystemObjects__x3A__AccessOwner:AccessOwner/login"/>
                         </system_cache__appinfo:flat_relation_cache>
                         </system_cache__appinfo:flat_relation_cache>
                      </xs:appinfo>
                      </xs:appinfo>
                   </xs:annotation>
                   </xs:annotation>
-               </xs:element>
-               <xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupRead"
-                           id="a3A__DEVICES___d5e79000-1">
+               </xs:element>-->
+               <!--<xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupRead"
+                  id="a3A__DEVICES___d5e79000-1">
                   <xs:annotation>
                   <xs:annotation>
                      <xs:appinfo>
                      <xs:appinfo>
                         <system_cache__appinfo:flat_relation_cache>
                         <system_cache__appinfo:flat_relation_cache>
-                           <system_cache__appinfo:source system_cache__appinfo:name="A_CLASSIFIED"
-                                                         system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupRead/uid"/>
+                           <system_cache__appinfo:source system_cache__appinfo:name="A_CLASSIFIED" system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupRead/uid"/>
                         </system_cache__appinfo:flat_relation_cache>
                         </system_cache__appinfo:flat_relation_cache>
                      </xs:appinfo>
                      </xs:appinfo>
                   </xs:annotation>
                   </xs:annotation>
-               </xs:element>
-               <xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupWrite"
-                           id="a3A__DEVICES___d5e79005-1">
+               </xs:element>-->
+               <!--<xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupWrite"
+                  id="a3A__DEVICES___d5e79005-1">
                   <xs:annotation>
                   <xs:annotation>
                      <xs:appinfo>
                      <xs:appinfo>
                         <system_cache__appinfo:flat_relation_cache>
                         <system_cache__appinfo:flat_relation_cache>
-                           <system_cache__appinfo:source system_cache__appinfo:name="A_ADM_COMPANY"
-                                                         system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupWrite/uid"/>
+                           <system_cache__appinfo:source system_cache__appinfo:name="A_ADM_COMPANY" system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupWrite/uid"/>
                         </system_cache__appinfo:flat_relation_cache>
                         </system_cache__appinfo:flat_relation_cache>
                      </xs:appinfo>
                      </xs:appinfo>
                   </xs:annotation>
                   </xs:annotation>
-               </xs:element>
+               </xs:element>-->
                <xs:element name="ID" type="xs:integer" id="a3A__DEVICES___d5e79010-1_ID"/>
                <xs:element name="ID" type="xs:integer" id="a3A__DEVICES___d5e79010-1_ID"/>
                <xs:element name="PARENT_ID"
                <xs:element name="PARENT_ID"
                            type="xs:integer"
                            type="xs:integer"
-                           id="a3A__DEVICES___d5e79011-1_PARENT_ID"/>
+                           id="a3A__DEVICES___d5e79011-1_PARENT_ID"
+                           minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:DEVICES" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="PARENT_ID"
+                                                         system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:DEVICES/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE"
                <xs:element name="A_RECORD_CREATE_DATE"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79012-1_A_RECORD_C"/>
                            id="a3A__DEVICES___d5e79012-1_A_RECORD_C"/>
@@ -440,6 +587,20 @@
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79045-1_T_TELBOX_N"/>
                            id="a3A__DEVICES___d5e79045-1_T_TELBOX_N"/>
+               <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="T_TELBOX_NEIGHBOUR_IN_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #2225 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="the_geom"
                <xs:element name="the_geom"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79046-1_the_geom"/>
                            id="a3A__DEVICES___d5e79046-1_the_geom"/>
@@ -516,18 +677,60 @@
                <xs:element name="CRM_LISTA_ZASOBOW_ID"
                <xs:element name="CRM_LISTA_ZASOBOW_ID"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79073-1_CRM_LISTA_"/>
                            id="a3A__DEVICES___d5e79073-1_CRM_LISTA_"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #224
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="CRM_LISTA_ZASOBOW_xpath"
                <xs:element name="CRM_LISTA_ZASOBOW_xpath"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79074-1_CRM_LISTA_"/>
                            id="a3A__DEVICES___d5e79074-1_CRM_LISTA_"/>
                <xs:element name="ID_PROJECT"
                <xs:element name="ID_PROJECT"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79075-1_ID_PROJECT"/>
                            id="a3A__DEVICES___d5e79075-1_ID_PROJECT"/>
+               <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_PROJECT"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #204
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_DATE"
                <xs:element name="L_APPOITMENT_DATE"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79076-1_L_APPOITME"/>
                            id="a3A__DEVICES___d5e79076-1_L_APPOITME"/>
                <xs:element name="L_APPOITMENT_USER"
                <xs:element name="L_APPOITMENT_USER"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79077-1_L_APPOITME"/>
                            id="a3A__DEVICES___d5e79077-1_L_APPOITME"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #166
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                <xs:element name="L_APPOITMENT_PERIOD"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79079-1_L_APPOITME"/>
                            id="a3A__DEVICES___d5e79079-1_L_APPOITME"/>
@@ -546,9 +749,37 @@
                <xs:element name="ID_BILLING_USERS"
                <xs:element name="ID_BILLING_USERS"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79084-1_ID_BILLING"/>
                            id="a3A__DEVICES___d5e79084-1_ID_BILLING"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="ID_SERVICES"
                <xs:element name="ID_SERVICES"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79085-1_ID_SERVICE"/>
                            id="a3A__DEVICES___d5e79085-1_ID_SERVICE"/>
+               <xs:element ref="default_db__x3A__SERVICES:SERVICES">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_SERVICES"
+                                                         system_cache__appinfo:xpath="default_db__x3A__SERVICES:SERVICES/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #183
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_CLASSIFIED"
                <xs:element name="A_CLASSIFIED"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79086-1_A_CLASSIFI"/>
                            id="a3A__DEVICES___d5e79086-1_A_CLASSIFI"/>
@@ -558,13 +789,39 @@
                <xs:element name="S_PASSWD"
                <xs:element name="S_PASSWD"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79088-1_S_PASSWD"/>
                            id="a3A__DEVICES___d5e79088-1_S_PASSWD"/>
-               <xs:element name="SYNC_SQIX_STATUS"
-                           type="xs:string"
-                           id="a3A__DEVICES___d5e79089-1_SYNC_SQIX_"/>
                <xs:element name="ADMIN_USERS_ID"
                <xs:element name="ADMIN_USERS_ID"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79091-1_ADMIN_USER"/>
                            id="a3A__DEVICES___d5e79091-1_ADMIN_USER"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:ADMIN_USERS_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ADMIN_USERS_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:ADMIN_USERS_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #185
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:ADMIN_USERS"
+                           maxOccurs="1"
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="ADMIN_USERS_ID"
+                                                         system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:ADMIN_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
             </xs:sequence>
+            <xs:attribute name="label" type="xs:string"/>
+            <xs:assert test="@label = concat(ID, ' ', T_DEVICE_TYPE)"/>
          </xs:restriction>
          </xs:restriction>
       </xs:complexContent>
       </xs:complexContent>
    </xs:complexType>
    </xs:complexType>
@@ -575,43 +832,51 @@
       <xs:complexContent id="a3A__DEVICES___d5e8579-1">
       <xs:complexContent id="a3A__DEVICES___d5e8579-1">
          <xs:restriction base="default_db__x3A__DEVICES:DEVICES">
          <xs:restriction base="default_db__x3A__DEVICES:DEVICES">
             <xs:sequence id="a3A__DEVICES___d5e79096-1">
             <xs:sequence id="a3A__DEVICES___d5e79096-1">
-               <xs:element ref="SystemObjects__x3A__AccessOwner:AccessOwner"
-                           id="a3A__DEVICES___d5e79097-1">
+               <!--<xs:element ref="SystemObjects__x3A__AccessOwner:AccessOwner"
+                  id="a3A__DEVICES___d5e79097-1">
                   <xs:annotation>
                   <xs:annotation>
                      <xs:appinfo>
                      <xs:appinfo>
                         <system_cache__appinfo:flat_relation_cache>
                         <system_cache__appinfo:flat_relation_cache>
-                           <system_cache__appinfo:source system_cache__appinfo:name="L_APPOITMENT_USER"
-                                                         system_cache__appinfo:xpath="SystemObjects__x3A__AccessOwner:AccessOwner/login"/>
+                           <system_cache__appinfo:source system_cache__appinfo:name="L_APPOITMENT_USER" system_cache__appinfo:xpath="SystemObjects__x3A__AccessOwner:AccessOwner/login"/>
                         </system_cache__appinfo:flat_relation_cache>
                         </system_cache__appinfo:flat_relation_cache>
                      </xs:appinfo>
                      </xs:appinfo>
                   </xs:annotation>
                   </xs:annotation>
-               </xs:element>
-               <xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupRead"
-                           id="a3A__DEVICES___d5e79102-1">
+               </xs:element>-->
+               <!--<xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupRead"
+                  id="a3A__DEVICES___d5e79102-1">
                   <xs:annotation>
                   <xs:annotation>
                      <xs:appinfo>
                      <xs:appinfo>
                         <system_cache__appinfo:flat_relation_cache>
                         <system_cache__appinfo:flat_relation_cache>
-                           <system_cache__appinfo:source system_cache__appinfo:name="A_CLASSIFIED"
-                                                         system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupRead/uid"/>
+                           <system_cache__appinfo:source system_cache__appinfo:name="A_CLASSIFIED" system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupRead/uid"/>
                         </system_cache__appinfo:flat_relation_cache>
                         </system_cache__appinfo:flat_relation_cache>
                      </xs:appinfo>
                      </xs:appinfo>
                   </xs:annotation>
                   </xs:annotation>
-               </xs:element>
-               <xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupWrite"
-                           id="a3A__DEVICES___d5e79107-1">
+               </xs:element>-->
+               <!--<xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupWrite"
+                  id="a3A__DEVICES___d5e79107-1">
                   <xs:annotation>
                   <xs:annotation>
                      <xs:appinfo>
                      <xs:appinfo>
                         <system_cache__appinfo:flat_relation_cache>
                         <system_cache__appinfo:flat_relation_cache>
-                           <system_cache__appinfo:source system_cache__appinfo:name="A_ADM_COMPANY"
-                                                         system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupWrite/uid"/>
+                           <system_cache__appinfo:source system_cache__appinfo:name="A_ADM_COMPANY" system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupWrite/uid"/>
                         </system_cache__appinfo:flat_relation_cache>
                         </system_cache__appinfo:flat_relation_cache>
                      </xs:appinfo>
                      </xs:appinfo>
                   </xs:annotation>
                   </xs:annotation>
-               </xs:element>
+               </xs:element>-->
                <xs:element name="ID" type="xs:integer" id="a3A__DEVICES___d5e79112-1_ID"/>
                <xs:element name="ID" type="xs:integer" id="a3A__DEVICES___d5e79112-1_ID"/>
                <xs:element name="PARENT_ID"
                <xs:element name="PARENT_ID"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79113-1_PARENT_ID"/>
                            id="a3A__DEVICES___d5e79113-1_PARENT_ID"/>
+               <xs:element ref="default_db__x3A__DEVICES:DEVICES" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="PARENT_ID"
+                                                         system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:DEVICES/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE"
                <xs:element name="A_RECORD_CREATE_DATE"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79114-1_A_RECORD_C"/>
                            id="a3A__DEVICES___d5e79114-1_A_RECORD_C"/>
@@ -703,6 +968,20 @@
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79147-1_T_TELBOX_N"/>
                            id="a3A__DEVICES___d5e79147-1_T_TELBOX_N"/>
+               <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="T_TELBOX_NEIGHBOUR_IN_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #2225 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="the_geom"
                <xs:element name="the_geom"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79148-1_the_geom"/>
                            id="a3A__DEVICES___d5e79148-1_the_geom"/>
@@ -779,18 +1058,60 @@
                <xs:element name="CRM_LISTA_ZASOBOW_ID"
                <xs:element name="CRM_LISTA_ZASOBOW_ID"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79175-1_CRM_LISTA_"/>
                            id="a3A__DEVICES___d5e79175-1_CRM_LISTA_"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #224
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="CRM_LISTA_ZASOBOW_xpath"
                <xs:element name="CRM_LISTA_ZASOBOW_xpath"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79176-1_CRM_LISTA_"/>
                            id="a3A__DEVICES___d5e79176-1_CRM_LISTA_"/>
                <xs:element name="ID_PROJECT"
                <xs:element name="ID_PROJECT"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79177-1_ID_PROJECT"/>
                            id="a3A__DEVICES___d5e79177-1_ID_PROJECT"/>
+               <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_PROJECT"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #204
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_DATE"
                <xs:element name="L_APPOITMENT_DATE"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79178-1_L_APPOITME"/>
                            id="a3A__DEVICES___d5e79178-1_L_APPOITME"/>
                <xs:element name="L_APPOITMENT_USER"
                <xs:element name="L_APPOITMENT_USER"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79179-1_L_APPOITME"/>
                            id="a3A__DEVICES___d5e79179-1_L_APPOITME"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #166
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                <xs:element name="L_APPOITMENT_PERIOD"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79181-1_L_APPOITME"/>
                            id="a3A__DEVICES___d5e79181-1_L_APPOITME"/>
@@ -809,9 +1130,37 @@
                <xs:element name="ID_BILLING_USERS"
                <xs:element name="ID_BILLING_USERS"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79186-1_ID_BILLING"/>
                            id="a3A__DEVICES___d5e79186-1_ID_BILLING"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="ID_SERVICES"
                <xs:element name="ID_SERVICES"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79187-1_ID_SERVICE"/>
                            id="a3A__DEVICES___d5e79187-1_ID_SERVICE"/>
+               <xs:element ref="default_db__x3A__SERVICES:SERVICES">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_SERVICES"
+                                                         system_cache__appinfo:xpath="default_db__x3A__SERVICES:SERVICES/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #183
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_CLASSIFIED"
                <xs:element name="A_CLASSIFIED"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79188-1_A_CLASSIFI"/>
                            id="a3A__DEVICES___d5e79188-1_A_CLASSIFI"/>
@@ -821,17 +1170,53 @@
                <xs:element name="S_PASSWD"
                <xs:element name="S_PASSWD"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79190-1_S_PASSWD"/>
                            id="a3A__DEVICES___d5e79190-1_S_PASSWD"/>
-               <xs:element name="SYNC_SQIX_STATUS"
-                           type="xs:string"
-                           id="a3A__DEVICES___d5e79191-1_SYNC_SQIX_"/>
                <xs:element name="ADMIN_USERS_ID"
                <xs:element name="ADMIN_USERS_ID"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79193-1_ADMIN_USER"/>
                            id="a3A__DEVICES___d5e79193-1_ADMIN_USER"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:ADMIN_USERS_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ADMIN_USERS_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:ADMIN_USERS_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #185
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:ADMIN_USERS"
+                           maxOccurs="1"
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="ADMIN_USERS_ID"
+                                                         system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:ADMIN_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
             </xs:sequence>
+            <xs:attribute name="label" type="xs:string"/>
+            <xs:assert test="@label = concat(ID, ' ', T_DEVICE_TYPE)"/>
          </xs:restriction>
          </xs:restriction>
       </xs:complexContent>
       </xs:complexContent>
    </xs:complexType>
    </xs:complexType>
    <xs:element id="a3A__DEVICES___d5e8577-1_MASZYNA"
    <xs:element id="a3A__DEVICES___d5e8577-1_MASZYNA"
                name="MASZYNA"
                name="MASZYNA"
                type="default_db__x3A__DEVICES:MASZYNA"/>
                type="default_db__x3A__DEVICES:MASZYNA"/>
+   <xs:element name="ID_DEVICE" type="default_db__x3A__DEVICES:DEVICES">
+      <xs:annotation>
+         <xs:documentation>Uzyte glownie w Korespondencji</xs:documentation>
+      </xs:annotation>
+   </xs:element>
+   <xs:element name="PARENT_ID_DEVICE" type="default_db__x3A__DEVICES:DEVICES">
+      <xs:annotation>
+         <xs:documentation>Uzyte w telboxach do tworzenia struktury</xs:documentation>
+      </xs:annotation>
+   </xs:element>
 </xs:schema>
 </xs:schema>

+ 2 - 1
SE/schema/ant-object/default_db.DEVICES/FORMA/build.xml

@@ -1 +1,2 @@
-<empty/>
+<?xml version="1.0" encoding="UTF-8"?>
+<empty/>

+ 1222 - 0
SE/schema/ant-object/default_db.DEVICES/ID_DEVICE/ID_DEVICE.xsd

@@ -0,0 +1,1222 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+           xmlns:gml="http://www.opengis.net/gml/3.2"
+           xmlns:Types__x3A__default_Default="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"
+           xmlns:default_db__x3A__IN7_DZIENNIK_KORESP="https://biuro.biall-net.pl/wfs/default_db/table/IN7_DZIENNIK_KORESP.xsd"
+           xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty"
+           xmlns:default_db__x3A__ADMIN_USERS="https://biuro.biall-net.pl/wfs/default_db/table/ADMIN_USERS.xsd"
+           xmlns:default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI="https://biuro.biall-net.pl/wfs/default_db/table/IN7_MK_BAZA_DYSTRYBUCJI.xsd"
+           xmlns:SystemObjects__x3A__AccessGroup="https://biuro.biall-net.pl/wfs/default_db/SystemObjects/AccessGroup.xsd"
+           xmlns:SystemObjects__x3A__AccessOwner="https://biuro.biall-net.pl/wfs/default_db/SystemObjects/AccessOwner.xsd"
+           xmlns:default_db__x3A__DEVICES="https://biuro.biall-net.pl/wfs/default_db/table/DEVICES.xsd"
+           xmlns:p5_tr_map="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/procesy5_translate_map.xsd"
+           xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
+           xmlns:system_cache__resources_tree_generate_xsl_required_occurs_raport="http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/resources_tree_generate_xsl_require_occurs_raport"
+           xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+           xmlns:fix_se_defaultdb_schema="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/fix_se_defaultdb_schema/fix_se_defaultdb_schema.xsd"
+           xmlns:p5Type="http://biuro.biall-net.pl/p5/schema/types"
+           targetNamespace="https://biuro.biall-net.pl/wfs/default_db/table/DEVICES.xsd"
+           vc:minVersion="1.1">
+   <xs:import namespace="http://biuro.biall-net.pl/p5/schema/types"
+              schemaLocation="../../../types.xsd"/>
+   <xs:import namespace="http://www.opengis.net/gml/3.2"
+              schemaLocation="http://www.opengis.net/gml/3.2"/>
+   <xs:import namespace="https://biuro.biall-net.pl/wfs/default_db/table/IN7_DZIENNIK_KORESP.xsd"
+              schemaLocation="../../default_db.IN7_DZIENNIK_KORESP/IN7_DZIENNIK_KORESP/IN7_DZIENNIK_KORESP.xsd"/>
+   <xs:import namespace="https://biuro.biall-net.pl/wfs/default_db/table/IN7_MK_BAZA_DYSTRYBUCJI.xsd"
+              schemaLocation="../../default_db.IN7_MK_BAZA_DYSTRYBUCJI/IN7_MK_BAZA_DYSTRYBUCJI/IN7_MK_BAZA_DYSTRYBUCJI.xsd"/>
+   <xs:import namespace="https://biuro.biall-net.pl/wfs/default_db/table/ADMIN_USERS.xsd"
+              schemaLocation="../../default_db.ADMIN_USERS/ADMIN_USERS/ADMIN_USERS.xsd"/>
+   <xs:simpleType name="A_STATUS_Type" id="a3A__DEVICES___d5e78873-1_A_STATUS_T">
+      <xs:restriction base="xs:string">
+         <xs:enumeration value="NORMAL"/>
+         <xs:enumeration value="WAITING"/>
+         <xs:enumeration value="MONITOR"/>
+         <xs:enumeration value="DELETED"/>
+         <xs:enumeration value="WARNING"/>
+         <xs:enumeration value="OFF_SOFT"/>
+         <xs:enumeration value="OFF_HARD"/>
+      </xs:restriction>
+   </xs:simpleType>
+   <xs:simpleType id="a3A__DEVICES___d5e8554-1_T_DEVICE_T" name="T_DEVICE_TYPE">
+      <xs:restriction base="xs:string"/>
+   </xs:simpleType>
+   <xs:simpleType id="a3A__DEVICES___d5e8556-1_T_DEVICE_T" name="T_DEVICE_TYPE_forma">
+      <xs:restriction base="default_db__x3A__DEVICES:T_DEVICE_TYPE">
+         <xs:enumeration value="FORMA"/>
+      </xs:restriction>
+   </xs:simpleType>
+   <xs:simpleType id="a3A__DEVICES___d5e8559-1_T_DEVICE_T" name="T_DEVICE_TYPE_maszyna">
+      <xs:restriction base="default_db__x3A__DEVICES:T_DEVICE_TYPE">
+         <xs:enumeration value="MASZYNA"/>
+      </xs:restriction>
+   </xs:simpleType>
+   <xs:complexType name="DEVICES" id="a3A__DEVICES___d5e78890-1_DEVICES">
+      <xs:annotation>
+         <xs:appinfo>
+            <system_cache__appinfo:heritage>
+               <system_cache__appinfo:inherit system_cache__appinfo:inherit_ref="default_db:DEVICES"
+                                              system_cache__appinfo:heritage_acl="true">
+                  <system_cache__appinfo:acl_rule_inherit_to_all_same_name_elements_and_refs/>
+                  <acl_rule_inherit_to_all_refs_by_primary/>
+                  <acl_rule_inherit_to_all_refs_by_local_element system_cache__appinfo:acl_rule_inherit_local_element_name="A_STATUS"/>
+               </system_cache__appinfo:inherit>
+               <system_cache__appinfo:exherit_all system_cache__appinfo:heritage_acl="true"
+                                                  system_cache__appinfo:heritage_sort="true"/>
+            </system_cache__appinfo:heritage>
+         </xs:appinfo>
+      </xs:annotation>
+      <xs:sequence id="a3A__DEVICES___d5e78891-1">
+         <!--<xs:element ref="SystemObjects__x3A__AccessOwner:AccessOwner"
+                     id="a3A__DEVICES___d5e78892-1">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                   system_cache__appinfo:xpath="SystemObjects__x3A__AccessOwner:AccessOwner/login"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>-->
+         <!--<xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupRead"
+                     id="a3A__DEVICES___d5e78897-1">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:name="A_CLASSIFIED"
+                                                   system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupRead/uid"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>-->
+         <!--<xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupWrite"
+                     id="a3A__DEVICES___d5e78902-1">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:name="A_ADM_COMPANY"
+                                                   system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupWrite/uid"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>-->
+         <xs:element name="ID" type="xs:integer" id="a3A__DEVICES___d5e78907-1_ID"/>
+         <xs:element name="PARENT_ID"
+                     type="xs:integer"
+                     id="a3A__DEVICES___d5e78908-1_PARENT_ID"
+                     minOccurs="0"/>
+         <xs:element ref="default_db__x3A__DEVICES:DEVICES" minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:name="PARENT_ID"
+                                                   system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:xpath="default_db__x3A__DEVICES:DEVICES/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
+         <xs:element name="A_RECORD_CREATE_DATE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78909-1_A_RECORD_C"/>
+         <xs:element name="A_RECORD_CREATE_AUTHOR"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78910-1_A_RECORD_C"/>
+         <xs:element name="A_RECORD_UPDATE_DATE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78911-1_A_RECORD_U"/>
+         <xs:element name="A_RECORD_UPDATE_AUTHOR"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78912-1_A_RECORD_U"/>
+         <xs:element name="A_PROBLEM"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78913-1_A_PROBLEM"/>
+         <xs:element name="A_PROBLEM_DESC"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78914-1_A_PROBLEM_"/>
+         <xs:element name="A_PROBLEM_DATE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78916-1_A_PROBLEM_"/>
+         <xs:element name="A_STATUS"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78917-1_A_STATUS"/>
+         <xs:element name="A_STATUS_EV"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78918-1_A_STATUS_E"/>
+         <xs:element name="A_STATUS_INFO"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78919-1_A_STATUS_I"/>
+         <xs:element name="A_STATUS_LASTCHANGE_DATE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78920-1_A_STATUS_L"/>
+         <xs:element name="IN7_DZIENNIK_KORESP_ID"
+                     type="xs:integer"
+                     id="a3A__DEVICES___d5e78921-1_IN7_DZIENN"/>
+         <xs:element name="IN7_DZIENNIK_KORESP_ID_ZAMOWIENIE"
+                     type="xs:integer"
+                     id="a3A__DEVICES___d5e78922-1_IN7_DZIENN"/>
+         <xs:element name="A_UPDATE_DATE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78923-1_A_UPDATE_D"/>
+         <xs:element name="A_ADM_COMPANY"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78924-1_A_ADM_COMP"/>
+         <xs:element name="S_ADDRESS_CITY"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78925-1_S_ADDRESS_"/>
+         <xs:element name="S_ADDRESS_POST_CODE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78926-1_S_ADDRESS_"/>
+         <xs:element name="S_ADDRESS_POST_OFFICE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78928-1_S_ADDRESS_"/>
+         <xs:element name="S_ADDRESS_STREET"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78929-1_S_ADDRESS_"/>
+         <xs:element name="S_ADDRESS_HOUSE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78930-1_S_ADDRESS_"/>
+         <xs:element name="S_OTHER_INFO"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78931-1_S_OTHER_IN"/>
+         <xs:element name="S_IP" type="xs:string" id="a3A__DEVICES___d5e78932-1_S_IP"/>
+         <xs:element name="T_NETWORK_SERVER"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78933-1_T_NETWORK_"/>
+         <xs:element name="T_TOPOLOGY_PLACE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78934-1_T_TOPOLOGY"/>
+         <xs:element name="T_DEVICE_SERIAL"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78935-1_T_DEVICE_S"/>
+         <xs:element name="T_DEVICE_TYPE"
+                     type="default_db__x3A__DEVICES:T_DEVICE_TYPE"
+                     id="a3A__DEVICES___d5e78936-1_T_DEVICE_T"/>
+         <xs:element name="T_DEVICE_PORTS_OK"
+                     type="xs:integer"
+                     id="a3A__DEVICES___d5e78937-1_T_DEVICE_P"/>
+         <xs:element name="T_DEVICE_INFO"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78938-1_T_DEVICE_I"/>
+         <xs:element name="T_DEVICE_POWER"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78940-1_T_DEVICE_P"/>
+         <xs:element name="T_TELBOX_NEIGHBOUR_IN"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78941-1_T_TELBOX_N"/>
+         <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
+                     type="xs:integer"
+                     id="a3A__DEVICES___d5e78942-1_T_TELBOX_N"/>
+         <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="T_TELBOX_NEIGHBOUR_IN_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #2225 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <xs:element name="the_geom"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78943-1_the_geom"/>
+         <xs:element name="T_WORKPOINTS"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78944-1_T_WORKPOIN"/>
+         <xs:element name="T_WORKPOINTS_VALUE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78945-1_T_WORKPOIN"/>
+         <xs:element name="T_WORKPOINTS_TYPE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78946-1_T_WORKPOIN"/>
+         <xs:element name="T_WORKPOINTS_USER"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78947-1_T_WORKPOIN"/>
+         <xs:element name="T_WORKPOINTS_DATE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78948-1_T_WORKPOIN"/>
+         <xs:element name="T_PENALTIES"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78949-1_T_PENALTIE"/>
+         <xs:element name="T_PENALTIES_TYPE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78950-1_T_PENALTIE"/>
+         <xs:element name="T_PENALTIES_VALUE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78952-1_T_PENALTIE"/>
+         <xs:element name="T_WHO_CONNECTED"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78953-1_T_WHO_CONN"/>
+         <xs:element name="T_WHEN_CONNECTED"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78954-1_T_WHEN_CON"/>
+         <xs:element name="T_PRODUCER"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78955-1_T_PRODUCER"/>
+         <xs:element name="T_PRODUCTION_DATE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78956-1_T_PRODUCTI"/>
+         <xs:element name="T_BUY_DATE"
+                     type="xs:token"
+                     id="a3A__DEVICES___d5e78957-1_T_BUY_DATE"/>
+         <xs:element name="T_SELLER"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78958-1_T_SELLER"/>
+         <xs:element name="T_OWNER"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78959-1_T_OWNER"/>
+         <xs:element name="T_GUARRANTY_EXPIRE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78960-1_T_GUARRANT"/>
+         <xs:element name="T_PAPERBOX_LOCATION"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78961-1_T_PAPERBOX"/>
+         <xs:element name="F_BILL_DATE"
+                     type="xs:token"
+                     id="a3A__DEVICES___d5e78962-1_F_BILL_DAT"/>
+         <xs:element name="F_BILL_NUMBER"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78964-1_F_BILL_NUM"/>
+         <xs:element name="F_BILL_POSITION"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78965-1_F_BILL_POS"/>
+         <xs:element name="F_BILL_COST"
+                     type="xs:double"
+                     id="a3A__DEVICES___d5e78966-1_F_BILL_COS"/>
+         <xs:element name="F_MONTHLY_LEASE_COST"
+                     type="xs:double"
+                     id="a3A__DEVICES___d5e78967-1_F_MONTHLY_"/>
+         <xs:element name="F_DEPTECIATION_LENGTH_YEARS"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78968-1_F_DEPTECIA"/>
+         <xs:element name="S_HW" type="xs:string" id="a3A__DEVICES___d5e78969-1_S_HW"/>
+         <xs:element name="CRM_LISTA_ZASOBOW_ID"
+                     type="xs:integer"
+                     id="a3A__DEVICES___d5e78970-1_CRM_LISTA_"/>
+         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #224
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <xs:element name="CRM_LISTA_ZASOBOW_xpath"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78971-1_CRM_LISTA_"/>
+         <xs:element name="ID_PROJECT"
+                     type="xs:integer"
+                     id="a3A__DEVICES___d5e78972-1_ID_PROJECT"/>
+         <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_PROJECT"
+                                                   system_cache__appinfo:xpath="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #204
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <xs:element name="L_APPOITMENT_DATE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78973-1_L_APPOITME"/>
+         <xs:element name="L_APPOITMENT_USER"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78974-1_L_APPOITME"/>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #166
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <xs:element name="L_APPOITMENT_PERIOD"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78976-1_L_APPOITME"/>
+         <xs:element name="L_APPOITMENT_INFO"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78977-1_L_APPOITME"/>
+         <xs:element name="L_APPOITMENT_TYPE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78978-1_L_APPOITME"/>
+         <xs:element name="L_CALENDAR"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78979-1_L_CALENDAR"/>
+         <xs:element name="P_ACCOUNT"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78980-1_P_ACCOUNT"/>
+         <xs:element name="ID_BILLING_USERS"
+                     type="xs:integer"
+                     id="a3A__DEVICES___d5e78981-1_ID_BILLING"/>
+         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_USERS"
+                                                   system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <xs:element name="ID_SERVICES"
+                     type="xs:integer"
+                     id="a3A__DEVICES___d5e78982-1_ID_SERVICE"/>
+         <xs:element ref="default_db__x3A__SERVICES:SERVICES">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_SERVICES"
+                                                   system_cache__appinfo:xpath="default_db__x3A__SERVICES:SERVICES/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #183
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <xs:element name="A_CLASSIFIED"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78983-1_A_CLASSIFI"/>
+         <xs:element name="ADM_PASSWD"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78984-1_ADM_PASSWD"/>
+         <xs:element name="S_PASSWD"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78985-1_S_PASSWD"/>
+         <xs:element name="ADMIN_USERS_ID"
+                     type="xs:integer"
+                     id="a3A__DEVICES___d5e78988-1_ADMIN_USER"/>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:ADMIN_USERS_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ADMIN_USERS_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:ADMIN_USERS_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #185
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:ADMIN_USERS"
+                     maxOccurs="1"
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:name="ADMIN_USERS_ID"
+                                                   system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:ADMIN_USERS/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
+      </xs:sequence>
+      <xs:attribute name="label" type="xs:string"/>
+      <xs:assert test="@label = concat(ID, ' ', T_DEVICE_TYPE)"/>
+   </xs:complexType>
+   <xs:element name="DEVICES"
+               type="default_db__x3A__DEVICES:DEVICES"
+               id="a3A__DEVICES___d5e78989-1_DEVICES"/>
+   <xs:complexType id="a3A__DEVICES___d5e8569-1_MASZYNA" name="MASZYNA">
+      <xs:complexContent id="a3A__DEVICES___d5e8570-1">
+         <xs:restriction base="default_db__x3A__DEVICES:DEVICES">
+            <xs:sequence id="a3A__DEVICES___d5e78994-1">
+               <!--<xs:element ref="SystemObjects__x3A__AccessOwner:AccessOwner"
+                  id="a3A__DEVICES___d5e78995-1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="L_APPOITMENT_USER" system_cache__appinfo:xpath="SystemObjects__x3A__AccessOwner:AccessOwner/login"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>-->
+               <!--<xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupRead"
+                  id="a3A__DEVICES___d5e79000-1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="A_CLASSIFIED" system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupRead/uid"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>-->
+               <!--<xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupWrite"
+                  id="a3A__DEVICES___d5e79005-1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="A_ADM_COMPANY" system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupWrite/uid"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>-->
+               <xs:element name="ID" type="xs:integer" id="a3A__DEVICES___d5e79010-1_ID"/>
+               <xs:element name="PARENT_ID"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79011-1_PARENT_ID"
+                           minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:DEVICES" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="PARENT_ID"
+                                                         system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:DEVICES/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="A_RECORD_CREATE_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79012-1_A_RECORD_C"/>
+               <xs:element name="A_RECORD_CREATE_AUTHOR"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79013-1_A_RECORD_C"/>
+               <xs:element name="A_RECORD_UPDATE_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79014-1_A_RECORD_U"/>
+               <xs:element name="A_RECORD_UPDATE_AUTHOR"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79015-1_A_RECORD_U"/>
+               <xs:element name="A_PROBLEM"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79016-1_A_PROBLEM"/>
+               <xs:element name="A_PROBLEM_DESC"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79017-1_A_PROBLEM_"/>
+               <xs:element name="A_PROBLEM_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79019-1_A_PROBLEM_"/>
+               <xs:element name="A_STATUS"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79020-1_A_STATUS"/>
+               <xs:element name="A_STATUS_EV"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79021-1_A_STATUS_E"/>
+               <xs:element name="A_STATUS_INFO"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79022-1_A_STATUS_I"/>
+               <xs:element name="A_STATUS_LASTCHANGE_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79023-1_A_STATUS_L"/>
+               <xs:element name="IN7_DZIENNIK_KORESP_ID"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79024-1_IN7_DZIENN"/>
+               <xs:element name="IN7_DZIENNIK_KORESP_ID_ZAMOWIENIE"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79025-1_IN7_DZIENN"/>
+               <xs:element name="A_UPDATE_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79026-1_A_UPDATE_D"/>
+               <xs:element name="A_ADM_COMPANY"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79027-1_A_ADM_COMP"/>
+               <xs:element name="S_ADDRESS_CITY"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79028-1_S_ADDRESS_"/>
+               <xs:element name="S_ADDRESS_POST_CODE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79029-1_S_ADDRESS_"/>
+               <xs:element name="S_ADDRESS_POST_OFFICE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79031-1_S_ADDRESS_"/>
+               <xs:element name="S_ADDRESS_STREET"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79032-1_S_ADDRESS_"/>
+               <xs:element name="S_ADDRESS_HOUSE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79033-1_S_ADDRESS_"/>
+               <xs:element name="S_OTHER_INFO"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79034-1_S_OTHER_IN"/>
+               <xs:element name="S_IP" type="xs:string" id="a3A__DEVICES___d5e79035-1_S_IP"/>
+               <xs:element name="T_NETWORK_SERVER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79036-1_T_NETWORK_"/>
+               <xs:element name="T_TOPOLOGY_PLACE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79037-1_T_TOPOLOGY"/>
+               <xs:element name="T_DEVICE_SERIAL"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79038-1_T_DEVICE_S"/>
+               <xs:element name="T_DEVICE_TYPE"
+                           type="default_db__x3A__DEVICES:T_DEVICE_TYPE_maszyna"
+                           id="a3A__DEVICES___d5e79039-1_T_DEVICE_T"/>
+               <xs:element name="T_DEVICE_PORTS_OK"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79040-1_T_DEVICE_P"/>
+               <xs:element name="T_DEVICE_INFO"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79041-1_T_DEVICE_I"/>
+               <xs:element name="T_DEVICE_POWER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79043-1_T_DEVICE_P"/>
+               <xs:element name="T_TELBOX_NEIGHBOUR_IN"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79044-1_T_TELBOX_N"/>
+               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79045-1_T_TELBOX_N"/>
+               <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="T_TELBOX_NEIGHBOUR_IN_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #2225 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="the_geom"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79046-1_the_geom"/>
+               <xs:element name="T_WORKPOINTS"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79047-1_T_WORKPOIN"/>
+               <xs:element name="T_WORKPOINTS_VALUE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79048-1_T_WORKPOIN"/>
+               <xs:element name="T_WORKPOINTS_TYPE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79049-1_T_WORKPOIN"/>
+               <xs:element name="T_WORKPOINTS_USER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79050-1_T_WORKPOIN"/>
+               <xs:element name="T_WORKPOINTS_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79051-1_T_WORKPOIN"/>
+               <xs:element name="T_PENALTIES"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79052-1_T_PENALTIE"/>
+               <xs:element name="T_PENALTIES_TYPE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79053-1_T_PENALTIE"/>
+               <xs:element name="T_PENALTIES_VALUE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79055-1_T_PENALTIE"/>
+               <xs:element name="T_WHO_CONNECTED"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79056-1_T_WHO_CONN"/>
+               <xs:element name="T_WHEN_CONNECTED"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79057-1_T_WHEN_CON"/>
+               <xs:element name="T_PRODUCER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79058-1_T_PRODUCER"/>
+               <xs:element name="T_PRODUCTION_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79059-1_T_PRODUCTI"/>
+               <xs:element name="T_BUY_DATE"
+                           type="xs:token"
+                           id="a3A__DEVICES___d5e79060-1_T_BUY_DATE"/>
+               <xs:element name="T_SELLER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79061-1_T_SELLER"/>
+               <xs:element name="T_OWNER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79062-1_T_OWNER"/>
+               <xs:element name="T_GUARRANTY_EXPIRE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79063-1_T_GUARRANT"/>
+               <xs:element name="T_PAPERBOX_LOCATION"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79064-1_T_PAPERBOX"/>
+               <xs:element name="F_BILL_DATE"
+                           type="xs:token"
+                           id="a3A__DEVICES___d5e79065-1_F_BILL_DAT"/>
+               <xs:element name="F_BILL_NUMBER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79067-1_F_BILL_NUM"/>
+               <xs:element name="F_BILL_POSITION"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79068-1_F_BILL_POS"/>
+               <xs:element name="F_BILL_COST"
+                           type="xs:double"
+                           id="a3A__DEVICES___d5e79069-1_F_BILL_COS"/>
+               <xs:element name="F_MONTHLY_LEASE_COST"
+                           type="xs:double"
+                           id="a3A__DEVICES___d5e79070-1_F_MONTHLY_"/>
+               <xs:element name="F_DEPTECIATION_LENGTH_YEARS"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79071-1_F_DEPTECIA"/>
+               <xs:element name="S_HW" type="xs:string" id="a3A__DEVICES___d5e79072-1_S_HW"/>
+               <xs:element name="CRM_LISTA_ZASOBOW_ID"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79073-1_CRM_LISTA_"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #224
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="CRM_LISTA_ZASOBOW_xpath"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79074-1_CRM_LISTA_"/>
+               <xs:element name="ID_PROJECT"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79075-1_ID_PROJECT"/>
+               <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_PROJECT"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #204
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="L_APPOITMENT_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79076-1_L_APPOITME"/>
+               <xs:element name="L_APPOITMENT_USER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79077-1_L_APPOITME"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #166
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="L_APPOITMENT_PERIOD"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79079-1_L_APPOITME"/>
+               <xs:element name="L_APPOITMENT_INFO"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79080-1_L_APPOITME"/>
+               <xs:element name="L_APPOITMENT_TYPE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79081-1_L_APPOITME"/>
+               <xs:element name="L_CALENDAR"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79082-1_L_CALENDAR"/>
+               <xs:element name="P_ACCOUNT"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79083-1_P_ACCOUNT"/>
+               <xs:element name="ID_BILLING_USERS"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79084-1_ID_BILLING"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="ID_SERVICES"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79085-1_ID_SERVICE"/>
+               <xs:element ref="default_db__x3A__SERVICES:SERVICES">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_SERVICES"
+                                                         system_cache__appinfo:xpath="default_db__x3A__SERVICES:SERVICES/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #183
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="A_CLASSIFIED"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79086-1_A_CLASSIFI"/>
+               <xs:element name="ADM_PASSWD"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79087-1_ADM_PASSWD"/>
+               <xs:element name="S_PASSWD"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79088-1_S_PASSWD"/>
+               <xs:element name="ADMIN_USERS_ID"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79091-1_ADMIN_USER"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:ADMIN_USERS_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ADMIN_USERS_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:ADMIN_USERS_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #185
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:ADMIN_USERS"
+                           maxOccurs="1"
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="ADMIN_USERS_ID"
+                                                         system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:ADMIN_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
+            </xs:sequence>
+            <xs:attribute name="label" type="xs:string"/>
+            <xs:assert test="@label = concat(ID, ' ', T_DEVICE_TYPE)"/>
+         </xs:restriction>
+      </xs:complexContent>
+   </xs:complexType>
+   <xs:element id="a3A__DEVICES___d5e8586-1_FORMA"
+               name="FORMA"
+               type="default_db__x3A__DEVICES:FORMA"/>
+   <xs:complexType id="a3A__DEVICES___d5e8578-1_FORMA" name="FORMA">
+      <xs:complexContent id="a3A__DEVICES___d5e8579-1">
+         <xs:restriction base="default_db__x3A__DEVICES:DEVICES">
+            <xs:sequence id="a3A__DEVICES___d5e79096-1">
+               <!--<xs:element ref="SystemObjects__x3A__AccessOwner:AccessOwner"
+                  id="a3A__DEVICES___d5e79097-1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="L_APPOITMENT_USER" system_cache__appinfo:xpath="SystemObjects__x3A__AccessOwner:AccessOwner/login"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>-->
+               <!--<xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupRead"
+                  id="a3A__DEVICES___d5e79102-1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="A_CLASSIFIED" system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupRead/uid"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>-->
+               <!--<xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupWrite"
+                  id="a3A__DEVICES___d5e79107-1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="A_ADM_COMPANY" system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupWrite/uid"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>-->
+               <xs:element name="ID" type="xs:integer" id="a3A__DEVICES___d5e79112-1_ID"/>
+               <xs:element name="PARENT_ID"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79113-1_PARENT_ID"/>
+               <xs:element ref="default_db__x3A__DEVICES:DEVICES" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="PARENT_ID"
+                                                         system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:DEVICES/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="A_RECORD_CREATE_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79114-1_A_RECORD_C"/>
+               <xs:element name="A_RECORD_CREATE_AUTHOR"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79115-1_A_RECORD_C"/>
+               <xs:element name="A_RECORD_UPDATE_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79116-1_A_RECORD_U"/>
+               <xs:element name="A_RECORD_UPDATE_AUTHOR"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79117-1_A_RECORD_U"/>
+               <xs:element name="A_PROBLEM"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79118-1_A_PROBLEM"/>
+               <xs:element name="A_PROBLEM_DESC"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79119-1_A_PROBLEM_"/>
+               <xs:element name="A_PROBLEM_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79121-1_A_PROBLEM_"/>
+               <xs:element name="A_STATUS"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79122-1_A_STATUS"/>
+               <xs:element name="A_STATUS_EV"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79123-1_A_STATUS_E"/>
+               <xs:element name="A_STATUS_INFO"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79124-1_A_STATUS_I"/>
+               <xs:element name="A_STATUS_LASTCHANGE_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79125-1_A_STATUS_L"/>
+               <xs:element name="IN7_DZIENNIK_KORESP_ID"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79126-1_IN7_DZIENN"/>
+               <xs:element name="IN7_DZIENNIK_KORESP_ID_ZAMOWIENIE"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79127-1_IN7_DZIENN"/>
+               <xs:element name="A_UPDATE_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79128-1_A_UPDATE_D"/>
+               <xs:element name="A_ADM_COMPANY"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79129-1_A_ADM_COMP"/>
+               <xs:element name="S_ADDRESS_CITY"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79130-1_S_ADDRESS_"/>
+               <xs:element name="S_ADDRESS_POST_CODE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79131-1_S_ADDRESS_"/>
+               <xs:element name="S_ADDRESS_POST_OFFICE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79133-1_S_ADDRESS_"/>
+               <xs:element name="S_ADDRESS_STREET"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79134-1_S_ADDRESS_"/>
+               <xs:element name="S_ADDRESS_HOUSE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79135-1_S_ADDRESS_"/>
+               <xs:element name="S_OTHER_INFO"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79136-1_S_OTHER_IN"/>
+               <xs:element name="S_IP" type="xs:string" id="a3A__DEVICES___d5e79137-1_S_IP"/>
+               <xs:element name="T_NETWORK_SERVER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79138-1_T_NETWORK_"/>
+               <xs:element name="T_TOPOLOGY_PLACE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79139-1_T_TOPOLOGY"/>
+               <xs:element name="T_DEVICE_SERIAL"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79140-1_T_DEVICE_S"/>
+               <xs:element name="T_DEVICE_TYPE"
+                           type="default_db__x3A__DEVICES:T_DEVICE_TYPE_forma"
+                           id="a3A__DEVICES___d5e79141-1_T_DEVICE_T"/>
+               <xs:element name="T_DEVICE_PORTS_OK"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79142-1_T_DEVICE_P"/>
+               <xs:element name="T_DEVICE_INFO"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79143-1_T_DEVICE_I"/>
+               <xs:element name="T_DEVICE_POWER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79145-1_T_DEVICE_P"/>
+               <xs:element name="T_TELBOX_NEIGHBOUR_IN"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79146-1_T_TELBOX_N"/>
+               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79147-1_T_TELBOX_N"/>
+               <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="T_TELBOX_NEIGHBOUR_IN_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #2225 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="the_geom"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79148-1_the_geom"/>
+               <xs:element name="T_WORKPOINTS"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79149-1_T_WORKPOIN"/>
+               <xs:element name="T_WORKPOINTS_VALUE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79150-1_T_WORKPOIN"/>
+               <xs:element name="T_WORKPOINTS_TYPE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79151-1_T_WORKPOIN"/>
+               <xs:element name="T_WORKPOINTS_USER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79152-1_T_WORKPOIN"/>
+               <xs:element name="T_WORKPOINTS_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79153-1_T_WORKPOIN"/>
+               <xs:element name="T_PENALTIES"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79154-1_T_PENALTIE"/>
+               <xs:element name="T_PENALTIES_TYPE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79155-1_T_PENALTIE"/>
+               <xs:element name="T_PENALTIES_VALUE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79157-1_T_PENALTIE"/>
+               <xs:element name="T_WHO_CONNECTED"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79158-1_T_WHO_CONN"/>
+               <xs:element name="T_WHEN_CONNECTED"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79159-1_T_WHEN_CON"/>
+               <xs:element name="T_PRODUCER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79160-1_T_PRODUCER"/>
+               <xs:element name="T_PRODUCTION_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79161-1_T_PRODUCTI"/>
+               <xs:element name="T_BUY_DATE"
+                           type="xs:token"
+                           id="a3A__DEVICES___d5e79162-1_T_BUY_DATE"/>
+               <xs:element name="T_SELLER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79163-1_T_SELLER"/>
+               <xs:element name="T_OWNER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79164-1_T_OWNER"/>
+               <xs:element name="T_GUARRANTY_EXPIRE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79165-1_T_GUARRANT"/>
+               <xs:element name="T_PAPERBOX_LOCATION"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79166-1_T_PAPERBOX"/>
+               <xs:element name="F_BILL_DATE"
+                           type="xs:token"
+                           id="a3A__DEVICES___d5e79167-1_F_BILL_DAT"/>
+               <xs:element name="F_BILL_NUMBER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79169-1_F_BILL_NUM"/>
+               <xs:element name="F_BILL_POSITION"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79170-1_F_BILL_POS"/>
+               <xs:element name="F_BILL_COST"
+                           type="xs:double"
+                           id="a3A__DEVICES___d5e79171-1_F_BILL_COS"/>
+               <xs:element name="F_MONTHLY_LEASE_COST"
+                           type="xs:double"
+                           id="a3A__DEVICES___d5e79172-1_F_MONTHLY_"/>
+               <xs:element name="F_DEPTECIATION_LENGTH_YEARS"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79173-1_F_DEPTECIA"/>
+               <xs:element name="S_HW" type="xs:string" id="a3A__DEVICES___d5e79174-1_S_HW"/>
+               <xs:element name="CRM_LISTA_ZASOBOW_ID"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79175-1_CRM_LISTA_"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #224
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="CRM_LISTA_ZASOBOW_xpath"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79176-1_CRM_LISTA_"/>
+               <xs:element name="ID_PROJECT"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79177-1_ID_PROJECT"/>
+               <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_PROJECT"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #204
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="L_APPOITMENT_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79178-1_L_APPOITME"/>
+               <xs:element name="L_APPOITMENT_USER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79179-1_L_APPOITME"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #166
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="L_APPOITMENT_PERIOD"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79181-1_L_APPOITME"/>
+               <xs:element name="L_APPOITMENT_INFO"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79182-1_L_APPOITME"/>
+               <xs:element name="L_APPOITMENT_TYPE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79183-1_L_APPOITME"/>
+               <xs:element name="L_CALENDAR"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79184-1_L_CALENDAR"/>
+               <xs:element name="P_ACCOUNT"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79185-1_P_ACCOUNT"/>
+               <xs:element name="ID_BILLING_USERS"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79186-1_ID_BILLING"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="ID_SERVICES"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79187-1_ID_SERVICE"/>
+               <xs:element ref="default_db__x3A__SERVICES:SERVICES">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_SERVICES"
+                                                         system_cache__appinfo:xpath="default_db__x3A__SERVICES:SERVICES/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #183
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="A_CLASSIFIED"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79188-1_A_CLASSIFI"/>
+               <xs:element name="ADM_PASSWD"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79189-1_ADM_PASSWD"/>
+               <xs:element name="S_PASSWD"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79190-1_S_PASSWD"/>
+               <xs:element name="ADMIN_USERS_ID"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79193-1_ADMIN_USER"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:ADMIN_USERS_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ADMIN_USERS_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:ADMIN_USERS_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #185
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:ADMIN_USERS"
+                           maxOccurs="1"
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="ADMIN_USERS_ID"
+                                                         system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:ADMIN_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
+            </xs:sequence>
+            <xs:attribute name="label" type="xs:string"/>
+            <xs:assert test="@label = concat(ID, ' ', T_DEVICE_TYPE)"/>
+         </xs:restriction>
+      </xs:complexContent>
+   </xs:complexType>
+   <xs:element id="a3A__DEVICES___d5e8577-1_MASZYNA"
+               name="MASZYNA"
+               type="default_db__x3A__DEVICES:MASZYNA"/>
+   <xs:element name="ID_DEVICE" type="default_db__x3A__DEVICES:DEVICES">
+      <xs:annotation>
+         <xs:documentation>Uzyte glownie w Korespondencji</xs:documentation>
+      </xs:annotation>
+   </xs:element>
+   <xs:element name="PARENT_ID_DEVICE" type="default_db__x3A__DEVICES:DEVICES">
+      <xs:annotation>
+         <xs:documentation>Uzyte w telboxach do tworzenia struktury</xs:documentation>
+      </xs:annotation>
+   </xs:element>
+</xs:schema>

+ 2 - 0
SE/schema/ant-object/default_db.DEVICES/ID_DEVICE/build.xml

@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<empty/>

+ 439 - 54
SE/schema/ant-object/default_db.DEVICES/MASZYNA/MASZYNA.xsd

@@ -13,18 +13,20 @@
            xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
            xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
            xmlns:system_cache__resources_tree_generate_xsl_required_occurs_raport="http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/resources_tree_generate_xsl_require_occurs_raport"
            xmlns:system_cache__resources_tree_generate_xsl_required_occurs_raport="http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/resources_tree_generate_xsl_require_occurs_raport"
            xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
            xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+           xmlns:fix_se_defaultdb_schema="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/fix_se_defaultdb_schema/fix_se_defaultdb_schema.xsd"
+           xmlns:p5Type="http://biuro.biall-net.pl/p5/schema/types"
            targetNamespace="https://biuro.biall-net.pl/wfs/default_db/table/DEVICES.xsd"
            targetNamespace="https://biuro.biall-net.pl/wfs/default_db/table/DEVICES.xsd"
            vc:minVersion="1.1">
            vc:minVersion="1.1">
+   <xs:import namespace="http://biuro.biall-net.pl/p5/schema/types"
+              schemaLocation="../../../types.xsd"/>
    <xs:import namespace="http://www.opengis.net/gml/3.2"
    <xs:import namespace="http://www.opengis.net/gml/3.2"
-              schemaLocation="../Types/gml.xsd"/>
+              schemaLocation="http://www.opengis.net/gml/3.2"/>
    <xs:import namespace="https://biuro.biall-net.pl/wfs/default_db/table/IN7_DZIENNIK_KORESP.xsd"
    <xs:import namespace="https://biuro.biall-net.pl/wfs/default_db/table/IN7_DZIENNIK_KORESP.xsd"
-              schemaLocation="../table/IN7_DZIENNIK_KORESP.xsd"/>
+              schemaLocation="../../default_db.IN7_DZIENNIK_KORESP/IN7_DZIENNIK_KORESP/IN7_DZIENNIK_KORESP.xsd"/>
    <xs:import namespace="https://biuro.biall-net.pl/wfs/default_db/table/IN7_MK_BAZA_DYSTRYBUCJI.xsd"
    <xs:import namespace="https://biuro.biall-net.pl/wfs/default_db/table/IN7_MK_BAZA_DYSTRYBUCJI.xsd"
-              schemaLocation="../table/IN7_MK_BAZA_DYSTRYBUCJI.xsd"/>
-   <xs:import namespace="https://biuro.biall-net.pl/wfs/default_db/SystemObjects/AccessGroup.xsd"
-              schemaLocation="../SystemObjects/AccessGroup.xsd"/>
-   <xs:import namespace="https://biuro.biall-net.pl/wfs/default_db/SystemObjects/AccessOwner.xsd"
-              schemaLocation="../SystemObjects/AccessOwner.xsd"/>
+              schemaLocation="../../default_db.IN7_MK_BAZA_DYSTRYBUCJI/IN7_MK_BAZA_DYSTRYBUCJI/IN7_MK_BAZA_DYSTRYBUCJI.xsd"/>
+   <xs:import namespace="https://biuro.biall-net.pl/wfs/default_db/table/ADMIN_USERS.xsd"
+              schemaLocation="../../default_db.ADMIN_USERS/ADMIN_USERS/ADMIN_USERS.xsd"/>
    <xs:simpleType name="A_STATUS_Type" id="a3A__DEVICES___d5e78873-1_A_STATUS_T">
    <xs:simpleType name="A_STATUS_Type" id="a3A__DEVICES___d5e78873-1_A_STATUS_T">
       <xs:restriction base="xs:string">
       <xs:restriction base="xs:string">
          <xs:enumeration value="NORMAL"/>
          <xs:enumeration value="NORMAL"/>
@@ -50,8 +52,22 @@
       </xs:restriction>
       </xs:restriction>
    </xs:simpleType>
    </xs:simpleType>
    <xs:complexType name="DEVICES" id="a3A__DEVICES___d5e78890-1_DEVICES">
    <xs:complexType name="DEVICES" id="a3A__DEVICES___d5e78890-1_DEVICES">
+      <xs:annotation>
+         <xs:appinfo>
+            <system_cache__appinfo:heritage>
+               <system_cache__appinfo:inherit system_cache__appinfo:inherit_ref="default_db:DEVICES"
+                                              system_cache__appinfo:heritage_acl="true">
+                  <system_cache__appinfo:acl_rule_inherit_to_all_same_name_elements_and_refs/>
+                  <acl_rule_inherit_to_all_refs_by_primary/>
+                  <acl_rule_inherit_to_all_refs_by_local_element system_cache__appinfo:acl_rule_inherit_local_element_name="A_STATUS"/>
+               </system_cache__appinfo:inherit>
+               <system_cache__appinfo:exherit_all system_cache__appinfo:heritage_acl="true"
+                                                  system_cache__appinfo:heritage_sort="true"/>
+            </system_cache__appinfo:heritage>
+         </xs:appinfo>
+      </xs:annotation>
       <xs:sequence id="a3A__DEVICES___d5e78891-1">
       <xs:sequence id="a3A__DEVICES___d5e78891-1">
-         <xs:element ref="SystemObjects__x3A__AccessOwner:AccessOwner"
+         <!--<xs:element ref="SystemObjects__x3A__AccessOwner:AccessOwner"
                      id="a3A__DEVICES___d5e78892-1">
                      id="a3A__DEVICES___d5e78892-1">
             <xs:annotation>
             <xs:annotation>
                <xs:appinfo>
                <xs:appinfo>
@@ -61,8 +77,8 @@
                   </system_cache__appinfo:flat_relation_cache>
                   </system_cache__appinfo:flat_relation_cache>
                </xs:appinfo>
                </xs:appinfo>
             </xs:annotation>
             </xs:annotation>
-         </xs:element>
-         <xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupRead"
+         </xs:element>-->
+         <!--<xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupRead"
                      id="a3A__DEVICES___d5e78897-1">
                      id="a3A__DEVICES___d5e78897-1">
             <xs:annotation>
             <xs:annotation>
                <xs:appinfo>
                <xs:appinfo>
@@ -72,8 +88,8 @@
                   </system_cache__appinfo:flat_relation_cache>
                   </system_cache__appinfo:flat_relation_cache>
                </xs:appinfo>
                </xs:appinfo>
             </xs:annotation>
             </xs:annotation>
-         </xs:element>
-         <xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupWrite"
+         </xs:element>-->
+         <!--<xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupWrite"
                      id="a3A__DEVICES___d5e78902-1">
                      id="a3A__DEVICES___d5e78902-1">
             <xs:annotation>
             <xs:annotation>
                <xs:appinfo>
                <xs:appinfo>
@@ -83,11 +99,23 @@
                   </system_cache__appinfo:flat_relation_cache>
                   </system_cache__appinfo:flat_relation_cache>
                </xs:appinfo>
                </xs:appinfo>
             </xs:annotation>
             </xs:annotation>
-         </xs:element>
+         </xs:element>-->
          <xs:element name="ID" type="xs:integer" id="a3A__DEVICES___d5e78907-1_ID"/>
          <xs:element name="ID" type="xs:integer" id="a3A__DEVICES___d5e78907-1_ID"/>
          <xs:element name="PARENT_ID"
          <xs:element name="PARENT_ID"
                      type="xs:integer"
                      type="xs:integer"
-                     id="a3A__DEVICES___d5e78908-1_PARENT_ID"/>
+                     id="a3A__DEVICES___d5e78908-1_PARENT_ID"
+                     minOccurs="0"/>
+         <xs:element ref="default_db__x3A__DEVICES:DEVICES" minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:name="PARENT_ID"
+                                                   system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:xpath="default_db__x3A__DEVICES:DEVICES/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="A_RECORD_CREATE_DATE"
          <xs:element name="A_RECORD_CREATE_DATE"
                      type="xs:string"
                      type="xs:string"
                      id="a3A__DEVICES___d5e78909-1_A_RECORD_C"/>
                      id="a3A__DEVICES___d5e78909-1_A_RECORD_C"/>
@@ -179,6 +207,20 @@
          <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
          <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
                      type="xs:integer"
                      type="xs:integer"
                      id="a3A__DEVICES___d5e78942-1_T_TELBOX_N"/>
                      id="a3A__DEVICES___d5e78942-1_T_TELBOX_N"/>
+         <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="T_TELBOX_NEIGHBOUR_IN_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #2225 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="the_geom"
          <xs:element name="the_geom"
                      type="xs:string"
                      type="xs:string"
                      id="a3A__DEVICES___d5e78943-1_the_geom"/>
                      id="a3A__DEVICES___d5e78943-1_the_geom"/>
@@ -255,18 +297,60 @@
          <xs:element name="CRM_LISTA_ZASOBOW_ID"
          <xs:element name="CRM_LISTA_ZASOBOW_ID"
                      type="xs:integer"
                      type="xs:integer"
                      id="a3A__DEVICES___d5e78970-1_CRM_LISTA_"/>
                      id="a3A__DEVICES___d5e78970-1_CRM_LISTA_"/>
+         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #224
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="CRM_LISTA_ZASOBOW_xpath"
          <xs:element name="CRM_LISTA_ZASOBOW_xpath"
                      type="xs:string"
                      type="xs:string"
                      id="a3A__DEVICES___d5e78971-1_CRM_LISTA_"/>
                      id="a3A__DEVICES___d5e78971-1_CRM_LISTA_"/>
          <xs:element name="ID_PROJECT"
          <xs:element name="ID_PROJECT"
                      type="xs:integer"
                      type="xs:integer"
                      id="a3A__DEVICES___d5e78972-1_ID_PROJECT"/>
                      id="a3A__DEVICES___d5e78972-1_ID_PROJECT"/>
+         <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_PROJECT"
+                                                   system_cache__appinfo:xpath="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #204
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="L_APPOITMENT_DATE"
          <xs:element name="L_APPOITMENT_DATE"
                      type="xs:string"
                      type="xs:string"
                      id="a3A__DEVICES___d5e78973-1_L_APPOITME"/>
                      id="a3A__DEVICES___d5e78973-1_L_APPOITME"/>
          <xs:element name="L_APPOITMENT_USER"
          <xs:element name="L_APPOITMENT_USER"
                      type="xs:string"
                      type="xs:string"
                      id="a3A__DEVICES___d5e78974-1_L_APPOITME"/>
                      id="a3A__DEVICES___d5e78974-1_L_APPOITME"/>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #166
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="L_APPOITMENT_PERIOD"
          <xs:element name="L_APPOITMENT_PERIOD"
                      type="xs:string"
                      type="xs:string"
                      id="a3A__DEVICES___d5e78976-1_L_APPOITME"/>
                      id="a3A__DEVICES___d5e78976-1_L_APPOITME"/>
@@ -285,9 +369,37 @@
          <xs:element name="ID_BILLING_USERS"
          <xs:element name="ID_BILLING_USERS"
                      type="xs:integer"
                      type="xs:integer"
                      id="a3A__DEVICES___d5e78981-1_ID_BILLING"/>
                      id="a3A__DEVICES___d5e78981-1_ID_BILLING"/>
+         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_USERS"
+                                                   system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="ID_SERVICES"
          <xs:element name="ID_SERVICES"
                      type="xs:integer"
                      type="xs:integer"
                      id="a3A__DEVICES___d5e78982-1_ID_SERVICE"/>
                      id="a3A__DEVICES___d5e78982-1_ID_SERVICE"/>
+         <xs:element ref="default_db__x3A__SERVICES:SERVICES">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_SERVICES"
+                                                   system_cache__appinfo:xpath="default_db__x3A__SERVICES:SERVICES/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #183
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="A_CLASSIFIED"
          <xs:element name="A_CLASSIFIED"
                      type="xs:string"
                      type="xs:string"
                      id="a3A__DEVICES___d5e78983-1_A_CLASSIFI"/>
                      id="a3A__DEVICES___d5e78983-1_A_CLASSIFI"/>
@@ -297,13 +409,39 @@
          <xs:element name="S_PASSWD"
          <xs:element name="S_PASSWD"
                      type="xs:string"
                      type="xs:string"
                      id="a3A__DEVICES___d5e78985-1_S_PASSWD"/>
                      id="a3A__DEVICES___d5e78985-1_S_PASSWD"/>
-         <xs:element name="SYNC_SQIX_STATUS"
-                     type="xs:string"
-                     id="a3A__DEVICES___d5e78986-1_SYNC_SQIX_"/>
          <xs:element name="ADMIN_USERS_ID"
          <xs:element name="ADMIN_USERS_ID"
                      type="xs:integer"
                      type="xs:integer"
                      id="a3A__DEVICES___d5e78988-1_ADMIN_USER"/>
                      id="a3A__DEVICES___d5e78988-1_ADMIN_USER"/>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:ADMIN_USERS_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ADMIN_USERS_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:ADMIN_USERS_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #185
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:ADMIN_USERS"
+                     maxOccurs="1"
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:name="ADMIN_USERS_ID"
+                                                   system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:ADMIN_USERS/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
       </xs:sequence>
       </xs:sequence>
+      <xs:attribute name="label" type="xs:string"/>
+      <xs:assert test="@label = concat(ID, ' ', T_DEVICE_TYPE)"/>
    </xs:complexType>
    </xs:complexType>
    <xs:element name="DEVICES"
    <xs:element name="DEVICES"
                type="default_db__x3A__DEVICES:DEVICES"
                type="default_db__x3A__DEVICES:DEVICES"
@@ -312,43 +450,52 @@
       <xs:complexContent id="a3A__DEVICES___d5e8570-1">
       <xs:complexContent id="a3A__DEVICES___d5e8570-1">
          <xs:restriction base="default_db__x3A__DEVICES:DEVICES">
          <xs:restriction base="default_db__x3A__DEVICES:DEVICES">
             <xs:sequence id="a3A__DEVICES___d5e78994-1">
             <xs:sequence id="a3A__DEVICES___d5e78994-1">
-               <xs:element ref="SystemObjects__x3A__AccessOwner:AccessOwner"
-                           id="a3A__DEVICES___d5e78995-1">
+               <!--<xs:element ref="SystemObjects__x3A__AccessOwner:AccessOwner"
+                  id="a3A__DEVICES___d5e78995-1">
                   <xs:annotation>
                   <xs:annotation>
                      <xs:appinfo>
                      <xs:appinfo>
                         <system_cache__appinfo:flat_relation_cache>
                         <system_cache__appinfo:flat_relation_cache>
-                           <system_cache__appinfo:source system_cache__appinfo:name="L_APPOITMENT_USER"
-                                                         system_cache__appinfo:xpath="SystemObjects__x3A__AccessOwner:AccessOwner/login"/>
+                           <system_cache__appinfo:source system_cache__appinfo:name="L_APPOITMENT_USER" system_cache__appinfo:xpath="SystemObjects__x3A__AccessOwner:AccessOwner/login"/>
                         </system_cache__appinfo:flat_relation_cache>
                         </system_cache__appinfo:flat_relation_cache>
                      </xs:appinfo>
                      </xs:appinfo>
                   </xs:annotation>
                   </xs:annotation>
-               </xs:element>
-               <xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupRead"
-                           id="a3A__DEVICES___d5e79000-1">
+               </xs:element>-->
+               <!--<xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupRead"
+                  id="a3A__DEVICES___d5e79000-1">
                   <xs:annotation>
                   <xs:annotation>
                      <xs:appinfo>
                      <xs:appinfo>
                         <system_cache__appinfo:flat_relation_cache>
                         <system_cache__appinfo:flat_relation_cache>
-                           <system_cache__appinfo:source system_cache__appinfo:name="A_CLASSIFIED"
-                                                         system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupRead/uid"/>
+                           <system_cache__appinfo:source system_cache__appinfo:name="A_CLASSIFIED" system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupRead/uid"/>
                         </system_cache__appinfo:flat_relation_cache>
                         </system_cache__appinfo:flat_relation_cache>
                      </xs:appinfo>
                      </xs:appinfo>
                   </xs:annotation>
                   </xs:annotation>
-               </xs:element>
-               <xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupWrite"
-                           id="a3A__DEVICES___d5e79005-1">
+               </xs:element>-->
+               <!--<xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupWrite"
+                  id="a3A__DEVICES___d5e79005-1">
                   <xs:annotation>
                   <xs:annotation>
                      <xs:appinfo>
                      <xs:appinfo>
                         <system_cache__appinfo:flat_relation_cache>
                         <system_cache__appinfo:flat_relation_cache>
-                           <system_cache__appinfo:source system_cache__appinfo:name="A_ADM_COMPANY"
-                                                         system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupWrite/uid"/>
+                           <system_cache__appinfo:source system_cache__appinfo:name="A_ADM_COMPANY" system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupWrite/uid"/>
                         </system_cache__appinfo:flat_relation_cache>
                         </system_cache__appinfo:flat_relation_cache>
                      </xs:appinfo>
                      </xs:appinfo>
                   </xs:annotation>
                   </xs:annotation>
-               </xs:element>
+               </xs:element>-->
                <xs:element name="ID" type="xs:integer" id="a3A__DEVICES___d5e79010-1_ID"/>
                <xs:element name="ID" type="xs:integer" id="a3A__DEVICES___d5e79010-1_ID"/>
                <xs:element name="PARENT_ID"
                <xs:element name="PARENT_ID"
                            type="xs:integer"
                            type="xs:integer"
-                           id="a3A__DEVICES___d5e79011-1_PARENT_ID"/>
+                           id="a3A__DEVICES___d5e79011-1_PARENT_ID"
+                           minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:DEVICES" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="PARENT_ID"
+                                                         system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:DEVICES/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE"
                <xs:element name="A_RECORD_CREATE_DATE"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79012-1_A_RECORD_C"/>
                            id="a3A__DEVICES___d5e79012-1_A_RECORD_C"/>
@@ -440,6 +587,20 @@
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79045-1_T_TELBOX_N"/>
                            id="a3A__DEVICES___d5e79045-1_T_TELBOX_N"/>
+               <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="T_TELBOX_NEIGHBOUR_IN_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #2225 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="the_geom"
                <xs:element name="the_geom"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79046-1_the_geom"/>
                            id="a3A__DEVICES___d5e79046-1_the_geom"/>
@@ -516,18 +677,60 @@
                <xs:element name="CRM_LISTA_ZASOBOW_ID"
                <xs:element name="CRM_LISTA_ZASOBOW_ID"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79073-1_CRM_LISTA_"/>
                            id="a3A__DEVICES___d5e79073-1_CRM_LISTA_"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #224
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="CRM_LISTA_ZASOBOW_xpath"
                <xs:element name="CRM_LISTA_ZASOBOW_xpath"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79074-1_CRM_LISTA_"/>
                            id="a3A__DEVICES___d5e79074-1_CRM_LISTA_"/>
                <xs:element name="ID_PROJECT"
                <xs:element name="ID_PROJECT"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79075-1_ID_PROJECT"/>
                            id="a3A__DEVICES___d5e79075-1_ID_PROJECT"/>
+               <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_PROJECT"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #204
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_DATE"
                <xs:element name="L_APPOITMENT_DATE"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79076-1_L_APPOITME"/>
                            id="a3A__DEVICES___d5e79076-1_L_APPOITME"/>
                <xs:element name="L_APPOITMENT_USER"
                <xs:element name="L_APPOITMENT_USER"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79077-1_L_APPOITME"/>
                            id="a3A__DEVICES___d5e79077-1_L_APPOITME"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #166
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                <xs:element name="L_APPOITMENT_PERIOD"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79079-1_L_APPOITME"/>
                            id="a3A__DEVICES___d5e79079-1_L_APPOITME"/>
@@ -546,9 +749,37 @@
                <xs:element name="ID_BILLING_USERS"
                <xs:element name="ID_BILLING_USERS"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79084-1_ID_BILLING"/>
                            id="a3A__DEVICES___d5e79084-1_ID_BILLING"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="ID_SERVICES"
                <xs:element name="ID_SERVICES"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79085-1_ID_SERVICE"/>
                            id="a3A__DEVICES___d5e79085-1_ID_SERVICE"/>
+               <xs:element ref="default_db__x3A__SERVICES:SERVICES">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_SERVICES"
+                                                         system_cache__appinfo:xpath="default_db__x3A__SERVICES:SERVICES/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #183
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_CLASSIFIED"
                <xs:element name="A_CLASSIFIED"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79086-1_A_CLASSIFI"/>
                            id="a3A__DEVICES___d5e79086-1_A_CLASSIFI"/>
@@ -558,13 +789,39 @@
                <xs:element name="S_PASSWD"
                <xs:element name="S_PASSWD"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79088-1_S_PASSWD"/>
                            id="a3A__DEVICES___d5e79088-1_S_PASSWD"/>
-               <xs:element name="SYNC_SQIX_STATUS"
-                           type="xs:string"
-                           id="a3A__DEVICES___d5e79089-1_SYNC_SQIX_"/>
                <xs:element name="ADMIN_USERS_ID"
                <xs:element name="ADMIN_USERS_ID"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79091-1_ADMIN_USER"/>
                            id="a3A__DEVICES___d5e79091-1_ADMIN_USER"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:ADMIN_USERS_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ADMIN_USERS_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:ADMIN_USERS_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #185
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:ADMIN_USERS"
+                           maxOccurs="1"
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="ADMIN_USERS_ID"
+                                                         system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:ADMIN_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
             </xs:sequence>
+            <xs:attribute name="label" type="xs:string"/>
+            <xs:assert test="@label = concat(ID, ' ', T_DEVICE_TYPE)"/>
          </xs:restriction>
          </xs:restriction>
       </xs:complexContent>
       </xs:complexContent>
    </xs:complexType>
    </xs:complexType>
@@ -575,43 +832,51 @@
       <xs:complexContent id="a3A__DEVICES___d5e8579-1">
       <xs:complexContent id="a3A__DEVICES___d5e8579-1">
          <xs:restriction base="default_db__x3A__DEVICES:DEVICES">
          <xs:restriction base="default_db__x3A__DEVICES:DEVICES">
             <xs:sequence id="a3A__DEVICES___d5e79096-1">
             <xs:sequence id="a3A__DEVICES___d5e79096-1">
-               <xs:element ref="SystemObjects__x3A__AccessOwner:AccessOwner"
-                           id="a3A__DEVICES___d5e79097-1">
+               <!--<xs:element ref="SystemObjects__x3A__AccessOwner:AccessOwner"
+                  id="a3A__DEVICES___d5e79097-1">
                   <xs:annotation>
                   <xs:annotation>
                      <xs:appinfo>
                      <xs:appinfo>
                         <system_cache__appinfo:flat_relation_cache>
                         <system_cache__appinfo:flat_relation_cache>
-                           <system_cache__appinfo:source system_cache__appinfo:name="L_APPOITMENT_USER"
-                                                         system_cache__appinfo:xpath="SystemObjects__x3A__AccessOwner:AccessOwner/login"/>
+                           <system_cache__appinfo:source system_cache__appinfo:name="L_APPOITMENT_USER" system_cache__appinfo:xpath="SystemObjects__x3A__AccessOwner:AccessOwner/login"/>
                         </system_cache__appinfo:flat_relation_cache>
                         </system_cache__appinfo:flat_relation_cache>
                      </xs:appinfo>
                      </xs:appinfo>
                   </xs:annotation>
                   </xs:annotation>
-               </xs:element>
-               <xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupRead"
-                           id="a3A__DEVICES___d5e79102-1">
+               </xs:element>-->
+               <!--<xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupRead"
+                  id="a3A__DEVICES___d5e79102-1">
                   <xs:annotation>
                   <xs:annotation>
                      <xs:appinfo>
                      <xs:appinfo>
                         <system_cache__appinfo:flat_relation_cache>
                         <system_cache__appinfo:flat_relation_cache>
-                           <system_cache__appinfo:source system_cache__appinfo:name="A_CLASSIFIED"
-                                                         system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupRead/uid"/>
+                           <system_cache__appinfo:source system_cache__appinfo:name="A_CLASSIFIED" system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupRead/uid"/>
                         </system_cache__appinfo:flat_relation_cache>
                         </system_cache__appinfo:flat_relation_cache>
                      </xs:appinfo>
                      </xs:appinfo>
                   </xs:annotation>
                   </xs:annotation>
-               </xs:element>
-               <xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupWrite"
-                           id="a3A__DEVICES___d5e79107-1">
+               </xs:element>-->
+               <!--<xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupWrite"
+                  id="a3A__DEVICES___d5e79107-1">
                   <xs:annotation>
                   <xs:annotation>
                      <xs:appinfo>
                      <xs:appinfo>
                         <system_cache__appinfo:flat_relation_cache>
                         <system_cache__appinfo:flat_relation_cache>
-                           <system_cache__appinfo:source system_cache__appinfo:name="A_ADM_COMPANY"
-                                                         system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupWrite/uid"/>
+                           <system_cache__appinfo:source system_cache__appinfo:name="A_ADM_COMPANY" system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupWrite/uid"/>
                         </system_cache__appinfo:flat_relation_cache>
                         </system_cache__appinfo:flat_relation_cache>
                      </xs:appinfo>
                      </xs:appinfo>
                   </xs:annotation>
                   </xs:annotation>
-               </xs:element>
+               </xs:element>-->
                <xs:element name="ID" type="xs:integer" id="a3A__DEVICES___d5e79112-1_ID"/>
                <xs:element name="ID" type="xs:integer" id="a3A__DEVICES___d5e79112-1_ID"/>
                <xs:element name="PARENT_ID"
                <xs:element name="PARENT_ID"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79113-1_PARENT_ID"/>
                            id="a3A__DEVICES___d5e79113-1_PARENT_ID"/>
+               <xs:element ref="default_db__x3A__DEVICES:DEVICES" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="PARENT_ID"
+                                                         system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:DEVICES/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE"
                <xs:element name="A_RECORD_CREATE_DATE"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79114-1_A_RECORD_C"/>
                            id="a3A__DEVICES___d5e79114-1_A_RECORD_C"/>
@@ -703,6 +968,20 @@
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79147-1_T_TELBOX_N"/>
                            id="a3A__DEVICES___d5e79147-1_T_TELBOX_N"/>
+               <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="T_TELBOX_NEIGHBOUR_IN_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #2225 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="the_geom"
                <xs:element name="the_geom"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79148-1_the_geom"/>
                            id="a3A__DEVICES___d5e79148-1_the_geom"/>
@@ -779,18 +1058,60 @@
                <xs:element name="CRM_LISTA_ZASOBOW_ID"
                <xs:element name="CRM_LISTA_ZASOBOW_ID"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79175-1_CRM_LISTA_"/>
                            id="a3A__DEVICES___d5e79175-1_CRM_LISTA_"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #224
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="CRM_LISTA_ZASOBOW_xpath"
                <xs:element name="CRM_LISTA_ZASOBOW_xpath"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79176-1_CRM_LISTA_"/>
                            id="a3A__DEVICES___d5e79176-1_CRM_LISTA_"/>
                <xs:element name="ID_PROJECT"
                <xs:element name="ID_PROJECT"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79177-1_ID_PROJECT"/>
                            id="a3A__DEVICES___d5e79177-1_ID_PROJECT"/>
+               <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_PROJECT"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #204
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_DATE"
                <xs:element name="L_APPOITMENT_DATE"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79178-1_L_APPOITME"/>
                            id="a3A__DEVICES___d5e79178-1_L_APPOITME"/>
                <xs:element name="L_APPOITMENT_USER"
                <xs:element name="L_APPOITMENT_USER"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79179-1_L_APPOITME"/>
                            id="a3A__DEVICES___d5e79179-1_L_APPOITME"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #166
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                <xs:element name="L_APPOITMENT_PERIOD"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79181-1_L_APPOITME"/>
                            id="a3A__DEVICES___d5e79181-1_L_APPOITME"/>
@@ -809,9 +1130,37 @@
                <xs:element name="ID_BILLING_USERS"
                <xs:element name="ID_BILLING_USERS"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79186-1_ID_BILLING"/>
                            id="a3A__DEVICES___d5e79186-1_ID_BILLING"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="ID_SERVICES"
                <xs:element name="ID_SERVICES"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79187-1_ID_SERVICE"/>
                            id="a3A__DEVICES___d5e79187-1_ID_SERVICE"/>
+               <xs:element ref="default_db__x3A__SERVICES:SERVICES">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_SERVICES"
+                                                         system_cache__appinfo:xpath="default_db__x3A__SERVICES:SERVICES/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #183
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_CLASSIFIED"
                <xs:element name="A_CLASSIFIED"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79188-1_A_CLASSIFI"/>
                            id="a3A__DEVICES___d5e79188-1_A_CLASSIFI"/>
@@ -821,17 +1170,53 @@
                <xs:element name="S_PASSWD"
                <xs:element name="S_PASSWD"
                            type="xs:string"
                            type="xs:string"
                            id="a3A__DEVICES___d5e79190-1_S_PASSWD"/>
                            id="a3A__DEVICES___d5e79190-1_S_PASSWD"/>
-               <xs:element name="SYNC_SQIX_STATUS"
-                           type="xs:string"
-                           id="a3A__DEVICES___d5e79191-1_SYNC_SQIX_"/>
                <xs:element name="ADMIN_USERS_ID"
                <xs:element name="ADMIN_USERS_ID"
                            type="xs:integer"
                            type="xs:integer"
                            id="a3A__DEVICES___d5e79193-1_ADMIN_USER"/>
                            id="a3A__DEVICES___d5e79193-1_ADMIN_USER"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:ADMIN_USERS_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ADMIN_USERS_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:ADMIN_USERS_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #185
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:ADMIN_USERS"
+                           maxOccurs="1"
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="ADMIN_USERS_ID"
+                                                         system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:ADMIN_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
             </xs:sequence>
+            <xs:attribute name="label" type="xs:string"/>
+            <xs:assert test="@label = concat(ID, ' ', T_DEVICE_TYPE)"/>
          </xs:restriction>
          </xs:restriction>
       </xs:complexContent>
       </xs:complexContent>
    </xs:complexType>
    </xs:complexType>
    <xs:element id="a3A__DEVICES___d5e8577-1_MASZYNA"
    <xs:element id="a3A__DEVICES___d5e8577-1_MASZYNA"
                name="MASZYNA"
                name="MASZYNA"
                type="default_db__x3A__DEVICES:MASZYNA"/>
                type="default_db__x3A__DEVICES:MASZYNA"/>
+   <xs:element name="ID_DEVICE" type="default_db__x3A__DEVICES:DEVICES">
+      <xs:annotation>
+         <xs:documentation>Uzyte glownie w Korespondencji</xs:documentation>
+      </xs:annotation>
+   </xs:element>
+   <xs:element name="PARENT_ID_DEVICE" type="default_db__x3A__DEVICES:DEVICES">
+      <xs:annotation>
+         <xs:documentation>Uzyte w telboxach do tworzenia struktury</xs:documentation>
+      </xs:annotation>
+   </xs:element>
 </xs:schema>
 </xs:schema>

+ 2 - 1
SE/schema/ant-object/default_db.DEVICES/MASZYNA/build.xml

@@ -1 +1,2 @@
-<empty/>
+<?xml version="1.0" encoding="UTF-8"?>
+<empty/>

+ 1222 - 0
SE/schema/ant-object/default_db.DEVICES/PARENT_ID_DEVICE/PARENT_ID_DEVICE.xsd

@@ -0,0 +1,1222 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+           xmlns:gml="http://www.opengis.net/gml/3.2"
+           xmlns:Types__x3A__default_Default="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"
+           xmlns:default_db__x3A__IN7_DZIENNIK_KORESP="https://biuro.biall-net.pl/wfs/default_db/table/IN7_DZIENNIK_KORESP.xsd"
+           xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty"
+           xmlns:default_db__x3A__ADMIN_USERS="https://biuro.biall-net.pl/wfs/default_db/table/ADMIN_USERS.xsd"
+           xmlns:default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI="https://biuro.biall-net.pl/wfs/default_db/table/IN7_MK_BAZA_DYSTRYBUCJI.xsd"
+           xmlns:SystemObjects__x3A__AccessGroup="https://biuro.biall-net.pl/wfs/default_db/SystemObjects/AccessGroup.xsd"
+           xmlns:SystemObjects__x3A__AccessOwner="https://biuro.biall-net.pl/wfs/default_db/SystemObjects/AccessOwner.xsd"
+           xmlns:default_db__x3A__DEVICES="https://biuro.biall-net.pl/wfs/default_db/table/DEVICES.xsd"
+           xmlns:p5_tr_map="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/procesy5_translate_map.xsd"
+           xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
+           xmlns:system_cache__resources_tree_generate_xsl_required_occurs_raport="http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/resources_tree_generate_xsl_require_occurs_raport"
+           xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+           xmlns:fix_se_defaultdb_schema="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/fix_se_defaultdb_schema/fix_se_defaultdb_schema.xsd"
+           xmlns:p5Type="http://biuro.biall-net.pl/p5/schema/types"
+           targetNamespace="https://biuro.biall-net.pl/wfs/default_db/table/DEVICES.xsd"
+           vc:minVersion="1.1">
+   <xs:import namespace="http://biuro.biall-net.pl/p5/schema/types"
+              schemaLocation="../../../types.xsd"/>
+   <xs:import namespace="http://www.opengis.net/gml/3.2"
+              schemaLocation="http://www.opengis.net/gml/3.2"/>
+   <xs:import namespace="https://biuro.biall-net.pl/wfs/default_db/table/IN7_DZIENNIK_KORESP.xsd"
+              schemaLocation="../../default_db.IN7_DZIENNIK_KORESP/IN7_DZIENNIK_KORESP/IN7_DZIENNIK_KORESP.xsd"/>
+   <xs:import namespace="https://biuro.biall-net.pl/wfs/default_db/table/IN7_MK_BAZA_DYSTRYBUCJI.xsd"
+              schemaLocation="../../default_db.IN7_MK_BAZA_DYSTRYBUCJI/IN7_MK_BAZA_DYSTRYBUCJI/IN7_MK_BAZA_DYSTRYBUCJI.xsd"/>
+   <xs:import namespace="https://biuro.biall-net.pl/wfs/default_db/table/ADMIN_USERS.xsd"
+              schemaLocation="../../default_db.ADMIN_USERS/ADMIN_USERS/ADMIN_USERS.xsd"/>
+   <xs:simpleType name="A_STATUS_Type" id="a3A__DEVICES___d5e78873-1_A_STATUS_T">
+      <xs:restriction base="xs:string">
+         <xs:enumeration value="NORMAL"/>
+         <xs:enumeration value="WAITING"/>
+         <xs:enumeration value="MONITOR"/>
+         <xs:enumeration value="DELETED"/>
+         <xs:enumeration value="WARNING"/>
+         <xs:enumeration value="OFF_SOFT"/>
+         <xs:enumeration value="OFF_HARD"/>
+      </xs:restriction>
+   </xs:simpleType>
+   <xs:simpleType id="a3A__DEVICES___d5e8554-1_T_DEVICE_T" name="T_DEVICE_TYPE">
+      <xs:restriction base="xs:string"/>
+   </xs:simpleType>
+   <xs:simpleType id="a3A__DEVICES___d5e8556-1_T_DEVICE_T" name="T_DEVICE_TYPE_forma">
+      <xs:restriction base="default_db__x3A__DEVICES:T_DEVICE_TYPE">
+         <xs:enumeration value="FORMA"/>
+      </xs:restriction>
+   </xs:simpleType>
+   <xs:simpleType id="a3A__DEVICES___d5e8559-1_T_DEVICE_T" name="T_DEVICE_TYPE_maszyna">
+      <xs:restriction base="default_db__x3A__DEVICES:T_DEVICE_TYPE">
+         <xs:enumeration value="MASZYNA"/>
+      </xs:restriction>
+   </xs:simpleType>
+   <xs:complexType name="DEVICES" id="a3A__DEVICES___d5e78890-1_DEVICES">
+      <xs:annotation>
+         <xs:appinfo>
+            <system_cache__appinfo:heritage>
+               <system_cache__appinfo:inherit system_cache__appinfo:inherit_ref="default_db:DEVICES"
+                                              system_cache__appinfo:heritage_acl="true">
+                  <system_cache__appinfo:acl_rule_inherit_to_all_same_name_elements_and_refs/>
+                  <acl_rule_inherit_to_all_refs_by_primary/>
+                  <acl_rule_inherit_to_all_refs_by_local_element system_cache__appinfo:acl_rule_inherit_local_element_name="A_STATUS"/>
+               </system_cache__appinfo:inherit>
+               <system_cache__appinfo:exherit_all system_cache__appinfo:heritage_acl="true"
+                                                  system_cache__appinfo:heritage_sort="true"/>
+            </system_cache__appinfo:heritage>
+         </xs:appinfo>
+      </xs:annotation>
+      <xs:sequence id="a3A__DEVICES___d5e78891-1">
+         <!--<xs:element ref="SystemObjects__x3A__AccessOwner:AccessOwner"
+                     id="a3A__DEVICES___d5e78892-1">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                   system_cache__appinfo:xpath="SystemObjects__x3A__AccessOwner:AccessOwner/login"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>-->
+         <!--<xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupRead"
+                     id="a3A__DEVICES___d5e78897-1">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:name="A_CLASSIFIED"
+                                                   system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupRead/uid"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>-->
+         <!--<xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupWrite"
+                     id="a3A__DEVICES___d5e78902-1">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:name="A_ADM_COMPANY"
+                                                   system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupWrite/uid"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>-->
+         <xs:element name="ID" type="xs:integer" id="a3A__DEVICES___d5e78907-1_ID"/>
+         <xs:element name="PARENT_ID"
+                     type="xs:integer"
+                     id="a3A__DEVICES___d5e78908-1_PARENT_ID"
+                     minOccurs="0"/>
+         <xs:element ref="default_db__x3A__DEVICES:DEVICES" minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:name="PARENT_ID"
+                                                   system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:xpath="default_db__x3A__DEVICES:DEVICES/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
+         <xs:element name="A_RECORD_CREATE_DATE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78909-1_A_RECORD_C"/>
+         <xs:element name="A_RECORD_CREATE_AUTHOR"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78910-1_A_RECORD_C"/>
+         <xs:element name="A_RECORD_UPDATE_DATE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78911-1_A_RECORD_U"/>
+         <xs:element name="A_RECORD_UPDATE_AUTHOR"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78912-1_A_RECORD_U"/>
+         <xs:element name="A_PROBLEM"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78913-1_A_PROBLEM"/>
+         <xs:element name="A_PROBLEM_DESC"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78914-1_A_PROBLEM_"/>
+         <xs:element name="A_PROBLEM_DATE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78916-1_A_PROBLEM_"/>
+         <xs:element name="A_STATUS"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78917-1_A_STATUS"/>
+         <xs:element name="A_STATUS_EV"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78918-1_A_STATUS_E"/>
+         <xs:element name="A_STATUS_INFO"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78919-1_A_STATUS_I"/>
+         <xs:element name="A_STATUS_LASTCHANGE_DATE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78920-1_A_STATUS_L"/>
+         <xs:element name="IN7_DZIENNIK_KORESP_ID"
+                     type="xs:integer"
+                     id="a3A__DEVICES___d5e78921-1_IN7_DZIENN"/>
+         <xs:element name="IN7_DZIENNIK_KORESP_ID_ZAMOWIENIE"
+                     type="xs:integer"
+                     id="a3A__DEVICES___d5e78922-1_IN7_DZIENN"/>
+         <xs:element name="A_UPDATE_DATE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78923-1_A_UPDATE_D"/>
+         <xs:element name="A_ADM_COMPANY"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78924-1_A_ADM_COMP"/>
+         <xs:element name="S_ADDRESS_CITY"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78925-1_S_ADDRESS_"/>
+         <xs:element name="S_ADDRESS_POST_CODE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78926-1_S_ADDRESS_"/>
+         <xs:element name="S_ADDRESS_POST_OFFICE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78928-1_S_ADDRESS_"/>
+         <xs:element name="S_ADDRESS_STREET"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78929-1_S_ADDRESS_"/>
+         <xs:element name="S_ADDRESS_HOUSE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78930-1_S_ADDRESS_"/>
+         <xs:element name="S_OTHER_INFO"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78931-1_S_OTHER_IN"/>
+         <xs:element name="S_IP" type="xs:string" id="a3A__DEVICES___d5e78932-1_S_IP"/>
+         <xs:element name="T_NETWORK_SERVER"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78933-1_T_NETWORK_"/>
+         <xs:element name="T_TOPOLOGY_PLACE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78934-1_T_TOPOLOGY"/>
+         <xs:element name="T_DEVICE_SERIAL"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78935-1_T_DEVICE_S"/>
+         <xs:element name="T_DEVICE_TYPE"
+                     type="default_db__x3A__DEVICES:T_DEVICE_TYPE"
+                     id="a3A__DEVICES___d5e78936-1_T_DEVICE_T"/>
+         <xs:element name="T_DEVICE_PORTS_OK"
+                     type="xs:integer"
+                     id="a3A__DEVICES___d5e78937-1_T_DEVICE_P"/>
+         <xs:element name="T_DEVICE_INFO"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78938-1_T_DEVICE_I"/>
+         <xs:element name="T_DEVICE_POWER"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78940-1_T_DEVICE_P"/>
+         <xs:element name="T_TELBOX_NEIGHBOUR_IN"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78941-1_T_TELBOX_N"/>
+         <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
+                     type="xs:integer"
+                     id="a3A__DEVICES___d5e78942-1_T_TELBOX_N"/>
+         <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="T_TELBOX_NEIGHBOUR_IN_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #2225 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <xs:element name="the_geom"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78943-1_the_geom"/>
+         <xs:element name="T_WORKPOINTS"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78944-1_T_WORKPOIN"/>
+         <xs:element name="T_WORKPOINTS_VALUE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78945-1_T_WORKPOIN"/>
+         <xs:element name="T_WORKPOINTS_TYPE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78946-1_T_WORKPOIN"/>
+         <xs:element name="T_WORKPOINTS_USER"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78947-1_T_WORKPOIN"/>
+         <xs:element name="T_WORKPOINTS_DATE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78948-1_T_WORKPOIN"/>
+         <xs:element name="T_PENALTIES"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78949-1_T_PENALTIE"/>
+         <xs:element name="T_PENALTIES_TYPE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78950-1_T_PENALTIE"/>
+         <xs:element name="T_PENALTIES_VALUE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78952-1_T_PENALTIE"/>
+         <xs:element name="T_WHO_CONNECTED"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78953-1_T_WHO_CONN"/>
+         <xs:element name="T_WHEN_CONNECTED"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78954-1_T_WHEN_CON"/>
+         <xs:element name="T_PRODUCER"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78955-1_T_PRODUCER"/>
+         <xs:element name="T_PRODUCTION_DATE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78956-1_T_PRODUCTI"/>
+         <xs:element name="T_BUY_DATE"
+                     type="xs:token"
+                     id="a3A__DEVICES___d5e78957-1_T_BUY_DATE"/>
+         <xs:element name="T_SELLER"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78958-1_T_SELLER"/>
+         <xs:element name="T_OWNER"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78959-1_T_OWNER"/>
+         <xs:element name="T_GUARRANTY_EXPIRE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78960-1_T_GUARRANT"/>
+         <xs:element name="T_PAPERBOX_LOCATION"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78961-1_T_PAPERBOX"/>
+         <xs:element name="F_BILL_DATE"
+                     type="xs:token"
+                     id="a3A__DEVICES___d5e78962-1_F_BILL_DAT"/>
+         <xs:element name="F_BILL_NUMBER"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78964-1_F_BILL_NUM"/>
+         <xs:element name="F_BILL_POSITION"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78965-1_F_BILL_POS"/>
+         <xs:element name="F_BILL_COST"
+                     type="xs:double"
+                     id="a3A__DEVICES___d5e78966-1_F_BILL_COS"/>
+         <xs:element name="F_MONTHLY_LEASE_COST"
+                     type="xs:double"
+                     id="a3A__DEVICES___d5e78967-1_F_MONTHLY_"/>
+         <xs:element name="F_DEPTECIATION_LENGTH_YEARS"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78968-1_F_DEPTECIA"/>
+         <xs:element name="S_HW" type="xs:string" id="a3A__DEVICES___d5e78969-1_S_HW"/>
+         <xs:element name="CRM_LISTA_ZASOBOW_ID"
+                     type="xs:integer"
+                     id="a3A__DEVICES___d5e78970-1_CRM_LISTA_"/>
+         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #224
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <xs:element name="CRM_LISTA_ZASOBOW_xpath"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78971-1_CRM_LISTA_"/>
+         <xs:element name="ID_PROJECT"
+                     type="xs:integer"
+                     id="a3A__DEVICES___d5e78972-1_ID_PROJECT"/>
+         <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_PROJECT"
+                                                   system_cache__appinfo:xpath="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #204
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <xs:element name="L_APPOITMENT_DATE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78973-1_L_APPOITME"/>
+         <xs:element name="L_APPOITMENT_USER"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78974-1_L_APPOITME"/>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #166
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <xs:element name="L_APPOITMENT_PERIOD"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78976-1_L_APPOITME"/>
+         <xs:element name="L_APPOITMENT_INFO"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78977-1_L_APPOITME"/>
+         <xs:element name="L_APPOITMENT_TYPE"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78978-1_L_APPOITME"/>
+         <xs:element name="L_CALENDAR"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78979-1_L_CALENDAR"/>
+         <xs:element name="P_ACCOUNT"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78980-1_P_ACCOUNT"/>
+         <xs:element name="ID_BILLING_USERS"
+                     type="xs:integer"
+                     id="a3A__DEVICES___d5e78981-1_ID_BILLING"/>
+         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_USERS"
+                                                   system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <xs:element name="ID_SERVICES"
+                     type="xs:integer"
+                     id="a3A__DEVICES___d5e78982-1_ID_SERVICE"/>
+         <xs:element ref="default_db__x3A__SERVICES:SERVICES">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_SERVICES"
+                                                   system_cache__appinfo:xpath="default_db__x3A__SERVICES:SERVICES/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #183
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <xs:element name="A_CLASSIFIED"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78983-1_A_CLASSIFI"/>
+         <xs:element name="ADM_PASSWD"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78984-1_ADM_PASSWD"/>
+         <xs:element name="S_PASSWD"
+                     type="xs:string"
+                     id="a3A__DEVICES___d5e78985-1_S_PASSWD"/>
+         <xs:element name="ADMIN_USERS_ID"
+                     type="xs:integer"
+                     id="a3A__DEVICES___d5e78988-1_ADMIN_USER"/>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:ADMIN_USERS_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ADMIN_USERS_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:ADMIN_USERS_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #185
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:ADMIN_USERS"
+                     maxOccurs="1"
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:name="ADMIN_USERS_ID"
+                                                   system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:ADMIN_USERS/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
+      </xs:sequence>
+      <xs:attribute name="label" type="xs:string"/>
+      <xs:assert test="@label = concat(ID, ' ', T_DEVICE_TYPE)"/>
+   </xs:complexType>
+   <xs:element name="DEVICES"
+               type="default_db__x3A__DEVICES:DEVICES"
+               id="a3A__DEVICES___d5e78989-1_DEVICES"/>
+   <xs:complexType id="a3A__DEVICES___d5e8569-1_MASZYNA" name="MASZYNA">
+      <xs:complexContent id="a3A__DEVICES___d5e8570-1">
+         <xs:restriction base="default_db__x3A__DEVICES:DEVICES">
+            <xs:sequence id="a3A__DEVICES___d5e78994-1">
+               <!--<xs:element ref="SystemObjects__x3A__AccessOwner:AccessOwner"
+                  id="a3A__DEVICES___d5e78995-1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="L_APPOITMENT_USER" system_cache__appinfo:xpath="SystemObjects__x3A__AccessOwner:AccessOwner/login"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>-->
+               <!--<xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupRead"
+                  id="a3A__DEVICES___d5e79000-1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="A_CLASSIFIED" system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupRead/uid"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>-->
+               <!--<xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupWrite"
+                  id="a3A__DEVICES___d5e79005-1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="A_ADM_COMPANY" system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupWrite/uid"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>-->
+               <xs:element name="ID" type="xs:integer" id="a3A__DEVICES___d5e79010-1_ID"/>
+               <xs:element name="PARENT_ID"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79011-1_PARENT_ID"
+                           minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:DEVICES" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="PARENT_ID"
+                                                         system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:DEVICES/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="A_RECORD_CREATE_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79012-1_A_RECORD_C"/>
+               <xs:element name="A_RECORD_CREATE_AUTHOR"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79013-1_A_RECORD_C"/>
+               <xs:element name="A_RECORD_UPDATE_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79014-1_A_RECORD_U"/>
+               <xs:element name="A_RECORD_UPDATE_AUTHOR"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79015-1_A_RECORD_U"/>
+               <xs:element name="A_PROBLEM"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79016-1_A_PROBLEM"/>
+               <xs:element name="A_PROBLEM_DESC"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79017-1_A_PROBLEM_"/>
+               <xs:element name="A_PROBLEM_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79019-1_A_PROBLEM_"/>
+               <xs:element name="A_STATUS"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79020-1_A_STATUS"/>
+               <xs:element name="A_STATUS_EV"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79021-1_A_STATUS_E"/>
+               <xs:element name="A_STATUS_INFO"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79022-1_A_STATUS_I"/>
+               <xs:element name="A_STATUS_LASTCHANGE_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79023-1_A_STATUS_L"/>
+               <xs:element name="IN7_DZIENNIK_KORESP_ID"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79024-1_IN7_DZIENN"/>
+               <xs:element name="IN7_DZIENNIK_KORESP_ID_ZAMOWIENIE"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79025-1_IN7_DZIENN"/>
+               <xs:element name="A_UPDATE_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79026-1_A_UPDATE_D"/>
+               <xs:element name="A_ADM_COMPANY"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79027-1_A_ADM_COMP"/>
+               <xs:element name="S_ADDRESS_CITY"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79028-1_S_ADDRESS_"/>
+               <xs:element name="S_ADDRESS_POST_CODE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79029-1_S_ADDRESS_"/>
+               <xs:element name="S_ADDRESS_POST_OFFICE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79031-1_S_ADDRESS_"/>
+               <xs:element name="S_ADDRESS_STREET"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79032-1_S_ADDRESS_"/>
+               <xs:element name="S_ADDRESS_HOUSE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79033-1_S_ADDRESS_"/>
+               <xs:element name="S_OTHER_INFO"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79034-1_S_OTHER_IN"/>
+               <xs:element name="S_IP" type="xs:string" id="a3A__DEVICES___d5e79035-1_S_IP"/>
+               <xs:element name="T_NETWORK_SERVER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79036-1_T_NETWORK_"/>
+               <xs:element name="T_TOPOLOGY_PLACE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79037-1_T_TOPOLOGY"/>
+               <xs:element name="T_DEVICE_SERIAL"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79038-1_T_DEVICE_S"/>
+               <xs:element name="T_DEVICE_TYPE"
+                           type="default_db__x3A__DEVICES:T_DEVICE_TYPE_maszyna"
+                           id="a3A__DEVICES___d5e79039-1_T_DEVICE_T"/>
+               <xs:element name="T_DEVICE_PORTS_OK"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79040-1_T_DEVICE_P"/>
+               <xs:element name="T_DEVICE_INFO"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79041-1_T_DEVICE_I"/>
+               <xs:element name="T_DEVICE_POWER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79043-1_T_DEVICE_P"/>
+               <xs:element name="T_TELBOX_NEIGHBOUR_IN"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79044-1_T_TELBOX_N"/>
+               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79045-1_T_TELBOX_N"/>
+               <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="T_TELBOX_NEIGHBOUR_IN_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #2225 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="the_geom"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79046-1_the_geom"/>
+               <xs:element name="T_WORKPOINTS"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79047-1_T_WORKPOIN"/>
+               <xs:element name="T_WORKPOINTS_VALUE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79048-1_T_WORKPOIN"/>
+               <xs:element name="T_WORKPOINTS_TYPE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79049-1_T_WORKPOIN"/>
+               <xs:element name="T_WORKPOINTS_USER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79050-1_T_WORKPOIN"/>
+               <xs:element name="T_WORKPOINTS_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79051-1_T_WORKPOIN"/>
+               <xs:element name="T_PENALTIES"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79052-1_T_PENALTIE"/>
+               <xs:element name="T_PENALTIES_TYPE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79053-1_T_PENALTIE"/>
+               <xs:element name="T_PENALTIES_VALUE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79055-1_T_PENALTIE"/>
+               <xs:element name="T_WHO_CONNECTED"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79056-1_T_WHO_CONN"/>
+               <xs:element name="T_WHEN_CONNECTED"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79057-1_T_WHEN_CON"/>
+               <xs:element name="T_PRODUCER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79058-1_T_PRODUCER"/>
+               <xs:element name="T_PRODUCTION_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79059-1_T_PRODUCTI"/>
+               <xs:element name="T_BUY_DATE"
+                           type="xs:token"
+                           id="a3A__DEVICES___d5e79060-1_T_BUY_DATE"/>
+               <xs:element name="T_SELLER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79061-1_T_SELLER"/>
+               <xs:element name="T_OWNER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79062-1_T_OWNER"/>
+               <xs:element name="T_GUARRANTY_EXPIRE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79063-1_T_GUARRANT"/>
+               <xs:element name="T_PAPERBOX_LOCATION"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79064-1_T_PAPERBOX"/>
+               <xs:element name="F_BILL_DATE"
+                           type="xs:token"
+                           id="a3A__DEVICES___d5e79065-1_F_BILL_DAT"/>
+               <xs:element name="F_BILL_NUMBER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79067-1_F_BILL_NUM"/>
+               <xs:element name="F_BILL_POSITION"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79068-1_F_BILL_POS"/>
+               <xs:element name="F_BILL_COST"
+                           type="xs:double"
+                           id="a3A__DEVICES___d5e79069-1_F_BILL_COS"/>
+               <xs:element name="F_MONTHLY_LEASE_COST"
+                           type="xs:double"
+                           id="a3A__DEVICES___d5e79070-1_F_MONTHLY_"/>
+               <xs:element name="F_DEPTECIATION_LENGTH_YEARS"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79071-1_F_DEPTECIA"/>
+               <xs:element name="S_HW" type="xs:string" id="a3A__DEVICES___d5e79072-1_S_HW"/>
+               <xs:element name="CRM_LISTA_ZASOBOW_ID"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79073-1_CRM_LISTA_"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #224
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="CRM_LISTA_ZASOBOW_xpath"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79074-1_CRM_LISTA_"/>
+               <xs:element name="ID_PROJECT"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79075-1_ID_PROJECT"/>
+               <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_PROJECT"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #204
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="L_APPOITMENT_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79076-1_L_APPOITME"/>
+               <xs:element name="L_APPOITMENT_USER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79077-1_L_APPOITME"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #166
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="L_APPOITMENT_PERIOD"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79079-1_L_APPOITME"/>
+               <xs:element name="L_APPOITMENT_INFO"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79080-1_L_APPOITME"/>
+               <xs:element name="L_APPOITMENT_TYPE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79081-1_L_APPOITME"/>
+               <xs:element name="L_CALENDAR"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79082-1_L_CALENDAR"/>
+               <xs:element name="P_ACCOUNT"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79083-1_P_ACCOUNT"/>
+               <xs:element name="ID_BILLING_USERS"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79084-1_ID_BILLING"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="ID_SERVICES"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79085-1_ID_SERVICE"/>
+               <xs:element ref="default_db__x3A__SERVICES:SERVICES">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_SERVICES"
+                                                         system_cache__appinfo:xpath="default_db__x3A__SERVICES:SERVICES/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #183
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="A_CLASSIFIED"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79086-1_A_CLASSIFI"/>
+               <xs:element name="ADM_PASSWD"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79087-1_ADM_PASSWD"/>
+               <xs:element name="S_PASSWD"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79088-1_S_PASSWD"/>
+               <xs:element name="ADMIN_USERS_ID"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79091-1_ADMIN_USER"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:ADMIN_USERS_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ADMIN_USERS_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:ADMIN_USERS_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #185
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:ADMIN_USERS"
+                           maxOccurs="1"
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="ADMIN_USERS_ID"
+                                                         system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:ADMIN_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
+            </xs:sequence>
+            <xs:attribute name="label" type="xs:string"/>
+            <xs:assert test="@label = concat(ID, ' ', T_DEVICE_TYPE)"/>
+         </xs:restriction>
+      </xs:complexContent>
+   </xs:complexType>
+   <xs:element id="a3A__DEVICES___d5e8586-1_FORMA"
+               name="FORMA"
+               type="default_db__x3A__DEVICES:FORMA"/>
+   <xs:complexType id="a3A__DEVICES___d5e8578-1_FORMA" name="FORMA">
+      <xs:complexContent id="a3A__DEVICES___d5e8579-1">
+         <xs:restriction base="default_db__x3A__DEVICES:DEVICES">
+            <xs:sequence id="a3A__DEVICES___d5e79096-1">
+               <!--<xs:element ref="SystemObjects__x3A__AccessOwner:AccessOwner"
+                  id="a3A__DEVICES___d5e79097-1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="L_APPOITMENT_USER" system_cache__appinfo:xpath="SystemObjects__x3A__AccessOwner:AccessOwner/login"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>-->
+               <!--<xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupRead"
+                  id="a3A__DEVICES___d5e79102-1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="A_CLASSIFIED" system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupRead/uid"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>-->
+               <!--<xs:element ref="SystemObjects__x3A__AccessGroup:AccessGroupWrite"
+                  id="a3A__DEVICES___d5e79107-1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="A_ADM_COMPANY" system_cache__appinfo:xpath="SystemObjects__x3A__AccessGroup:AccessGroupWrite/uid"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>-->
+               <xs:element name="ID" type="xs:integer" id="a3A__DEVICES___d5e79112-1_ID"/>
+               <xs:element name="PARENT_ID"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79113-1_PARENT_ID"/>
+               <xs:element ref="default_db__x3A__DEVICES:DEVICES" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="PARENT_ID"
+                                                         system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:DEVICES/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="A_RECORD_CREATE_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79114-1_A_RECORD_C"/>
+               <xs:element name="A_RECORD_CREATE_AUTHOR"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79115-1_A_RECORD_C"/>
+               <xs:element name="A_RECORD_UPDATE_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79116-1_A_RECORD_U"/>
+               <xs:element name="A_RECORD_UPDATE_AUTHOR"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79117-1_A_RECORD_U"/>
+               <xs:element name="A_PROBLEM"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79118-1_A_PROBLEM"/>
+               <xs:element name="A_PROBLEM_DESC"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79119-1_A_PROBLEM_"/>
+               <xs:element name="A_PROBLEM_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79121-1_A_PROBLEM_"/>
+               <xs:element name="A_STATUS"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79122-1_A_STATUS"/>
+               <xs:element name="A_STATUS_EV"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79123-1_A_STATUS_E"/>
+               <xs:element name="A_STATUS_INFO"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79124-1_A_STATUS_I"/>
+               <xs:element name="A_STATUS_LASTCHANGE_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79125-1_A_STATUS_L"/>
+               <xs:element name="IN7_DZIENNIK_KORESP_ID"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79126-1_IN7_DZIENN"/>
+               <xs:element name="IN7_DZIENNIK_KORESP_ID_ZAMOWIENIE"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79127-1_IN7_DZIENN"/>
+               <xs:element name="A_UPDATE_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79128-1_A_UPDATE_D"/>
+               <xs:element name="A_ADM_COMPANY"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79129-1_A_ADM_COMP"/>
+               <xs:element name="S_ADDRESS_CITY"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79130-1_S_ADDRESS_"/>
+               <xs:element name="S_ADDRESS_POST_CODE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79131-1_S_ADDRESS_"/>
+               <xs:element name="S_ADDRESS_POST_OFFICE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79133-1_S_ADDRESS_"/>
+               <xs:element name="S_ADDRESS_STREET"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79134-1_S_ADDRESS_"/>
+               <xs:element name="S_ADDRESS_HOUSE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79135-1_S_ADDRESS_"/>
+               <xs:element name="S_OTHER_INFO"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79136-1_S_OTHER_IN"/>
+               <xs:element name="S_IP" type="xs:string" id="a3A__DEVICES___d5e79137-1_S_IP"/>
+               <xs:element name="T_NETWORK_SERVER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79138-1_T_NETWORK_"/>
+               <xs:element name="T_TOPOLOGY_PLACE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79139-1_T_TOPOLOGY"/>
+               <xs:element name="T_DEVICE_SERIAL"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79140-1_T_DEVICE_S"/>
+               <xs:element name="T_DEVICE_TYPE"
+                           type="default_db__x3A__DEVICES:T_DEVICE_TYPE_forma"
+                           id="a3A__DEVICES___d5e79141-1_T_DEVICE_T"/>
+               <xs:element name="T_DEVICE_PORTS_OK"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79142-1_T_DEVICE_P"/>
+               <xs:element name="T_DEVICE_INFO"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79143-1_T_DEVICE_I"/>
+               <xs:element name="T_DEVICE_POWER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79145-1_T_DEVICE_P"/>
+               <xs:element name="T_TELBOX_NEIGHBOUR_IN"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79146-1_T_TELBOX_N"/>
+               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79147-1_T_TELBOX_N"/>
+               <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="T_TELBOX_NEIGHBOUR_IN_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #2225 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="the_geom"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79148-1_the_geom"/>
+               <xs:element name="T_WORKPOINTS"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79149-1_T_WORKPOIN"/>
+               <xs:element name="T_WORKPOINTS_VALUE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79150-1_T_WORKPOIN"/>
+               <xs:element name="T_WORKPOINTS_TYPE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79151-1_T_WORKPOIN"/>
+               <xs:element name="T_WORKPOINTS_USER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79152-1_T_WORKPOIN"/>
+               <xs:element name="T_WORKPOINTS_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79153-1_T_WORKPOIN"/>
+               <xs:element name="T_PENALTIES"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79154-1_T_PENALTIE"/>
+               <xs:element name="T_PENALTIES_TYPE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79155-1_T_PENALTIE"/>
+               <xs:element name="T_PENALTIES_VALUE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79157-1_T_PENALTIE"/>
+               <xs:element name="T_WHO_CONNECTED"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79158-1_T_WHO_CONN"/>
+               <xs:element name="T_WHEN_CONNECTED"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79159-1_T_WHEN_CON"/>
+               <xs:element name="T_PRODUCER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79160-1_T_PRODUCER"/>
+               <xs:element name="T_PRODUCTION_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79161-1_T_PRODUCTI"/>
+               <xs:element name="T_BUY_DATE"
+                           type="xs:token"
+                           id="a3A__DEVICES___d5e79162-1_T_BUY_DATE"/>
+               <xs:element name="T_SELLER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79163-1_T_SELLER"/>
+               <xs:element name="T_OWNER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79164-1_T_OWNER"/>
+               <xs:element name="T_GUARRANTY_EXPIRE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79165-1_T_GUARRANT"/>
+               <xs:element name="T_PAPERBOX_LOCATION"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79166-1_T_PAPERBOX"/>
+               <xs:element name="F_BILL_DATE"
+                           type="xs:token"
+                           id="a3A__DEVICES___d5e79167-1_F_BILL_DAT"/>
+               <xs:element name="F_BILL_NUMBER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79169-1_F_BILL_NUM"/>
+               <xs:element name="F_BILL_POSITION"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79170-1_F_BILL_POS"/>
+               <xs:element name="F_BILL_COST"
+                           type="xs:double"
+                           id="a3A__DEVICES___d5e79171-1_F_BILL_COS"/>
+               <xs:element name="F_MONTHLY_LEASE_COST"
+                           type="xs:double"
+                           id="a3A__DEVICES___d5e79172-1_F_MONTHLY_"/>
+               <xs:element name="F_DEPTECIATION_LENGTH_YEARS"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79173-1_F_DEPTECIA"/>
+               <xs:element name="S_HW" type="xs:string" id="a3A__DEVICES___d5e79174-1_S_HW"/>
+               <xs:element name="CRM_LISTA_ZASOBOW_ID"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79175-1_CRM_LISTA_"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #224
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="CRM_LISTA_ZASOBOW_xpath"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79176-1_CRM_LISTA_"/>
+               <xs:element name="ID_PROJECT"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79177-1_ID_PROJECT"/>
+               <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_PROJECT"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #204
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="L_APPOITMENT_DATE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79178-1_L_APPOITME"/>
+               <xs:element name="L_APPOITMENT_USER"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79179-1_L_APPOITME"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #166
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="L_APPOITMENT_PERIOD"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79181-1_L_APPOITME"/>
+               <xs:element name="L_APPOITMENT_INFO"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79182-1_L_APPOITME"/>
+               <xs:element name="L_APPOITMENT_TYPE"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79183-1_L_APPOITME"/>
+               <xs:element name="L_CALENDAR"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79184-1_L_CALENDAR"/>
+               <xs:element name="P_ACCOUNT"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79185-1_P_ACCOUNT"/>
+               <xs:element name="ID_BILLING_USERS"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79186-1_ID_BILLING"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="ID_SERVICES"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79187-1_ID_SERVICE"/>
+               <xs:element ref="default_db__x3A__SERVICES:SERVICES">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_SERVICES"
+                                                         system_cache__appinfo:xpath="default_db__x3A__SERVICES:SERVICES/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #183
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element name="A_CLASSIFIED"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79188-1_A_CLASSIFI"/>
+               <xs:element name="ADM_PASSWD"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79189-1_ADM_PASSWD"/>
+               <xs:element name="S_PASSWD"
+                           type="xs:string"
+                           id="a3A__DEVICES___d5e79190-1_S_PASSWD"/>
+               <xs:element name="ADMIN_USERS_ID"
+                           type="xs:integer"
+                           id="a3A__DEVICES___d5e79193-1_ADMIN_USER"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:ADMIN_USERS_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ADMIN_USERS_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:ADMIN_USERS_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #185
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:ADMIN_USERS"
+                           maxOccurs="1"
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:name="ADMIN_USERS_ID"
+                                                         system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:ADMIN_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
+            </xs:sequence>
+            <xs:attribute name="label" type="xs:string"/>
+            <xs:assert test="@label = concat(ID, ' ', T_DEVICE_TYPE)"/>
+         </xs:restriction>
+      </xs:complexContent>
+   </xs:complexType>
+   <xs:element id="a3A__DEVICES___d5e8577-1_MASZYNA"
+               name="MASZYNA"
+               type="default_db__x3A__DEVICES:MASZYNA"/>
+   <xs:element name="ID_DEVICE" type="default_db__x3A__DEVICES:DEVICES">
+      <xs:annotation>
+         <xs:documentation>Uzyte glownie w Korespondencji</xs:documentation>
+      </xs:annotation>
+   </xs:element>
+   <xs:element name="PARENT_ID_DEVICE" type="default_db__x3A__DEVICES:DEVICES">
+      <xs:annotation>
+         <xs:documentation>Uzyte w telboxach do tworzenia struktury</xs:documentation>
+      </xs:annotation>
+   </xs:element>
+</xs:schema>

+ 2 - 0
SE/schema/ant-object/default_db.DEVICES/PARENT_ID_DEVICE/build.xml

@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<empty/>

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott