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

(-)a/C4/Reserves.pm (-13 / +15 lines)
Lines 906-913 sub ModReserve { Link Here
906
906
907
    my $rank = $params->{'rank'};
907
    my $rank = $params->{'rank'};
908
    my $reserve_id = $params->{'reserve_id'};
908
    my $reserve_id = $params->{'reserve_id'};
909
    my $reservedate = $params->{reservedate} || undef;
910
    my $expirationdate = $params->{expirationdate} || undef;
911
    my $branchcode = $params->{'branchcode'};
909
    my $branchcode = $params->{'branchcode'};
912
    my $itemnumber = $params->{'itemnumber'};
910
    my $itemnumber = $params->{'itemnumber'};
913
    my $suspend_until = $params->{'suspend_until'};
911
    my $suspend_until = $params->{'suspend_until'};
Lines 936-952 sub ModReserve { Link Here
936
        logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, Dumper($hold->unblessed) )
934
        logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, Dumper($hold->unblessed) )
937
            if C4::Context->preference('HoldsLog');
935
            if C4::Context->preference('HoldsLog');
938
936
939
        $hold->set(
937
        my $properties = {
940
            {
938
            priority    => $rank,
941
                priority    => $rank,
939
            branchcode  => $branchcode,
942
                reservedate => $reservedate,
940
            itemnumber  => $itemnumber,
943
                expirationdate => $expirationdate,
941
            found       => undef,
944
                branchcode  => $branchcode,
942
            waitingdate => undef
945
                itemnumber  => $itemnumber,
943
        };
946
                found       => undef,
944
        if (exists $params->{reservedate}) {
947
                waitingdate => undef
945
            $properties->{reservedate} = $params->{reservedate} || undef;
948
            }
946
        }
949
        )->store();
947
        if (exists $params->{expirationdate}) {
948
            $properties->{expirationdate} = $params->{expirationdate} || undef;
949
        }
950
951
        $hold->set($properties)->store();
950
952
951
        if ( defined( $suspend_until ) ) {
953
        if ( defined( $suspend_until ) ) {
952
            if ( $suspend_until ) {
954
            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