<?php
$GLOBALS['export_xls']['dossiers'] = array(
'cols' => array(
array(
'label' => 'Réf. dossier',
'width' => 15,
'value' => '"%ref_dossier%"',
'write_method' => 'write_string'
),
array(
'label' => 'Date d\'inscription du client',
'width' => 25,
'value' => 'format_date_to_excel("%dateInscription%")',
'format' => 'datetime'
),
array(
'label' => 'Inscription par',
'width' => 30,
'value' => 'utf8_decode (nettoyage_csv (p2e_sinon(trim("%createurNom%".\' \'."%createurPrenom%"), \'client\')))',
'write_method' => 'write_string'
),
array(
'label' => 'Date de création du dossier',
'width' => 25,
'value' => 'format_date_to_excel("%dateCrea%")',
'format' => 'datetime'
),
array(
'label' => 'Code de type de travaux (opération)',
'width' => 30,
'value' => 'utf8_decode (nettoyage_csv ("%code_operation_type%"))',
'write_method' => 'write_string'
),
array(
'label' => 'Type de travaux (opération)',
'width' => 50,
'value' => 'utf8_decode (nettoyage_csv ("%lib_trav%"))',
'write_method' => 'write_string'
),
array(
'label' => 'Date d\'engagement de l\'opération',
'width' => 26,
'value' => 'format_date_to_excel("%date_engagement%")',
'format' => 'date'
),
array(
'label' => 'Date d\'achèvement de l\'opération',
'width' => 26,
'value' => 'format_date_to_excel("%date_facture%")',
'format' => 'date'
),
array(
'label' => 'Date d\'expiration',
'width' => 20,
'value' => 'format_date_to_excel(filtre_get_date_expiration("%id_dossier%"))',
'format' => 'date'
),
array(
'label' => 'Réf. client',
'width' => 10,
'value' => '"%ref_client%"',
'write_method' => 'write_string'
),
array(
'label' => 'Civilité',
'width' => 10,
'value' => 'formater_nom(array(\'code_civilite\' => "%code_civilite%"),\'@s\')',
'write_method' => 'write_string'
),
array(
'label' => 'Nom',
'width' => 30,
'value' => 'utf8_decode (formater_nom(array(\'nom\' => "%nom%"),\'@N\'))',
'write_method' => 'write_string'
),
array(
'label' => 'Prénom',
'width' => 30,
'value' => 'utf8_decode (formater_nom(array(\'prenom\' => "%prenom%"),\'@p\'))',
'write_method' => 'write_string'
),
array(
'label' => 'Adresse client',
'width' => 50,
'value' => 'utf8_decode (nettoyage_csv ( trim( "%cli_adr0%" .\' \'. "%cli_adr1%" .\' \'. "%cli_adr2%" .\' \'. "%cli_adr3%")))',
'write_method' => 'write_string'
),
array(
'label' => 'CP client',
'width' => 10,
'value' => 'utf8_decode (nettoyage_csv ("%auteur_cp%"))',
'write_method' => 'write_number',
'format' => 'code_postal'
),
array(
'label' => 'Ville client',
'width' => 30,
'value' => 'utf8_decode (nettoyage_csv ("%auteur_ville%"))',
'write_method' => 'write_string'
),
array(
'label' => 'Pays client',
'width' => 10,
'value' => 'utf8_decode (nettoyage_csv ("%auteur_code_pays%"))',
'write_method' => 'write_string'
),
array(
'label' => 'Tél. Domicile',
'width' => 15,
'value' => '"%tel_fixe%"',
'format' => 'telephone'
),
array(
'label' => 'Tél. Mobile',
'width' => 15,
'value' => '"%tel_port%"',
'format' => 'telephone'
),
array(
'label' => 'Tél. Professionnel',
'width' => 15,
'value' => '"%tel_prof%"',
'format' => 'telephone'
),
array(
'label' => 'Email',
'width' => 40,
'value' => 'utf8_decode (nettoyage_csv ("%email%"))',
'write_method' => 'write_string'
),
array(
'label' => 'Prime attribuable',
'width' => 20,
'value' => '"%prime_estimee%"',
'write_method' => 'write_number',
'format' => 'prime'
),
array(
'label' => 'Prime attribuée',
'width' => 20,
'value' => '"%prime_attribuee%"',
'write_method' => 'write_number',
'format' => 'prime'
),
array(
'label' => 'Kwatt',
'width' => 15,
'value' => '"%kwatt%"',
'write_method' => 'write_number'
),
array(
'label' => 'R',
'width' => 5,
'value' => 'utf8_decode( nettoyage_csv( nettoyage_caracteres_speciaux (affichage_surface_habitable("%r%", "%code_operation_type%"))))',
'write_method' => 'write_string'
),
array(
'label' => 'COP',
'width' => 20,
'value' => 'utf8_decode( nettoyage_csv( nettoyage_caracteres_speciaux (affichage_cop_facteur("%facteur_1%", "%facteur_2%", "%facteur_3%", "%code_operation_type%"))))',
'write_method' => 'write_string'
),
array(
'label' => 'Surface (ou Quantité)',
'width' => 20,
'value' => 'utf8_decode( nettoyage_csv( nettoyage_caracteres_speciaux (surface_ou_quantite_facteur("%facteur_1%", "%facteur_2%", "%facteur_3%"))))',
'write_method' => 'write_string'
),
array(
'label' => 'Information supplémentaire',
'width' => 30,
'value' => 'utf8_decode( nettoyage_csv( nettoyage_caracteres_speciaux (affichage_info_supp_chauff("%cop%", "%code_operation_type%"))))',
'write_method' => 'write_string'
),
array(
'label' => 'Surface habitable',
'width' => 20,
'value' => 'utf8_decode( nettoyage_csv( nettoyage_caracteres_speciaux (affichage_surface_habitable("%surface_habitable%", "%code_operation_type%"))))',
'write_method' => 'write_string'
),
array(
'label' => 'Travaux année de construction',
'width' => 35,
'value' => 'utf8_decode( nettoyage_csv( _T(\'p2e_saisies:saisie_annee_construction_\'."%annee_construction%")))',
'write_method' => 'write_string'
),
array(
'label' => 'Travaux type logement',
'width' => 50,
'value' => 'utf8_decode( nettoyage_csv( _T(\'p2e_saisies:saisie_type_logement_\'."%type_logement%")))',
'write_method' => 'write_string'
),
array(
'label' => 'Travaux type chauffage',
'width' => 35,
'value' => 'utf8_decode( nettoyage_csv( _T(\'p2e_saisies:saisie_type_chauffage_\'."%type_chauffage%")))',
'write_method' => 'write_string'
),
array(
'label' => 'Statut dossier',
'width' => 40,
'value' => 'utf8_decode (nettoyage_csv ("%statut_dossier%"))',
'write_method' => 'write_string'
),
array(
'label' => 'Date changement statut',
'width' => 20,
'value' => 'format_date_to_excel("%date%")',
'format' => 'datetime'
),
array(
'label' => 'Auteur changement statut',
'width' => 30,
'value' => 'utf8_decode (nettoyage_csv ("%auteurModifPrenom%" .\' \'. "%auteurModifNom%"))',
'write_method' => 'write_string'
),
array(
'label' => 'Travaux adresse',
'width' => 50,
'value' => 'utf8_decode (nettoyage_csv ( trim( "%adr_lib1%" .\' \'. "%adr_lib2%" .\' \'. "%adr_lib3%" .\' \'. "%adr_lib4%")))',
'write_method' => 'write_string'
),
array(
'label' => 'Travaux CP',
'width' => 15,
'value' => 'utf8_decode (nettoyage_csv ("%adr_cp%"))',
'write_method' => 'write_number',
'format' => 'code_postal'
),
array(
'label' => 'Travaux Ville',
'width' => 30,
'value' => 'utf8_decode (nettoyage_csv ("%adr_ville%"))',
'write_method' => 'write_string'
),
array(
'label' => 'Travaux Département',
'width' => 25,
'value' => '"%code_departement%"',
'write_method' => 'write_number',
'format' => 'departement'
),
array(
'label' => 'Travaux Pays',
'width' => 20,
'value' => 'utf8_decode (nettoyage_csv ("%code_pays%"))',
'write_method' => 'write_string'
),
array(
'label' => 'Lot emmy',
'width' => 20,
'value' => 'utf8_decode (nettoyage_csv ("%lib_lot%"))',
'write_method' => 'write_string'
),
)
);
$auteur_cp_index = array_search( array(
'label' => 'CP client',
'width' => 10,
'value' => 'utf8_decode (nettoyage_csv ("%auteur_cp%"))',
'write_method' => 'write_number',
'format' => 'code_postal'
), $GLOBALS['export_xls']['dossiers']['cols']);
$GLOBALS['export_xls']['dossiers']['cols'] =
array_replace($GLOBALS['export_xls']['dossiers']['cols'], array(
$auteur_index_cp =>
array(
'label' => 'CP client',
'width' => 10,
'value' => 'utf8_decode (nettoyage_csv ("%auteur_cp%"))',
'write_method' => 'write_string',
'format' => 'code_postal'
)
));
var_dump($GLOBALS['export_xls']['dossiers']['cols']);
preferences:
49.65 ms | 402 KiB | 5 Q