[Koha-bugs] [Bug 8612] CSV export profile to have custom fields in export csv basket
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Aug 4 10:22:46 CEST 2015
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8612
--- Comment #17 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
(In reply to Rémi Mayrand-Provencher from comment #12)
> Hi Jonathan,
>
> > ::: acqui/basket.pl
> > @@ +197,5 @@
> > > -type => 'text/csv',
> > > -attachment => 'basket' . $basket->{'basketno'} . '.csv',
> > > );
> > > + if ( $query->param('csv_profile') eq 'default'){
> > > + print GetBasketAsCSV($query->param('basketno'), $query);
> >
> > Actually this subroutine should take the csv profile in parameter, don't you
> > think?
>
> Could you be more specific about what are the changes you would like to see
> here?
You added 2 subroutines to the script acqui/basket.pl to build a CSV file.
But the subroutine GetBasketAsCSV already does it.
I think you should modify this subroutine to do what you want to do: export a
basket as CSV given a specific CSV profile.
The call would be:
my $csv = GetBasketAsCSV($basketno, $query, $csv_profile_id);
Yes, it's a little bit more work, but more robust and reusable :)
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list