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

(-)a/C4/Reserves.pm (-4 / +8 lines)
Lines 764-782 SELECT COUNT(*) FROM reserves WHERE biblionumber=? AND borrowernumber<>? Link Here
764
    my $dbh = C4::Context->dbh;
764
    my $dbh = C4::Context->dbh;
765
    my ( $fee ) = $dbh->selectrow_array( $borquery, undef, ($borrowernumber) );
765
    my ( $fee ) = $dbh->selectrow_array( $borquery, undef, ($borrowernumber) );
766
    my $hold_fee_mode = C4::Context->preference('HoldFeeMode') || 'not_always';
766
    my $hold_fee_mode = C4::Context->preference('HoldFeeMode') || 'not_always';
767
    if( $fee and $fee > 0 and $hold_fee_mode eq 'not_always' ) {
767
    if( $fee and $fee > 0 and ( $hold_fee_mode eq 'not_always' or $hold_fee_mode eq 'issued_or_reserved' ) ) {
768
        # This is a reconstruction of the old code:
768
        # This is a reconstruction of the old code:
769
        # Compare number of items with items issued, and optionally check holds
769
        # Compare number of items with items issued, and optionally check holds
770
        # If not all items are issued and there are no holds: charge no fee
770
        # not_always = If not all items are issued and there are no holds: charge no fee
771
        # issued_or_reserved = If all items are issued, OR there are holds: charge fee
771
        # NOTE: Lost, damaged, not-for-loan, etc. are just ignored here
772
        # NOTE: Lost, damaged, not-for-loan, etc. are just ignored here
772
        my ( $notissued, $reserved );
773
        my ( $notissued, $reserved );
773
        ( $notissued ) = $dbh->selectrow_array( $issue_qry, undef,
774
        ( $notissued ) = $dbh->selectrow_array( $issue_qry, undef,
774
            ( $biblionumber ) );
775
            ( $biblionumber ) );
775
        if( $notissued == 0 ) {
776
        if( $notissued == 0 or $hold_fee_mode eq 'issued_or_reserved' ) {
776
            # all items are issued
777
            # all items are issued
777
            ( $reserved ) = $dbh->selectrow_array( $holds_qry, undef,
778
            ( $reserved ) = $dbh->selectrow_array( $holds_qry, undef,
778
                ( $biblionumber, $borrowernumber ) );
779
                ( $biblionumber, $borrowernumber ) );
779
            $fee = 0 if $reserved == 0;
780
            if ( $reserved == 0 and $hold_fee_mode eq 'not_always' ) {
781
                # no reserves are placed
782
                $fee = 0;
783
            }
780
        } else {
784
        } else {
781
            $fee = 0;
785
            $fee = 0;
782
        }
786
        }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +1 lines)
Lines 1124-1129 Circulation: Link Here
1124
              choices:
1124
              choices:
1125
                  any_time_is_placed: "any time a hold is placed."
1125
                  any_time_is_placed: "any time a hold is placed."
1126
                  not_always: "only if all items are checked out and the record has at least one hold already."
1126
                  not_always: "only if all items are checked out and the record has at least one hold already."
1127
                  issued_or_reserved: "either if all items are checked out, or the record has at least one hold already."
1127
                  any_time_is_collected: "any time a hold is collected."
1128
                  any_time_is_collected: "any time a hold is collected."
1128
        -
1129
        -
1129
            - pref: useDefaultReplacementCost
1130
            - pref: useDefaultReplacementCost
1130
- 

Return to bug 32142