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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc (-1 / +2 lines)
Lines 186-191 Link Here
186
                        [%- IF ( hold.atdestination ) -%]
186
                        [%- IF ( hold.atdestination ) -%]
187
                            Item waiting at <strong> [% hold.wbrname | html %]</strong>[% IF hold.desk_name %], [% hold.desk_name | html %],[% END %] since [% hold.waiting_date | $KohaDates %]
187
                            Item waiting at <strong> [% hold.wbrname | html %]</strong>[% IF hold.desk_name %], [% hold.desk_name | html %],[% END %] since [% hold.waiting_date | $KohaDates %]
188
                        [%- ELSIF (hold.intransit) -%]
188
                        [%- ELSIF (hold.intransit) -%]
189
                            <input type="hidden" name="transfer-destination" value="[% hold.wbrname | html %]" />
189
                            Item being transferred to <strong> [% hold.wbrname | html %]</strong>
190
                            Item being transferred to <strong> [% hold.wbrname | html %]</strong>
190
                        [%- ELSIF (hold.inprocessing) -%]
191
                        [%- ELSIF (hold.inprocessing) -%]
191
                            Item being processed at <strong> [% hold.wbrname | html %]</strong>
192
                            Item being processed at <strong> [% hold.wbrname | html %]</strong>
Lines 299-305 Link Here
299
                    [%- END -%]
300
                    [%- END -%]
300
                [%- END -%]
301
                [%- END -%]
301
                <td>
302
                <td>
302
                    <a class="cancel-hold" title="Cancel hold" data-borrowernumber="[% hold.borrowernumber | html %]" data-biblionumber="[% hold.biblionumber | html %]" data-id="[% hold.reserve_id | html %]" data-transfer="[% hold.transfer | html %]" href="#">
303
                    <a class="cancel-hold" title="Cancel hold" data-borrowernumber="[% hold.borrowernumber | html %]" data-biblionumber="[% hold.biblionumber | html %]" data-id="[% hold.reserve_id | html %]" data-transfer="[% hold.transfer | html %]" data-transfer-date="[% hold.transferdate %]" data-transfer-from="[% Branches.GetName( hold.transferfrom) %]" data-transfer-to="[% Branches.GetName(hold.transferto) %]" href="#">
303
                        <i class="fa fa-trash" aria-label="Cancel hold"></i>
304
                        <i class="fa fa-trash" aria-label="Cancel hold"></i>
304
                    </a>
305
                    </a>
305
                </td>
306
                </td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-3 / +13 lines)
Lines 1406-1411 Link Here
1406
                            </select>
1406
                            </select>
1407
                        [% END %]
1407
                        [% END %]
1408
                    </fieldset>
1408
                    </fieldset>
1409
                    </br>
1409
                    <div id=transfer-cancellation></div>
1410
                    <div id=transfer-cancellation></div>
1410
                </div>
1411
                </div>
1411
1412
Lines 1796-1808 Link Here
1796
                    let reserve_id = cancel_link.data('id');
1797
                    let reserve_id = cancel_link.data('id');
1797
                    let biblionumber = cancel_link.data('biblionumber');
1798
                    let biblionumber = cancel_link.data('biblionumber');
1798
                    let transfer = cancel_link.data('transfer');
1799
                    let transfer = cancel_link.data('transfer');
1800
                    let transferTo = cancel_link.data('transfer-to');
1801
                    let transferFrom = cancel_link.data('transfer-from');
1802
                    let transferDate = cancel_link.data('transfer-date');
1799
                    $("#cancel_modal_form #inputs").append('<input type="hidden" name="reserve_id" value="' + reserve_id + '">');
1803
                    $("#cancel_modal_form #inputs").append('<input type="hidden" name="reserve_id" value="' + reserve_id + '">');
1800
                    $("#cancel_modal_form #inputs").append('<input type="hidden" name="biblionumber" value="' + biblionumber + '">');
1804
                    $("#cancel_modal_form #inputs").append('<input type="hidden" name="biblionumber" value="' + biblionumber + '">');
1801
                    $("#cancel_modal_form #inputs").append('<input type="hidden" name="op" value="cud-cancel">');
1805
                    $("#cancel_modal_form #inputs").append('<input type="hidden" name="op" value="cud-cancel">');
1802
                    if(transfer){
1806
                    if(transfer){
1803
                        $("#transfer-cancellation").empty()
1807
                        let transferElement = $("#transfer-cancellation");
1804
                        $("#transfer-cancellation").append('<label for="transfer-cancel">A transfer related to this hold has been detected, do you want to cancel it ?</label>');
1808
                        transferElement.empty();
1805
                        $("#transfer-cancellation").append('<input type="checkbox" id="transfer-cancel" name="transfer-cancel"> </input>');
1809
                        transferElement[0].classList.add("alert", "alert-warning", "audio-alert-warning");
1810
                        transferElement.append('<h3>A transfer related to this hold has been detected</h3>');
1811
                        transferElement.append('<b> Date: </b>' + transferDate + '</br>');
1812
                        transferElement.append('<b>From: </b>' + transferFrom + '</br>');
1813
                        transferElement.append('<b>To: </b>' + transferTo + '</br>');
1814
                                transferElement.append('<label for="transfer-cancel"><b>Delete this transfer: </b></label>');
1815
                        transferElement.append('<input type="checkbox" id="transfer-cancel" name="transfer-cancel"> </input>');
1806
                    }
1816
                    }
1807
                $('#cancelModal').modal('show');
1817
                $('#cancelModal').modal('show');
1808
                return false;
1818
                return false;
(-)a/reserve/request.pl (-1 / +7 lines)
Lines 116-121 if ( $op eq 'cud-move' ) { Link Here
116
    my $hold                = Koha::Holds->find($reserve_id);
116
    my $hold                = Koha::Holds->find($reserve_id);
117
117
118
    if( $transfer ) {
118
    if( $transfer ) {
119
        warn "Cancelling Transfer";
119
        warn($hold->item()->get_transfer);
120
        warn($hold->item()->get_transfer);
120
        $hold->item()->get_transfer->cancel( { reason => 'Manual', 'force' => '1' } );
121
        $hold->item()->get_transfer->cancel( { reason => 'Manual', 'force' => '1' } );
121
    }
122
    }
Lines 648-653 if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold ) Link Here
648
                    $reserve{'inprocessing'}  = $res->is_in_processing();
649
                    $reserve{'inprocessing'}  = $res->is_in_processing();
649
                    $reserve{'intransit'}     = $res->is_in_transit();
650
                    $reserve{'intransit'}     = $res->is_in_transit();
650
                    $reserve{'transfer'}      = $res->item()->get_transfer() ? '1' : '0';
651
                    $reserve{'transfer'}      = $res->item()->get_transfer() ? '1' : '0';
652
                    my $transfer = $res->item()->get_transfer();
653
                    if ($transfer){
654
                        $reserve{'transferdate'}  = $transfer->datesent;
655
                        $reserve{'transferfrom'}  = $transfer->frombranch;
656
                        $reserve{'transferto'}    = $transfer->tobranch;
657
                    }
651
                } elsif ( $res->priority() > 0 ) {
658
                } elsif ( $res->priority() > 0 ) {
652
                    if ( my $item = $res->item() ) {
659
                    if ( my $item = $res->item() ) {
653
                        $reserve{'itemnumber'}      = $item->id();
660
                        $reserve{'itemnumber'}      = $item->id();
654
- 

Return to bug 34756