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

(-)a/C4/Reserves.pm (-13 / +15 lines)
Lines 908-915 sub ModReserve { Link Here
908
908
909
    my $rank = $params->{'rank'};
909
    my $rank = $params->{'rank'};
910
    my $reserve_id = $params->{'reserve_id'};
910
    my $reserve_id = $params->{'reserve_id'};
911
    my $reservedate = $params->{reservedate} || undef;
912
    my $expirationdate = $params->{expirationdate} || undef;
913
    my $branchcode = $params->{'branchcode'};
911
    my $branchcode = $params->{'branchcode'};
914
    my $itemnumber = $params->{'itemnumber'};
912
    my $itemnumber = $params->{'itemnumber'};
915
    my $suspend_until = $params->{'suspend_until'};
913
    my $suspend_until = $params->{'suspend_until'};
Lines 938-954 sub ModReserve { Link Here
938
        logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, Dumper($hold->unblessed) )
936
        logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, Dumper($hold->unblessed) )
939
            if C4::Context->preference('HoldsLog');
937
            if C4::Context->preference('HoldsLog');
940
938
941
        $hold->set(
939
        my $properties = {
942
            {
940
            priority    => $rank,
943
                priority    => $rank,
941
            branchcode  => $branchcode,
944
                reservedate => $reservedate,
942
            itemnumber  => $itemnumber,
945
                expirationdate => $expirationdate,
943
            found       => undef,
946
                branchcode  => $branchcode,
944
            waitingdate => undef
947
                itemnumber  => $itemnumber,
945
        };
948
                found       => undef,
946
        if (exists $params->{reservedate}) {
949
                waitingdate => undef
947
            $properties->{reservedate} = $params->{reservedate} || undef;
950
            }
948
        }
951
        )->store();
949
        if (exists $params->{expirationdate}) {
950
            $properties->{expirationdate} = $params->{expirationdate} || undef;
951
        }
952
953
        $hold->set($properties)->store();
952
954
953
        if ( defined( $suspend_until ) ) {
955
        if ( defined( $suspend_until ) ) {
954
            if ( $suspend_until ) {
956
            if ( $suspend_until ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc (-1 / +7 lines)
Lines 106-112 Link Here
106
            </td>
106
            </td>
107
107
108
            <td>[% hold.notes | html %]</td>
108
            <td>[% hold.notes | html %]</td>
109
            <td><input type="date" value="[% hold.date | html %]" required name="reservedate"></td>
109
            <td>
110
                [% IF Koha.Preference('AllowHoldDateInFuture') %]
111
                    <input type="date" value="[% hold.date | html %]" required name="reservedate">
112
                [% ELSE %]
113
                    [% hold.date | $KohaDates %]
114
                [% END %]
115
            </td>
110
            <td><input type="date" value="[% hold.expirationdate | html %]" name="expirationdate"></td>
116
            <td><input type="date" value="[% hold.expirationdate | html %]" name="expirationdate"></td>
111
117
112
            <td>
118
            <td>
(-)a/reserve/modrequest.pl (-4 / +7 lines)
Lines 69-83 if ($CancelBorrowerNumber) { Link Here
69
else {
69
else {
70
    for (my $i=0;$i<$count;$i++){
70
    for (my $i=0;$i<$count;$i++){
71
        undef $itemnumber[$i] if !$itemnumber[$i];
71
        undef $itemnumber[$i] if !$itemnumber[$i];
72
        ModReserve({
72
        my $params = {
73
            rank => $rank[$i],
73
            rank => $rank[$i],
74
            reserve_id => $reserve_id[$i],
74
            reserve_id => $reserve_id[$i],
75
            reservedate => $reservedates[$i],
76
            expirationdate => $expirationdates[$i],
75
            expirationdate => $expirationdates[$i],
77
            branchcode => $branch[$i],
76
            branchcode => $branch[$i],
78
            itemnumber => $itemnumber[$i],
77
            itemnumber => $itemnumber[$i],
79
            suspend_until => $suspend_until[$i]
78
            suspend_until => $suspend_until[$i]
80
        });
79
        };
80
        if (C4::Context->preference('AllowHoldDateInFuture')) {
81
            $params->{reservedate} = $reservedates[$i];
82
        }
83
84
        ModReserve($params);
81
    }
85
    }
82
}
86
}
83
87
84
- 

Return to bug 22922