<?xml version="1.0" encoding="UTF-8"?>
<component id="contribuyente_empresas_srch">
    <type>SEARCH</type>
    <title>Empresas Relacionados al Contribuyente..............................................................................................................</title>
    <rows>130</rows>
    <width>1000</width>
    <height>600</height>
    <pbin>NO</pbin>
    <base_path>..</base_path>
    <master>
        
        <table>sdm_contribuyentes</table>
        <id_field>i8_contribuyente_id</id_field>        
        <select_fields>i8_contribuyente_id,v128_contribuyente,c14_nit_id,c11_dui_id,c14_iva_id,c16_pasaporte_id</select_fields>
        <needed_fields></needed_fields>
        <order_by>1</order_by>
        <direction>asc</direction>
        <limit>25</limit>
        <offset>0</offset>        
        <associations>contribuyente,telefono,fax,email</associations>
        <association id="contribuyente" type="soft">
         
            <header>Direcciones del Contribuyente</header>
            <table>sdd_contribuyente_direcciones</table>
            <keys>i8_contribuyente_id</keys>
            <insert_fields></insert_fields>
            <delete_fields></delete_fields>
            <filters>
                <fields>i2_tipo_direccion_id</fields>
                <values>1</values>
            </filters>
            <fields>txt_direccion</fields>
            <document_fields>txt_direccion</document_fields>
        </association>
        <association id="telefono" type="soft">
         
            <header>Telefonos del Contribuyente</header>
            <table>sdd_contribuyente_telefonos</table>
            <keys>i8_contribuyente_id</keys>
            <insert_fields></insert_fields>
            <delete_fields></delete_fields>
            <filters>
                <fields>i2_tipo_telefono_id</fields>
                <values>1</values>
            </filters>
            <fields>v16_telefono</fields>
            <document_fields>v16_telefono</document_fields>
        </association>
        <association id="fax" type="soft">
         
            <header>Faxes del Contribuyente</header>
            <table>sdd_contribuyente_faxes</table>
            <keys>i8_contribuyente_id</keys>
            <insert_fields></insert_fields>
            <delete_fields></delete_fields>
            <filters>
                <fields>i2_tipo_fax_id</fields>
                <values>1</values>
            </filters>
            <fields>v16_fax</fields>
            <document_fields>v16_fax</document_fields>
        </association>
        <association id="email" type="soft">
         
            <header>Faxes del Contribuyente</header>
            <table>sdd_contribuyente_emails</table>
            <keys>i8_contribuyente_id</keys>
            <insert_fields></insert_fields>
            <delete_fields></delete_fields>
            <filters>
                <fields>i2_tipo_email_id</fields>
                <values>1</values>
            </filters>
            <fields>txt_email</fields>
            <document_fields>txt_email</document_fields>
        </association>
        <association id="null"></association>
    </master>
    <detail>
        
        <header>Empresas del Contribuyente</header>
        <table>sdd_empresa_contribuyentes</table>
        <id_field>i8_contribuyente_id</id_field>        
        <select_fields>i8_empresa_id</select_fields>
        <passback_fields>i8_empresa_id,txt_ubicacion,txt_propietarios</passback_fields>        
        <order_by>1</order_by>
        <direction>asc</direction>
        <limit>25</limit>
        <offset>0</offset>
        <associations>empresa,propietarios</associations>
        <association id="empresa" type="hard" result="table">
         
            <header>Contribuyentes</header>
            <table>sdd_empresa_ubicacion</table>
            <keys>i8_empresa_id</keys>
            <fields>i8_empresa_id,c11_sector_id,i2_tipo_sector_id,c2_poligono_id,c2_block_id,c2_zona_id,c2_barrio_id,c4_calle_id,c4_avenida_id,c2_pasaje_id,c2_senda_id,c4_casa,txt_referencia</fields>
            <document_fields>i8_empresa_id,c11_sector_id,i2_tipo_sector_id,c2_poligono_id,c2_block_id,c2_zona_id,c2_barrio_id,c4_calle_id,c4_avenida_id,c2_pasaje_id,c2_senda_id,c4_casa,txt_referencia</document_fields>
            <select_labels id="i8_empresa_id">
                
                <table>sdm_empresas</table>
                <id_field>i8_empresa_id</id_field>
                <fields>c16_estado</fields>
                <document_fields>c16_estado</document_fields>
            </select_labels>
            <select_labels id="c11_sector_id">
                
                <table>sdm_sectores</table>
                <id_field>c11_sector_id</id_field>
                <fields>v64_sector</fields>
                <document_fields>v64_sector</document_fields>
            </select_labels>
            <select_labels id="i2_tipo_sector_id">
                
                <table>sdm_tipo_sectores</table>
                <id_field>i2_tipo_sector_id</id_field>
                <fields>v64_tipo_sector</fields>
                <document_fields>v64_tipo_sector</document_fields>
            </select_labels>
            <select_labels id="c2_poligono_id">
                
                <table>sdd_sector_poligonos</table>
                <id_field>c11_sector_id,c2_poligono_id</id_field>
                <fields>v64_poligono</fields>
                <document_fields>v64_poligono</document_fields>
                <filter>
                    
                    <table>sdd_empresa_ubicacion</table>
                    <keys>i8_empresa_id</keys>
                    <field>c11_sector_id</field>
                </filter>
            </select_labels>
            <select_labels id="c2_block_id">
                
                <table>sdd_sector_blocks</table>
                <id_field>c11_sector_id,c2_block_id</id_field>
                <fields>v64_block</fields>
                <document_fields>v64_block</document_fields>
                <filter>
                    
                    <table>sdd_empresa_ubicacion</table>
                    <keys>i8_empresa_id</keys>
                    <field>c11_sector_id</field>
                </filter>
            </select_labels>
            <select_labels id="c2_zona_id">
                
                <table>sdd_sector_zonas</table>
                <id_field>c11_sector_id,c2_zona_id</id_field>
                <fields>v64_zona</fields>
                <document_fields>v64_zona</document_fields>
                <filter>
                    
                    <table>sdd_empresa_ubicacion</table>
                    <keys>i8_empresa_id</keys>
                    <field>c11_sector_id</field>
                </filter>
            </select_labels>
            <select_labels id="c2_barrio_id">
                
                <table>sdd_sector_barrios</table>
                <id_field>c11_sector_id,c2_barrio_id</id_field>
                <fields>v64_barrio</fields>
                <document_fields>v64_barrio</document_fields>
                <filter>
                    
                    <table>sdd_empresa_ubicacion</table>
                    <keys>i8_empresa_id</keys>
                    <field>c11_sector_id</field>
                </filter>
            </select_labels>
            <select_labels id="c4_avenida_id">
                
                <table>sdd_sector_avenidas</table>
                <id_field>c11_sector_id,c4_avenida_id</id_field>
                <fields>v64_avenida</fields>
                <document_fields>v64_avenida</document_fields>
                <filter>
                    
                    <table>sdd_empresa_ubicacion</table>
                    <keys>i8_empresa_id</keys>
                    <field>c11_sector_id</field>
                </filter>
            </select_labels>
            <select_labels id="c4_calle_id">
                
                <table>sdd_sector_calles</table>
                <id_field>c4_calle_id</id_field>
                <fields>v64_calle</fields>
                <document_fields>v64_calle</document_fields>
                <filter>
                    
                    <table>sdd_empresa_ubicacion</table>
                    <keys>i8_empresa_id</keys>
                    <field>c11_sector_id</field>
                </filter>
            </select_labels>
            <select_labels id="c2_pasaje_id">
                
                <table>sdd_sector_pasajes</table>
                <id_field>c11_sector_id,c2_pasaje_id</id_field>
                <fields>v64_pasaje</fields>
                <document_fields>v64_pasaje</document_fields>
                <filter>
                    
                    <table>sdd_empresa_ubicacion</table>
                    <keys>i8_empresa_id</keys>
                    <field>c11_sector_id</field>
                </filter>
            </select_labels>
            <select_labels id="c2_senda_id">
                
                <table>sdd_sector_sendas</table>
                <id_field>c11_sector_id,c2_senda_id</id_field>
                <fields>v64_senda</fields>
                <document_fields>v64_senda</document_fields>
                <filter>
                    
                    <table>sdd_empresa_ubicacion</table>
                    <keys>i8_empresa_id</keys>
                    <field>c11_sector_id</field>
                </filter>
            </select_labels>
            <select_labels id="null"></select_labels>
            <table_schema>
                <![CDATA[
                    <TABLE width="98%" cellspacing=1 cellpadding=1 border="0" bordercolor="#000000" style="border-width:0.5">
                        <TR> 
                            <TD  valign="top" width="65%">
                                <TABLE width="100%" border="0" cellspacing="1" cellpadding="0">
                                    <TR>
                                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#666666">Clave</font></TD>            
                                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{c8_base_empresa}</font></TD>
                                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#666666">Estado</font></TD>            
                                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{c16_estado}</font></TD>            
                                    </TR>
                                    <TR> 
                                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#666666">Tipo Sector</font></TD>
                                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{v64_tipo_sector}</font></TD>
                                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#666666">Barrio</font></TD>
                                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{v64_barrio}</font></TD>
                                    </TR>
                                    <TR> 
                                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#666666">Sector</font></TD>
                                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{v64_sector}</font></TD>
                                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#666666">Casa #</font></TD>
                                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{c4_casa}</font></TD>
                                    </TR>
                                    <TR> 
                                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#666666">Calle</font></TD>
                                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{v64_calle}</font></TD>
                                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#666666">Poligono</font></TD>
                                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{v64_poligono}</font></TD>
                                    </TR>
                                    <TR> 
                                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#666666">Avenida</font></TD>
                                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{v64_avenida}</font></TD>
                                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#666666">Senda</font></TD>
                                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{v64_senda}</font></TD>
                                    </TR>
                                    <TR>
                                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#666666">Pasaje</font></TD>
                                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{v64_pasaje}</font></TD>
                                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#666666">Block</font></TD>
                                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{v64_block}</font></TD>
                                    </TR>
                                    <TR>
                                        <TD colspan="4"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#666666">Referencia</font></TD>
                                    </TR>
                                    <TR>
                                        <TD colspan="4" valign="top"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{txt_referencia}</font></TD>
                                    </TR>
                                </TABLE>
                            </TD>
                        </TR>
                </TABLE>
            ]]>
        </table_schema>
        </association>
        <association id="propietarios"  type="hard" result="recordset">
            
            <header>empresas del Contribuyente</header>
            <table>sdd_empresa_contribuyentes</table>
            <keys>i8_empresa_id</keys>
            <fields>i8_contribuyente_id,i2_tipo_contribuyente_id</fields>
            <document_fields>i8_contribuyente_id,i2_tipo_contribuyente_id</document_fields>
            <select_labels id="i2_tipo_contribuyente_id">
                
                <table>sdm_tipo_contribuyentes</table>
                <id_field>i2_tipo_contribuyentes</id_field>
                <fields>v64_tipo_contribuyente</fields>
                <document_fields>v64_tipo_contribuyente</document_fields>
            </select_labels>
            <select_labels id="i8_contribuyente_id">
                
                <table>sdm_contribuyentes</table>
                <id_field>i8_contribuyente_id</id_field>
                <fields>v128_contribuyente</fields>
                <document_fields>v128_contribuyente</document_fields>
            </select_labels>
            <select_labels id="null"></select_labels>
            <table_schema>
                <![CDATA[
                    <TABLE width="98%" cellspacing=1 cellpadding=1 border="0" bordercolor="#000000" style="border-width:0.5">
                        <TR> 
                            <TD  valign="top">
                                <TABLE width="100%" border="0" cellspacing="1" cellpadding="0">
                                    {recordset}
                                </TABLE>
                            </TD>
                        </TR>
                </TABLE>
                ]]>
            </table_schema>            
            <recordset_schema>
                <![CDATA[
                    <TR> 
                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{v128_contribuyente}</font></TD>
                        <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{v64_tipo_contribuyente}</font></TD>
                    </TR>
                ]]>                
            </recordset_schema>
        </association>        
        <association id="null"></association>
        <grid>
            <columns>i8_empresa_id,empresa,propietarios</columns>            
            <column id="i8_empresa_id">
                <properties>
                    <type>text</type>
                    <data>text</data>                
                    <header>EMPRESA</header>
                    <width>8</width>
                </properties>        
                <events>
                    <onMouseOver>Hilite()</onMouseOver>
                    <onMouseOut>Restore()</onMouseOut>
                </events>
                <elements>NO</elements>
            </column>
            <column id="empresa">
                <properties>
                    <type>table</type>
                    <data></data>                
                    <header>UBICACION</header>
                    <width>8</width>
                </properties>        
                <events>
                    <onMouseOver>Hilite()</onMouseOver>
                    <onMouseOut>Restore()</onMouseOut>
                </events>
                <elements>NO</elements>
            </column>
            <column id="propietarios">
                <properties>
                    <type>table</type>
                    <data></data>                
                    <header>PROPIETARIOS</header>
                    <width>8</width>
                </properties>        
                <events>
                    <onMouseOver>Hilite()</onMouseOver>
                    <onMouseOut>Restore()</onMouseOut>
                </events>
                <elements>NO</elements>
            </column>
            <column id="counter">
                <properties>
                    <type>link</type>
                    <data>text</data>
                    <header>No.</header>
                    <width>4</width>
                </properties>        
                <events>
                    <onMouseOver>Hilite()</onMouseOver>
                    <onMouseOut>Restore()</onMouseOut>
                </events>
                <elements>NO</elements>
            </column>>
            <counter>ON</counter>
            <delete>NO</delete>
            <tdheader_style>font-family:Arial,Helvetica,sans-serif;font-size:10px;font-style:normal;color:#000000;font-weight:normal;font-variant:normal;text-transform:none;background-color:#A4B5C5;text-align:center</tdheader_style>
            <tdbody_style>font-family:Arial,Helvetica,sans-serif;font-size:10px;font-style:normal;color:#000000;font-weight:normal;font-variant:normal;text-transform:none;background-color:#FFFFFF;text-align:left;vertical-align:top</tdbody_style>
        </grid>
    </detail>
</component>