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 496-501 sub edit_form { Link Here
496
    my $prefill_with_default_values = $params->{prefill_with_default_values};
497
    my $prefill_with_default_values = $params->{prefill_with_default_values};
497
    my $branch_limit = $params->{branch_limit};
498
    my $branch_limit = $params->{branch_limit};
498
    my $default_branches_empty = $params->{default_branches_empty};
499
    my $default_branches_empty = $params->{default_branches_empty};
500
    my $holding_id = $params->{holding_id};
499
501
500
    my $libraries =
502
    my $libraries =
501
      Koha::Libraries->search( {}, { order_by => ['branchname'] } )->unblessed;
503
      Koha::Libraries->search( {}, { order_by => ['branchname'] } )->unblessed;
Lines 513-518 sub edit_form { Link Here
513
    my $biblionumber   = $self->{biblionumber};
515
    my $biblionumber   = $self->{biblionumber};
514
    my $frameworkcode  = $biblionumber ? GetFrameworkCode($biblionumber) : q{};
516
    my $frameworkcode  = $biblionumber ? GetFrameworkCode($biblionumber) : q{};
515
    my $marc_record    = $biblionumber ? GetMarcBiblio( { biblionumber => $biblionumber } ) : undef;
517
    my $marc_record    = $biblionumber ? GetMarcBiblio( { biblionumber => $biblionumber } ) : undef;
518
519
    # Overlay/add holdings defaults:
520
    if ( C4::Context->preference('SummaryHoldings') && $holding_id ) {
521
        my $holdings_fields = Koha::Holdings->get_embeddable_marc_fields({ biblionumber => $biblionumber, holding_id => $holding_id });
522
        $marc_record->append_fields(@$holdings_fields) if @$holdings_fields;
523
    }
524
525
516
    my @subfields;
526
    my @subfields;
517
    my $tagslib = GetMarcStructure( 1, $frameworkcode );
527
    my $tagslib = GetMarcStructure( 1, $frameworkcode );
518
    foreach my $tag ( keys %{$tagslib} ) {
528
    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 590-595 my $subfields = Link Here
590
        ),
592
        ),
591
        prefill_with_default_values => 1,
593
        prefill_with_default_values => 1,
592
        branch_limit => C4::Context->userenv->{"branch"},
594
        branch_limit => C4::Context->userenv->{"branch"},
595
        holding_id => $holding_id,
593
    }
596
    }
594
);
597
);
595
598
596
- 

Return to bug 20447