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

(-)a/C4/CourseReserves.pm (-3 / +3 lines)
Lines 605-611 sub _ModStoredFields { Link Here
605
    my ( @fields_to_update, @values_to_update );
605
    my ( @fields_to_update, @values_to_update );
606
606
607
    foreach (@FIELDS) {
607
    foreach (@FIELDS) {
608
        if ( $params{$_} ) {
608
        if ( defined($params{$_}) ) {
609
            push( @fields_to_update, $_ );
609
            push( @fields_to_update, $_ );
610
            push( @values_to_update, $params{$_} );
610
            push( @values_to_update, $params{$_} );
611
        }
611
        }
Lines 671-679 sub _SwapAllFields { Link Here
671
    my %course_item_fields;
671
    my %course_item_fields;
672
    my %item_fields;
672
    my %item_fields;
673
    foreach (@FIELDS) {
673
    foreach (@FIELDS) {
674
        if ( $course_item->{$_} ) {
674
        if ( defined( $course_item->{$_} ) ) {
675
            $course_item_fields{$_} = $course_item->{$_};
675
            $course_item_fields{$_} = $course_item->{$_};
676
            $item_fields{$_}        = $item->{$_};
676
            $item_fields{$_}        = $item->{$_} || q{};
677
        }
677
        }
678
    }
678
    }
679
679
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt (-4 / +4 lines)
Lines 36-42 Link Here
36
                            <option value="">LEAVE UNCHANGED</option>
36
                            <option value="">LEAVE UNCHANGED</option>
37
37
38
                            [% FOREACH it IN itypes %]
38
                            [% FOREACH it IN itypes %]
39
                                [% IF course_item.itype && ( ( course.enabled == 'yes' && it.itemtype == item.itype ) || ( course.enabled == 'no' && it.itemtype == course_item.itype ) ) %]
39
                                [% IF course_item.itype.defined && ( ( course.enabled == 'yes' && it.itemtype == item.itype ) || ( course.enabled == 'no' && it.itemtype == course_item.itype ) ) %]
40
                                    <option value="[% it.itemtype %]" selected="selected">[% it.description %]</option>
40
                                    <option value="[% it.itemtype %]" selected="selected">[% it.description %]</option>
41
                                [% ELSE %]
41
                                [% ELSE %]
42
                                    <option value="[% it.itemtype %]">[% it.description %]</option>
42
                                    <option value="[% it.itemtype %]">[% it.description %]</option>
Lines 52-58 Link Here
52
                            <option value="">LEAVE UNCHANGED</option>
52
                            <option value="">LEAVE UNCHANGED</option>
53
53
54
                            [% FOREACH c IN ccodes %]
54
                            [% FOREACH c IN ccodes %]
55
                                [% IF course_item.ccode && ( ( course.enabled == 'yes' && c.authorised_value == item.ccode ) || ( course.enabled == 'no' && c.authorised_value == course_item.ccode ) ) %]
55
                                [% IF course_item.ccode.defined && ( ( course.enabled == 'yes' && c.authorised_value == item.ccode ) || ( course.enabled == 'no' && c.authorised_value == course_item.ccode ) ) %]
56
                                    <option value="[% c.authorised_value %]" selected="selected">[% c.lib %]</option>
56
                                    <option value="[% c.authorised_value %]" selected="selected">[% c.lib %]</option>
57
                                [% ELSE %]
57
                                [% ELSE %]
58
                                    <option value="[% c.authorised_value %]">[% c.lib %]</option>
58
                                    <option value="[% c.authorised_value %]">[% c.lib %]</option>
Lines 67-73 Link Here
67
                            <option value="">LEAVE UNCHANGED</option>
67
                            <option value="">LEAVE UNCHANGED</option>
68
68
69
                            [% FOREACH s IN locations %]
69
                            [% FOREACH s IN locations %]
70
                                [% IF course_item.location && ( ( course.enabled == 'yes' && s.authorised_value == item.location ) || ( course.enabled == 'no' && s.authorised_value == course_item.location ) ) %]
70
                                [% IF course_item.location.defined && ( ( course.enabled == 'yes' && s.authorised_value == item.location ) || ( course.enabled == 'no' && s.authorised_value == course_item.location ) ) %]
71
                                    <option value="[% s.authorised_value %]" selected="selected">[% s.lib %]</option>
71
                                    <option value="[% s.authorised_value %]" selected="selected">[% s.lib %]</option>
72
                                [% ELSE %]
72
                                [% ELSE %]
73
                                    <option value="[% s.authorised_value %]">[% s.lib %]</option>
73
                                    <option value="[% s.authorised_value %]">[% s.lib %]</option>
Lines 82-88 Link Here
82
                            <option value="">LEAVE UNCHANGED</option>
82
                            <option value="">LEAVE UNCHANGED</option>
83
83
84
                            [% FOREACH b IN branches %]
84
                            [% FOREACH b IN branches %]
85
                                [% IF course_item.holdingbranch && ( ( course.enabled == 'yes' && b.value == item.holdingbranch ) || ( course.enabled == 'no' && b.value == course_item.holdingbranch ) ) %]
85
                                [% IF course_item.holdingbranch.defined && ( ( course.enabled == 'yes' && b.value == item.holdingbranch ) || ( course.enabled == 'no' && b.value == course_item.holdingbranch ) ) %]
86
                                    <option value="[% b.value %]" selected="selected">[% b.branchname %]</option>
86
                                    <option value="[% b.value %]" selected="selected">[% b.branchname %]</option>
87
                                [% ELSE %]
87
                                [% ELSE %]
88
                                    <option value="[% b.value %]">[% b.branchname %]</option>
88
                                    <option value="[% b.value %]">[% b.branchname %]</option>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt (-5 / +4 lines)
Lines 83-89 Link Here
83
                            <td>[% cr.item.itemcallnumber %]</td>
83
                            <td>[% cr.item.itemcallnumber %]</td>
84
                            [% IF item_level_itypes %]
84
                            [% IF item_level_itypes %]
85
                            <td>
85
                            <td>
86
                                [% IF cr.course_item.itype %]
86
                                [% IF cr.course_item.itype.defined %]
87
                                    [% IF cr.course_item.enabled == 'yes' %]
87
                                    [% IF cr.course_item.enabled == 'yes' %]
88
                                        [% ItemTypes.GetDescription( cr.item.itype ) %]
88
                                        [% ItemTypes.GetDescription( cr.item.itype ) %]
89
                                    [% ELSE %]
89
                                    [% ELSE %]
Lines 98-104 Link Here
98
                            </td>
98
                            </td>
99
                            [% END %]
99
                            [% END %]
100
                            <td>
100
                            <td>
101
                                 [% IF cr.course_item.ccode %]
101
                                 [% IF cr.course_item.ccode.defined %]
102
                                     [% IF cr.course_item.enabled == 'yes' %]
102
                                     [% IF cr.course_item.enabled == 'yes' %]
103
                                          [% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) %]
103
                                          [% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) %]
104
                                     [% ELSE %]
104
                                     [% ELSE %]
Lines 112-118 Link Here
112
                                 [% END %]
112
                                 [% END %]
113
                            </td>
113
                            </td>
114
                            <td>
114
                            <td>
115
                                [% IF cr.course_item.location %]
115
                                [% IF cr.course_item.location.defined %]
116
                                     [% IF cr.course_item.enabled == 'yes' %]
116
                                     [% IF cr.course_item.enabled == 'yes' %]
117
                                         [% AuthorisedValues.GetByCode( 'LOC', cr.item.location ) %]
117
                                         [% AuthorisedValues.GetByCode( 'LOC', cr.item.location ) %]
118
                                    [% ELSE %]
118
                                    [% ELSE %]
Lines 126-132 Link Here
126
                                [% END %]
126
                                [% END %]
127
                            </td>
127
                            </td>
128
                            <td>
128
                            <td>
129
                                [% IF cr.course_item.holdingbranch %]
129
                                [% IF cr.course_item.holdingbranch.defined %]
130
                                    [% IF cr.course_item.enabled == 'yes' %]
130
                                    [% IF cr.course_item.enabled == 'yes' %]
131
                                        [% Branches.GetName( cr.item.holdingbranch ) %]
131
                                        [% Branches.GetName( cr.item.holdingbranch ) %]
132
                                    [% ELSE %]
132
                                    [% ELSE %]
133
- 

Return to bug 10382