|
Lines 1441-1458
sub AddIssue {
Link Here
|
| 1441 |
C4::Reserves::MoveReserve( $item_object->itemnumber, $borrower->{'borrowernumber'}, $cancelreserve ); |
1441 |
C4::Reserves::MoveReserve( $item_object->itemnumber, $borrower->{'borrowernumber'}, $cancelreserve ); |
| 1442 |
|
1442 |
|
| 1443 |
# Starting process for transfer job (checking transfert and validate it if we have one) |
1443 |
# Starting process for transfer job (checking transfert and validate it if we have one) |
| 1444 |
my ($datesent) = GetTransfers( $item_object->itemnumber ); |
1444 |
if ( my $transfer = $item_object->get_transfer ) { |
| 1445 |
if ($datesent) { |
|
|
| 1446 |
# updating line of branchtranfert to finish it, and changing the to branch value, implement a comment for visibility of this case (maybe for stats ....) |
1445 |
# updating line of branchtranfert to finish it, and changing the to branch value, implement a comment for visibility of this case (maybe for stats ....) |
| 1447 |
my $sth = $dbh->prepare( |
1446 |
$transfer->set( |
| 1448 |
"UPDATE branchtransfers |
1447 |
{ |
| 1449 |
SET datearrived = now(), |
1448 |
datearrived => dt_from_string, |
| 1450 |
tobranch = ?, |
1449 |
tobranch => C4::Context->userenv->{branch}, |
| 1451 |
comments = 'Forced branchtransfer' |
1450 |
comments => 'Forced branchtransfer' |
| 1452 |
WHERE itemnumber= ? AND datearrived IS NULL" |
1451 |
} |
| 1453 |
); |
1452 |
)->store; |
| 1454 |
$sth->execute( C4::Context->userenv->{'branch'}, |
1453 |
if ( $transfer->reason eq 'Reserve' ) { |
| 1455 |
$item_object->itemnumber ); |
1454 |
my $hold = $item_object->holds->search( { found => 'T' } )->next; |
|
|
1455 |
if ( $hold ) { # Is this really needed? |
| 1456 |
$hold->set( { found => undef } )->store; |
| 1457 |
C4::Reserves::ModReserveMinusPriority($item_object->itemnumber, $hold->reserve_id); |
| 1458 |
} |
| 1459 |
} |
| 1456 |
} |
1460 |
} |
| 1457 |
|
1461 |
|
| 1458 |
# If automatic renewal wasn't selected while issuing, set the value according to the issuing rule. |
1462 |
# If automatic renewal wasn't selected while issuing, set the value according to the issuing rule. |
| 1459 |
- |
|
|