diff --git a/include/export/export_anc_axis_csv.php b/include/export/export_anc_axis_csv.php new file mode 100644 index 000000000..81dfd8b44 --- /dev/null +++ b/include/export/export_anc_axis_csv.php @@ -0,0 +1,60 @@ +get("pa_id","number"); +$name=$cn->get_value("select pa_name from plan_analytique where pa_id=$1", + [$pa_id]); +$array=$cn->get_array(" select + po_name, + po_amount, + po_description, + ga_description + from + poste_analytique + left join groupe_analytique using (ga_id) + where poste_analytique.pa_id=$1 order by po_name asc ",[$pa_id]); +$output=new Noalyss_Csv($name); +$output->send_header(); +$output->write_header([ + _("Nom"), + _("Description"), + _("Montant"), + _("Groupe"), +]); +if ($array != FALSE ) +{ + $nb_array=count($array); + for ($i=0;$i<$nb_array;$i++) { + $output->add($array[$i]['po_name']); + $output->add($array[$i]['po_description']); + $output->add($array[$i]['po_amount'],"number"); + $output->add($array[$i]['ga_description']); + $output->write(); + } + +} \ No newline at end of file