View | Details | Raw Unified | Return to bug 8612
Collapse All | Expand All

(-)a/C4/Acquisition.pm (-4 / +5 lines)
Lines 32-37 use Koha::Acquisition::Order; Link Here
32
use Koha::Acquisition::Bookseller;
32
use Koha::Acquisition::Bookseller;
33
use Koha::Number::Price;
33
use Koha::Number::Price;
34
use Koha::Libraries;
34
use Koha::Libraries;
35
use Koha::CsvProfiles;
35
36
36
use C4::Koha;
37
use C4::Koha;
37
38
Lines 286-296 sub GetBasketAsCSV { Link Here
286
    my $template = C4::Templates::gettemplate("acqui/csv/basket.tt", "intranet", $cgi);
287
    my $template = C4::Templates::gettemplate("acqui/csv/basket.tt", "intranet", $cgi);
287
    my @rows;
288
    my @rows;
288
    if ($csv_profile_id) {
289
    if ($csv_profile_id) {
289
        my $csv_profile = C4::Csv::GetCsvProfile( $csv_profile_id );
290
        my $csv_profile = Koha::CsvProfiles->find( $csv_profile_id );
290
        die "There is no valid csv profile given" unless $csv_profile;
291
        die "There is no valid csv profile given" unless $csv_profile;
291
292
292
        my $csv = Text::CSV_XS->new({'quote_char'=>'"','escape_char'=>'"','sep_char'=>$csv_profile->{csv_separator},'binary'=>1});
293
        my $csv = Text::CSV_XS->new({'quote_char'=>'"','escape_char'=>'"','sep_char'=>$csv_profile->csv_separator,'binary'=>1});
293
        my $csv_profile_content = $csv_profile->{content};
294
        my $csv_profile_content = $csv_profile->content;
294
        my ( @headers, @fields );
295
        my ( @headers, @fields );
295
        while ( $csv_profile_content =~ /
296
        while ( $csv_profile_content =~ /
296
            ([^=]+) # header
297
            ([^=]+) # header
Lines 321-327 sub GetBasketAsCSV { Link Here
321
            }
322
            }
322
            push @rows, \@row;
323
            push @rows, \@row;
323
        }
324
        }
324
        my $content = join( $csv_profile->{csv_separator}, @headers ) . "\n";
325
        my $content = join( $csv_profile->csv_separator, @headers ) . "\n";
325
        for my $row ( @rows ) {
326
        for my $row ( @rows ) {
326
            $csv->combine(@$row);
327
            $csv->combine(@$row);
327
            my $string = $csv->string;
328
            my $string = $csv->string;
(-)a/acqui/basket.pl (-3 / +2 lines)
Lines 33-44 use C4::Biblio; Link Here
33
use C4::Members qw/GetMember/;  #needed for permissions checking for changing basketgroup of a basket
33
use C4::Members qw/GetMember/;  #needed for permissions checking for changing basketgroup of a basket
34
use C4::Items;
34
use C4::Items;
35
use C4::Suggestions;
35
use C4::Suggestions;
36
use C4::Csv;
37
use Koha::Libraries;
36
use Koha::Libraries;
38
use C4::Letters qw/SendAlerts/;
37
use C4::Letters qw/SendAlerts/;
39
use Date::Calc qw/Add_Delta_Days/;
38
use Date::Calc qw/Add_Delta_Days/;
40
use Koha::Database;
39
use Koha::Database;
41
use Koha::EDI qw( create_edi_order get_edifact_ean );
40
use Koha::EDI qw( create_edi_order get_edifact_ean );
41
use Koha::CsvProfiles;
42
42
43
=head1 NAME
43
=head1 NAME
44
44
Lines 424-430 if ( $op eq 'list' ) { Link Here
424
        unclosable           => @orders ? $basket->{is_standing} : 1,
424
        unclosable           => @orders ? $basket->{is_standing} : 1,
425
        has_budgets          => $has_budgets,
425
        has_budgets          => $has_budgets,
426
        duplinbatch          => $duplinbatch,
426
        duplinbatch          => $duplinbatch,
427
        csv_profiles         => C4::Csv::GetCsvProfiles( "sql" ),
427
        csv_profiles         => [ Koha::CsvProfiles->search({ type => 'sql' }) ],
428
    );
428
    );
429
}
429
}
430
430
431
- 

Return to bug 8612