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

(-)a/circ/branchtransfers.pl (-32 / +12 lines)
Lines 131-180 if ($barcode) { Link Here
131
    my $item = Koha::Items->find({ barcode => $barcode });
131
    my $item = Koha::Items->find({ barcode => $barcode });
132
    $found = $messages->{'ResFound'};
132
    $found = $messages->{'ResFound'};
133
    if ($transferred) {
133
    if ($transferred) {
134
        my %item;
134
        my %trsfitem;
135
        my $biblio = $item->biblio;
136
        my $frbranchcd =  C4::Context->userenv->{'branch'};
135
        my $frbranchcd =  C4::Context->userenv->{'branch'};
137
        $item{'biblionumber'}          = $item->biblionumber;
136
        $trsfitem{item}     = $item;
138
        $item{'itemnumber'}            = $item->itemnumber;
137
        $trsfitem{counter}  = 0;
139
        $item{'title'}                 = $biblio->title;
138
        $trsfitem{frombrcd} = $frbranchcd;
140
        $item{'author'}                = $biblio->author;
139
        $trsfitem{tobrcd}   = $tobranchcd;
141
        $item{'itemtype'}              = $biblio->biblioitem->itemtype;
140
        push( @trsfitemloop, \%trsfitem );
142
        $item{'ccode'}                 = $item->ccode;
143
        $item{'itemcallnumber'}        = $item->itemcallnumber;
144
        my $av = Koha::AuthorisedValues->search({ category => 'LOC', authorised_value => $item->location });
145
        $item{'location'}              = $av->count ? $av->next->lib : '';
146
        $item{counter}  = 0;
147
        $item{barcode}  = $barcode;
148
        $item{frombrcd} = $frbranchcd;
149
        $item{tobrcd}   = $tobranchcd;
150
        push( @trsfitemloop, \%item );
151
    }
141
    }
152
}
142
}
153
143
154
foreach ( $query->param ) {
144
foreach ( $query->param ) {
155
    (next) unless (/bc-(\d*)/);
145
    (next) unless (/bc-(\d*)/);
156
    my $counter = $1;
146
    my $counter = $1;
157
    my %item;
147
    my %trsfitem;
158
    my $bc    = $query->param("bc-$counter");
148
    my $bc    = $query->param("bc-$counter");
159
    my $frbcd = $query->param("fb-$counter");
149
    my $frbcd = $query->param("fb-$counter");
160
    my $tobcd = $query->param("tb-$counter");
150
    my $tobcd = $query->param("tb-$counter");
161
    $counter++;
151
    $counter++;
162
    $item{counter}  = $counter;
152
    $trsfitem{counter}  = $counter;
163
    $item{barcode}  = $bc;
153
    $trsfitem{frombrcd} = $frbcd;
164
    $item{frombrcd} = $frbcd;
154
    $trsfitem{tobrcd}   = $tobcd;
165
    $item{tobrcd}   = $tobcd;
166
    my $item = Koha::Items->find({ barcode => $bc });
155
    my $item = Koha::Items->find({ barcode => $bc });
167
    my $biblio = $item->biblio;
156
    $trsfitem{item}     = $item;
168
    $item{'biblionumber'}          = $item->biblionumber;
157
    push( @trsfitemloop, \%trsfitem );
169
    $item{'itemnumber'}            = $item->itemnumber;
170
    $item{'title'}                 = $biblio->title;
171
    $item{'author'}                = $biblio->author;
172
    $item{'itemtype'}              = $biblio->biblioitem->itemtype;
173
    $item{'ccode'}                 = $item->ccode;
174
    $item{'itemcallnumber'}        = $item->itemcallnumber;
175
    my $av = Koha::AuthorisedValues->search({ category => 'LOC', authorised_value => $item->location });
176
    $item{'location'}              = $av->count ? $av->next->lib : '';
177
    push( @trsfitemloop, \%item );
178
}
158
}
179
159
180
my $itemnumber;
160
my $itemnumber;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt (-13 / +16 lines)
Lines 40-46 Link Here
40
            <td>
40
            <td>
41
                <form method="post" name="mainform" id="mainform" action="branchtransfers.pl">
41
                <form method="post" name="mainform" id="mainform" action="branchtransfers.pl">
42
                    [% FOREACH trsfitemloo IN trsfitemloop %]
42
                    [% FOREACH trsfitemloo IN trsfitemloop %]
43
                        <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.barcode | html %]" />
43
                        <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.item.barcode | html %]" />
44
                        <input type="hidden" name="fb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.frombrcd | html %]" />
44
                        <input type="hidden" name="fb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.frombrcd | html %]" />
45
                        <input type="hidden" name="tb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.tobrcd | html %]" />
45
                        <input type="hidden" name="tb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.tobrcd | html %]" />
46
                    [% END %]
46
                    [% END %]
Lines 65-71 Link Here
65
                    <td>
65
                    <td>
66
                        <form method="post" name="mainform" id="mainform" action="branchtransfers.pl">
66
                        <form method="post" name="mainform" id="mainform" action="branchtransfers.pl">
67
                            [% FOREACH trsfitemloo IN trsfitemloop %]
67
                            [% FOREACH trsfitemloo IN trsfitemloop %]
68
                                <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.barcode | html %]" />
68
                                <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.item.barcode | html %]" />
69
                                <input type="hidden" name="fb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.frombrcd | html %]" />
69
                                <input type="hidden" name="fb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.frombrcd | html %]" />
70
                                <input type="hidden" name="tb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.tobrcd | html %]" />
70
                                <input type="hidden" name="tb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.tobrcd | html %]" />
71
                            [% END %]
71
                            [% END %]
Lines 82-92 Link Here
82
                <tr>
82
                <tr>
83
                    <th>Ignore and return to transfers: </th>
83
                    <th>Ignore and return to transfers: </th>
84
                        <td>
84
                        <td>
85
                            <form method="post" name="mainform" id="mainform" action="branchtransfers.pl" />
85
                            <form method="post" name="mainform" id="mainform" action="branchtransfers.pl">
86
                                <input type="hidden" name="tobranchcd" value="[% tobranchcd | html %]" />
86
                                <input type="hidden" name="tobranchcd" value="[% tobranchcd | html %]" />
87
                                <input type="hidden" name="barcode" />
87
                                <input type="hidden" name="barcode" />
88
                                [% FOREACH trsfitemloo IN trsfitemloop %]
88
                                [% FOREACH trsfitemloo IN trsfitemloop %]
89
                                    <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.barcode | html %]" />
89
                                    <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.item.barcode | html %]" />
90
                                    <input type="hidden" name="fb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.frombrcd | html %]" />
90
                                    <input type="hidden" name="fb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.frombrcd | html %]" />
91
                                    <input type="hidden" name="tb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.tobrcd | html %]" />
91
                                    <input type="hidden" name="tb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.tobrcd | html %]" />
92
                                [% END %]
92
                                [% END %]
Lines 164-170 Link Here
164
        </fieldset>
164
        </fieldset>
165
        <input type="hidden" name="tobranchcd" value="[% tobrancd | html %]" />
165
        <input type="hidden" name="tobranchcd" value="[% tobrancd | html %]" />
166
        [% FOREACH trsfitemloo IN trsfitemloop %]
166
        [% FOREACH trsfitemloo IN trsfitemloop %]
167
            <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.barcode | html %]" />
167
            <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.item.barcode | html %]" />
168
            <input type="hidden" name="fb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.frombrcd | html %]" />
168
            <input type="hidden" name="fb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.frombrcd | html %]" />
169
            <input type="hidden" name="tb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.tobrcd | html %]" />
169
            <input type="hidden" name="tb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.tobrcd | html %]" />
170
        [% END %]
170
        [% END %]
Lines 186-198 Link Here
186
            </tr>
186
            </tr>
187
            [% FOREACH trsfitemloo IN trsfitemloop %]
187
            [% FOREACH trsfitemloo IN trsfitemloop %]
188
                <tr>
188
                <tr>
189
                    <td class="tf-title"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% trsfitemloo.biblionumber | uri %]">[% trsfitemloo.title | html %]</a></td>
189
                    <td class="tf-title">
190
                    <td class="tf-author">[% trsfitemloo.author | html %]</td>
190
                        [% INCLUDE 'biblio-default-view.inc' biblionumber = trsfitemloo.item.biblionumber %]
191
                    <td class="tf-barcode"><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% trsfitemloo.biblionumber | uri %]&amp;itemnumber=[% trsfitemloo.itemnumber | uri %]#item[% trsfitemloo.itemnumber | uri %]">[% trsfitemloo.barcode | html %]</a></td>
191
                        [% INCLUDE 'biblio-title.inc' biblio=trsfitemloo.item.biblio %]
192
                    <td class="tf-location"><span class="shelvingloc">[% trsfitemloo.location | html %]</span></td>
192
                        </a>
193
                    <td class="tf-itemcallnumber">[% trsfitemloo.itemcallnumber | html %]</td>
193
                    </td>
194
                    <td class="tf-itemtype">[% ItemTypes.GetDescription( trsfitemloo.itemtype ) | html %]</td>
194
                    <td class="tf-author">[% trsfitemloo.item.biblio.author | html %]</td>
195
                    <td class="tf-ccode">[% AuthorisedValues.GetByCode( 'CCODE', trsfitemloo.ccode ) | html %]</td>
195
                    <td class="tf-barcode"><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% trsfitemloo.item.biblionumber | uri %]&amp;itemnumber=[% trsfitemloo.item.itemnumber | uri %]#item[% trsfitemloo.item.itemnumber | uri %]">[% trsfitemloo.item.barcode | html %]</a></td>
196
                    <td class="tf-location"><span class="shelvingloc">[% AuthorisedValues.GetByCode( 'LOC', trsfitemloo.item.location ) | html %]</span></td>
197
                    <td class="tf-itemcallnumber">[% trsfitemloo.item.itemcallnumber | html %]</td>
198
                    <td class="tf-itemtype">[% ItemTypes.GetDescription( trsfitemloo.item.effective_itemtype ) | html %]</td>
199
                    <td class="tf-ccode">[% AuthorisedValues.GetByCode( 'CCODE', trsfitemloo.item.ccode ) | html %]</td>
196
                    <td class="tf-destination">[% Branches.GetName( trsfitemloo.tobrcd ) | html %]</td>
200
                    <td class="tf-destination">[% Branches.GetName( trsfitemloo.tobrcd ) | html %]</td>
197
                </tr>
201
                </tr>
198
            [% END %]
202
            [% END %]
199
- 

Return to bug 25868