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

(-)a/misc/export_records.pl (-2 / +20 lines)
Lines 32-38 use Koha::CsvProfiles; Link Here
32
use Koha::Exporter::Record;
32
use Koha::Exporter::Record;
33
use Koha::DateUtils qw( dt_from_string output_pref );
33
use Koha::DateUtils qw( dt_from_string output_pref );
34
my ( $output_format, $timestamp, $dont_export_items, $csv_profile_id, $deleted_barcodes, $clean, $filename, $record_type, $id_list_file, $starting_authid, $ending_authid, $authtype, $starting_biblionumber, $ending_biblionumber, $itemtype, $starting_callnumber, $ending_callnumber, $start_accession, $end_accession, $help );
34
my ( $output_format, $timestamp, $dont_export_items, $csv_profile_id, $deleted_barcodes, $clean, $filename, $record_type, $id_list_file, $starting_authid, $ending_authid, $authtype, $starting_biblionumber, $ending_biblionumber, $itemtype, $starting_callnumber, $ending_callnumber, $start_accession, $end_accession, $homebranch, $holdingbranch, $help );
35
GetOptions(
35
GetOptions(
36
    'format=s'                => \$output_format,
36
    'format=s'                => \$output_format,
37
    'date=s'                  => \$timestamp,
37
    'date=s'                  => \$timestamp,
Lines 53-58 GetOptions( Link Here
53
    'ending_callnumber=s'     => \$ending_callnumber,
53
    'ending_callnumber=s'     => \$ending_callnumber,
54
    'start_accession=s'       => \$start_accession,
54
    'start_accession=s'       => \$start_accession,
55
    'end_accession=s'         => \$end_accession,
55
    'end_accession=s'         => \$end_accession,
56
       'homebranch=s'                    => \$homebranch,
57
       'holdingbranch=s'                 => \$holdingbranch,
56
    'h|help|?'                => \$help
58
    'h|help|?'                => \$help
57
) || pod2usage(1);
59
) || pod2usage(1);
Lines 150-156 if ( $record_type eq 'bibs' ) { Link Here
150
                    : ( 'me.itemtype' => $itemtype )
152
                    : ( 'me.itemtype' => $itemtype )
151
                : ()
153
                : ()
152
            ),
154
            ),
153
155
                       ( $homebranch
156
                               ? ( "items.homebranch" => $homebranch )
157
                               : ()
158
                       ),
159
                       ( $holdingbranch
160
                               ? ( "items.holdingbranch" => $holdingbranch )
161
                               : ()
162
                       ),
163
154
        };
164
        };
155
        my $biblioitems = Koha::Biblioitems->search( $conditions, { join => 'items' } );
165
        my $biblioitems = Koha::Biblioitems->search( $conditions, { join => 'items' } );
156
        while ( my $biblioitem = $biblioitems->next ) {
166
        while ( my $biblioitem = $biblioitems->next ) {
Lines 310-315 Print a brief help message. Link Here
310
 --end_accession=DATE           Export biblio with an item accessionned after DATE
320
 --end_accession=DATE           Export biblio with an item accessionned after DATE
321
=item B<--homebranch>
322
323
 --homebranch=BRANCHCODE      Export biblio owned by a specific library given by BRANCHCODE
324
325
=item B<--holdingbranch>
326
327
  --holdingbranch=BRANCHCODE    Export biblio hold by a specific library given by BRANCHCODE
328
311
=back
329
=back
312
=head1 AUTHOR
330
=head1 AUTHOR

Return to bug 20465