X-Git-Url: http://olivier.miskin.fr/git/?a=blobdiff_plain;f=action%2Fexporter_souscriptions.php;h=031b3529ad3b3cd41286b70114e1aef0af9be58c;hb=0330c22ae0dbd459c3c5ed0793d6bfb2ca488d89;hp=56f65a079cc525632a71bc12d1bc8cb7ac7a8f6a;hpb=c13a2768a862240162d8a31345b3d633a16f9ef7;p=spip_souscriptions.git diff --git a/action/exporter_souscriptions.php b/action/exporter_souscriptions.php index 56f65a0..031b352 100644 --- a/action/exporter_souscriptions.php +++ b/action/exporter_souscriptions.php @@ -62,7 +62,7 @@ function action_exporter_souscriptions_dist($arg=null) { /* Préparation de la requête */ $select = "id_souscription, courriel, type_souscription," ."montant, reglee, spip_transactions.statut, date_paiement, mode, autorisation_id," - ."nom, prenom, adresse, code_postal, ville, pays, telephone, recu_fiscal, envoyer_info, date_souscription," + ."nom, prenom, adresse, code_postal, ville, pays, telephone, recu_fiscal, envoyer_info, informer_comite_local, date_souscription," ."spip_souscription_campagnes.id_souscription_campagne, titre"; $from = "spip_souscriptions LEFT JOIN spip_transactions USING(id_transaction) LEFT JOIN spip_souscription_campagnes USING(id_souscription_campagne)"; @@ -72,11 +72,11 @@ function action_exporter_souscriptions_dist($arg=null) { if($statut) { if($statut == "paye") - $where[] = "reglee='oui'"; + $where[] = "spip_transactions.statut='ok' and reglee='oui'"; elseif($statut == "commande") $where[] = "spip_transactions.statut='commande'"; elseif($statut == "erreur") - $where[] = "spip_transactions.statut like 'echec'"; + $where[] = "spip_transactions.statut like 'echec%'"; } if($id_campagne) @@ -90,27 +90,28 @@ function action_exporter_souscriptions_dist($arg=null) { $row = sql_select($select, $from, $where); - $entete = array("ID du don", - "Courriel", - "Type de souscription", - "Montant", - "Reglée", - "Statut", - "Date de paiement", - "Mode de paiement", - "ID de l'autorisation", - "Nom", - "Prénom", - "Adresse", - "Code Postal", - "Ville", - "Pays", - "Téléphone", - "Souhaite reçu fiscal", - "Souhaite être informé", - "Date don", - "ID Campagne", - "Titre de la campagne"); + $entete = array(_T("souscription:label_exporter_entete_id_don"), + _T("souscription:label_exporter_entete_courriel"), + _T("souscription:label_exporter_entete_type_souscription"), + _T("souscription:label_exporter_entete_montant"), + _T("souscription:label_exporter_entete_reglee"), + _T("souscription:label_exporter_entete_statut"), + _T("souscription:label_exporter_entete_date_paiement"), + _T("souscription:label_exporter_entete_mode_paiement"), + _T("souscription:label_exporter_entete_id_autorisation"), + _T("souscription:label_exporter_entete_nom"), + _T("souscription:label_exporter_entete_prenom"), + _T("souscription:label_exporter_entete_adresse"), + _T("souscription:label_exporter_entete_code_postal"), + _T("souscription:label_exporter_entete_ville"), + _T("souscription:label_exporter_entete_pays"), + _T("souscription:label_exporter_entete_telephone"), + _T("souscription:label_exporter_entete_recu_fiscal"), + _T("souscription:label_exporter_entete_informer"), + _T("souscription:label_exporter_entete_informer_comite_local"), + _T("souscription:label_exporter_entete_date_don"), + _T("souscription:label_exporter_entete_id_campagne"), + _T("souscription:label_exporter_entete_titre_campagne")); /* Utilisation de la fonction exporter_csv de Bonux */ $exporter_csv = charger_fonction('exporter_csv', 'inc/', true);