|
Lines 126-131
sub suspend_hold {
Link Here
|
| 126 |
Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue( { biblio_ids => [ $self->biblionumber ] } ) |
126 |
Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue( { biblio_ids => [ $self->biblionumber ] } ) |
| 127 |
if C4::Context->preference('RealTimeHoldsQueue'); |
127 |
if C4::Context->preference('RealTimeHoldsQueue'); |
| 128 |
|
128 |
|
|
|
129 |
# Remove from holds queue if present |
| 130 |
my $dbh = $self->_result->result_source->schema->storage->dbh; |
| 131 |
$dbh->do( |
| 132 |
q{ |
| 133 |
DELETE q, t |
| 134 |
FROM tmp_holdsqueue q |
| 135 |
INNER JOIN hold_fill_targets t |
| 136 |
ON q.borrowernumber = t.borrowernumber |
| 137 |
AND q.biblionumber = t.biblionumber |
| 138 |
AND q.itemnumber = t.itemnumber |
| 139 |
AND q.item_level_request = t.item_level_request |
| 140 |
AND q.holdingbranch = t.source_branchcode |
| 141 |
WHERE t.reserve_id = ? |
| 142 |
}, undef, $self->id |
| 143 |
); |
| 144 |
|
| 129 |
return $self; |
145 |
return $self; |
| 130 |
} |
146 |
} |
| 131 |
|
147 |
|
| 132 |
- |
|
|