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

(-)a/Koha/Holdings.pm (-1 / +4 lines)
Lines 74-80 sub get_embeddable_marc_fields { Link Here
74
    }
74
    }
75
75
76
    my ($holdingstag, $holdingssubfield) = Koha::Holding->get_marc_field_mapping({ field => 'holdings.holdingbranch' });
76
    my ($holdingstag, $holdingssubfield) = Koha::Holding->get_marc_field_mapping({ field => 'holdings.holdingbranch' });
77
    my $holdings = $class->search({ biblionumber => $params->{biblionumber}, deleted_on => undef })->unblessed();
77
    my $holdings = $class->search({
78
        biblionumber => $params->{biblionumber},
79
        ($params->{holding_id} ? (holding_id => $params->{holding_id}) : ()),
80
        deleted_on => undef })->unblessed();
78
    foreach my $holding (@$holdings) {
81
    foreach my $holding (@$holdings) {
79
        my $mungedholding = {
82
        my $mungedholding = {
80
            map {
83
            map {
(-)a/Koha/UI/Form/Builder/Item.pm (+10 lines)
Lines 85-90 sub generate_subfield_form { Link Here
85
    my $branch_limit = $params->{branch_limit};
85
    my $branch_limit = $params->{branch_limit};
86
    my $default_branches_empty = $params->{default_branches_empty};
86
    my $default_branches_empty = $params->{default_branches_empty};
87
    my $readonly = $params->{readonly};
87
    my $readonly = $params->{readonly};
88
    my $holding_id = $params->{holding_id};
88
89
89
    my $item         = $self->{item};
90
    my $item         = $self->{item};
90
    my $subfield     = $tagslib->{$tag}{$subfieldtag};
91
    my $subfield     = $tagslib->{$tag}{$subfieldtag};
Lines 503-508 sub edit_form { Link Here
503
    my $branch_limit = $params->{branch_limit};
504
    my $branch_limit = $params->{branch_limit};
504
    my $default_branches_empty = $params->{default_branches_empty};
505
    my $default_branches_empty = $params->{default_branches_empty};
505
    my $ignore_invisible_subfields = $params->{ignore_invisible_subfields} || 0;
506
    my $ignore_invisible_subfields = $params->{ignore_invisible_subfields} || 0;
507
    my $holding_id = $params->{holding_id};
506
508
507
    my $libraries =
509
    my $libraries =
508
      Koha::Libraries->search( {}, { order_by => ['branchname'] } )->unblessed;
510
      Koha::Libraries->search( {}, { order_by => ['branchname'] } )->unblessed;
Lines 520-525 sub edit_form { Link Here
520
    my $biblionumber   = $self->{biblionumber};
522
    my $biblionumber   = $self->{biblionumber};
521
    my $frameworkcode  = $biblionumber ? GetFrameworkCode($biblionumber) : q{};
523
    my $frameworkcode  = $biblionumber ? GetFrameworkCode($biblionumber) : q{};
522
    my $marc_record    = $biblionumber ? GetMarcBiblio( { biblionumber => $biblionumber } ) : undef;
524
    my $marc_record    = $biblionumber ? GetMarcBiblio( { biblionumber => $biblionumber } ) : undef;
525
526
    # Overlay/add holdings defaults:
527
    if ( C4::Context->preference('SummaryHoldings') && $holding_id ) {
528
        my $holdings_fields = Koha::Holdings->get_embeddable_marc_fields({ biblionumber => $biblionumber, holding_id => $holding_id });
529
        $marc_record->append_fields(@$holdings_fields) if @$holdings_fields;
530
    }
531
532
523
    my @subfields;
533
    my @subfields;
524
    my $tagslib = GetMarcStructure( 1, $frameworkcode );
534
    my $tagslib = GetMarcStructure( 1, $frameworkcode );
525
    foreach my $tag ( keys %{$tagslib} ) {
535
    foreach my $tag ( keys %{$tagslib} ) {
(-)a/catalogue/showmarc.pl (-1 / +1 lines)
Lines 48-54 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
48
my $biblionumber= $input->param('id');
48
my $biblionumber= $input->param('id');
49
my $importid= $input->param('importid');
49
my $importid= $input->param('importid');
50
my $view= $input->param('viewas')||'';
50
my $view= $input->param('viewas')||'';
51
my $holding_id= $input->param('holding_id')||'';
51
my $holding_id = $input->param('holding_id') // '';
52
52
53
my $record;
53
my $record;
54
if ($holding_id) {
54
if ($holding_id) {
(-)a/cataloguing/additem.pl (-1 / +3 lines)
Lines 103-108 my $fa_branch = $input->param('branch'); Link Here
103
my $fa_stickyduedate      = $input->param('stickyduedate');
103
my $fa_stickyduedate      = $input->param('stickyduedate');
104
my $fa_duedatespec        = $input->param('duedatespec');
104
my $fa_duedatespec        = $input->param('duedatespec');
105
105
106
my $holding_id = $input->param('holding_id') // '';
107
106
our $frameworkcode = &GetFrameworkCode($biblionumber);
108
our $frameworkcode = &GetFrameworkCode($biblionumber);
107
109
108
# Defining which userflag is needing according to the framework currently used
110
# Defining which userflag is needing according to the framework currently used
Lines 598-603 my $subfields = Link Here
598
            ? ( ignore_invisible_subfields => 1 )
600
            ? ( ignore_invisible_subfields => 1 )
599
            : ()
601
            : ()
600
        ),
602
        ),
603
        holding_id => $holding_id,
601
    }
604
    }
602
);
605
);
603
606
604
- 

Return to bug 20447