Lines 3083-3088
fallback to a true value
Link Here
|
3083 |
|
3083 |
|
3084 |
C<$automatic> is a boolean flag indicating the renewal was triggered automatically and not by a person ( librarian or patron ) |
3084 |
C<$automatic> is a boolean flag indicating the renewal was triggered automatically and not by a person ( librarian or patron ) |
3085 |
|
3085 |
|
|
|
3086 |
C<$skip_record_index> is an optional boolean flag to indicate whether queuing the search indexing |
3087 |
should be skipped for this renewal. |
3088 |
|
3086 |
=cut |
3089 |
=cut |
3087 |
|
3090 |
|
3088 |
sub AddRenewal { |
3091 |
sub AddRenewal { |
Lines 3094-3099
sub AddRenewal {
Link Here
|
3094 |
my $skipfinecalc = shift; |
3097 |
my $skipfinecalc = shift; |
3095 |
my $seen = shift; |
3098 |
my $seen = shift; |
3096 |
my $automatic = shift; |
3099 |
my $automatic = shift; |
|
|
3100 |
my $skip_record_index = shift; |
3097 |
|
3101 |
|
3098 |
# Fallback on a 'seen' renewal |
3102 |
# Fallback on a 'seen' renewal |
3099 |
$seen = defined $seen && $seen == 0 ? 0 : 1; |
3103 |
$seen = defined $seen && $seen == 0 ? 0 : 1; |
Lines 3188-3194
sub AddRenewal {
Link Here
|
3188 |
$renews = ( $item_object->renewals || 0 ) + 1; |
3192 |
$renews = ( $item_object->renewals || 0 ) + 1; |
3189 |
$item_object->renewals($renews); |
3193 |
$item_object->renewals($renews); |
3190 |
$item_object->onloan($datedue); |
3194 |
$item_object->onloan($datedue); |
3191 |
# Don't index as we are in a transaction |
3195 |
# Don't index as we are in a transaction, skip hardcoded here |
3192 |
$item_object->store({ log_action => 0, skip_record_index => 1 }); |
3196 |
$item_object->store({ log_action => 0, skip_record_index => 1 }); |
3193 |
|
3197 |
|
3194 |
# Charge a new rental fee, if applicable |
3198 |
# Charge a new rental fee, if applicable |
Lines 3274-3282
sub AddRenewal {
Link Here
|
3274 |
} |
3278 |
} |
3275 |
}); |
3279 |
}); |
3276 |
}); |
3280 |
}); |
3277 |
# We index now, after the transaction is committed |
3281 |
|
3278 |
my $indexer = Koha::SearchEngine::Indexer->new({ index => $Koha::SearchEngine::BIBLIOS_INDEX }); |
3282 |
unless( $skip_record_index ){ |
3279 |
$indexer->index_records( $item_object->biblionumber, "specialUpdate", "biblioserver" ); |
3283 |
# We index now, after the transaction is committed |
|
|
3284 |
my $indexer = Koha::SearchEngine::Indexer->new({ index => $Koha::SearchEngine::BIBLIOS_INDEX }); |
3285 |
$indexer->index_records( $item_object->biblionumber, "specialUpdate", "biblioserver" ); |
3286 |
} |
3280 |
|
3287 |
|
3281 |
return $datedue; |
3288 |
return $datedue; |
3282 |
} |
3289 |
} |