Changeset 3217


Ignore:
Timestamp:
09/06/10 18:21:07 (14 years ago)
Author:
rodsouza
Message:

Ticket #884 - Distinguindo telefone e e-mail na exportação de contato no formato ExpressoLivre?

Location:
branches/2.2/contactcenter/inc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/contactcenter/inc/class.so_group.inc.php

    r3216 r3217  
    117117                                                . ' phpgw_cc_contact.names_ordered,' 
    118118                                                . ' phpgw_cc_contact.alias,' 
     119                                                . ' phpgw_cc_connections.connection_name,' 
    119120                                                . ' phpgw_cc_connections.connection_value,' 
    120121                                                . ' phpgw_cc_contact_conns.id_typeof_contact_connection,' 
     
    125126                                                . ' phpgw_cc_city.city_name,' 
    126127                                                . ' phpgw_cc_state.state_name,' 
    127                                                 . ' phpgw_cc_addresses.id_country'; 
     128                                                . ' phpgw_cc_addresses.id_country' 
     129                                                ; 
    128130 
    129131                                $query .= ' from' 
     
    134136                                                . ' left join phpgw_cc_addresses on ( phpgw_cc_contact_addrs.id_address = phpgw_cc_addresses.id_address )' 
    135137                                                . ' left join phpgw_cc_city on ( phpgw_cc_addresses.id_city = phpgw_cc_city.id_city )' 
    136                                                 . ' left join phpgw_cc_state on ( phpgw_cc_addresses.id_state = phpgw_cc_state.id_state)'; 
     138                                                . ' left join phpgw_cc_state on ( phpgw_cc_addresses.id_state = phpgw_cc_state.id_state)' 
     139                                                ; 
    137140 
    138141                                $query .= ' where' 
    139142                                                . " phpgw_cc_contact.id_owner = {$this->owner}" 
    140                                                 . ' and phpgw_cc_connections.connection_is_default = true'; 
     143                                                //. ' and phpgw_cc_connections.connection_is_default = true' 
     144                                                ; 
    141145 
    142146                        } 
     
    180184                                                'connection_value' => '', 
    181185                                                'phone' => '', 
     186                                                'mobile' => '', 
    182187                                                'names_ordered' => '', 
    183188                                                'id_contact' => '', 
    184189                                                'id_connection' => '', 
    185190                                                'alias' => '', 
     191                                                'main-mail' => '', 
     192                                                'aternative-mail' => '', 
     193                                                'business-phone' => '', 
    186194                                                'business-address' => '', 
    187                                                 'complement' => '', 
    188                                                 'postal_code' => '', 
    189                                                 'city_name' => '', 
    190                                                 'state_name' => '', 
    191                                                 'id_country' => '', 
     195                                                'business-complement' => '', 
     196                                                'business-postal_code' => '', 
     197                                                'business-city_name' => '', 
     198                                                'business-state_name' => '', 
     199                                                'business-id_country' => '', 
     200                                                'home-phone' => '', 
    192201                                                'home-address' => '', 
    193                                                 'complement' => '', 
    194                                                 'postal_code' => '', 
    195                                                 'city_name' => '', 
    196                                                 'state_name' => '', 
    197                                                 'id_country' => '' 
     202                                                'home-complement' => '', 
     203                                                'home-postal_code' => '', 
     204                                                'home-city_name' => '', 
     205                                                'home-state_name' => '', 
     206                                                'home-id_country' => '' 
    198207                                        ); 
    199208 
     
    202211                                        case 1 : 
    203212                                                $all_contacts[ $object[ 'id_contact' ] ][ 'connection_value' ] = $object[ 'connection_value' ]; 
     213                                                switch ( strtolower( $object[ 'connection_name' ] ) ) 
     214                                                { 
     215                                                        case 'alternativo' : 
     216                                                                $all_contacts[ $object[ 'id_contact' ] ][ 'alternative-mail' ] = $object[ 'connection_value' ]; 
     217                                                                break; 
     218                                                        case 'principal' : 
     219                                                                $all_contacts[ $object[ 'id_contact' ] ][ 'main-mail' ] = $object[ 'connection_value' ]; 
     220                                                                break; 
     221                                                } 
    204222                                                break; 
    205223                                        case 2 : 
    206224                                                $all_contacts[ $object[ 'id_contact' ] ][ 'phone' ] = $object[ 'connection_value' ]; 
     225                                                switch ( strtolower( $object[ 'connection_name' ] ) ) 
     226                                                { 
     227                                                        case 'casa' : 
     228                                                                $all_contacts[ $object[ 'id_contact' ] ][ 'home-phone' ] = $object[ 'connection_value' ]; 
     229                                                                break; 
     230                                                        case 'celular' : 
     231                                                                $all_contacts[ $object[ 'id_contact' ] ][ 'mobile' ] = $object[ 'connection_value' ]; 
     232                                                                break; 
     233                                                        case 'trabalho' : 
     234                                                                $all_contacts[ $object[ 'id_contact' ] ][ 'business-phone' ] = $object[ 'connection_value' ]; 
     235                                                                break; 
     236                                                } 
    207237                                                break; 
    208238                                } 
  • branches/2.2/contactcenter/inc/class.ui_data.inc.php

    r3216 r3217  
    34793479 
    34803480                                case 'expresso': 
    3481                                         $streamBuffer = 'Nome,Apelido,Email,Telefone,' 
    3482                                                 . 'Endereço Comercial,Complemento End. Comercial,CEP Comercial,Cidade End. Comercial,Estado End. Comercial,País End. Comercial' 
    3483                                                 . 'Endereço Residencial,Complemento End. Residencial,CEP Residencial,Cidade End. Residencial,Estado End. Residencial,País End. Residencial' 
     3481                                        $streamBuffer = 'Nome,Apelido,E-mail Principal,E-mail Alternativo,Celular,' 
     3482                                                . 'Telefone Comercial,Endereço Comercial,Complemento End. Comercial,CEP Comercial,Cidade End. Comercial,Estado End. Comercial,País End. Comercial,' 
     3483                                                . 'Telefone Residencial,Endereço Residencial,Complemento End. Residencial,CEP Residencial,Cidade End. Residencial,Estado End. Residencial,País End. Residencial' 
    34843484                                                . "\r\n"; 
    34853485 
     
    34873487                                                $streamBuffer .= $object[ 'names_ordered'] . ',' 
    34883488                                                        . $object[ 'alias' ] . ',' 
    3489                                                         . $object[ 'connection_value' ] . ',' 
    3490                                                         . $object[ 'phone' ] . ',' 
     3489                                                        . $object[ 'main-mail' ] . ',' 
     3490                                                        . $object[ 'alternative-mail' ] . ',' 
     3491                                                        . $object[ 'mobile' ] . ',' 
     3492                                                        . $object[ 'business-phone' ] . ',' 
    34913493                                                        . $object[ 'business-address' ] . ',' 
    34923494                                                        . $object[ 'business-complement' ] . ',' 
     
    34953497                                                        . $object[ 'business-state_name' ] . ',' 
    34963498                                                        . $object[ 'business-id_country' ] . ',' 
     3499                                                        . $object[ 'home-phone' ] . ',' 
    34973500                                                        . $object[ 'home-address' ] . ',' 
    34983501                                                        . $object[ 'home-complement' ] . ',' 
Note: See TracChangeset for help on using the changeset viewer.