Lines 1399-1405
sub AddIssue {
Link Here
|
1399 |
datelastborrowed => DateTime->now( time_zone => C4::Context->tz() )->ymd(), |
1399 |
datelastborrowed => DateTime->now( time_zone => C4::Context->tz() )->ymd(), |
1400 |
}, |
1400 |
}, |
1401 |
$item->{'biblionumber'}, |
1401 |
$item->{'biblionumber'}, |
1402 |
$item->{'itemnumber'} |
1402 |
$item->{'itemnumber'}, |
|
|
1403 |
0 |
1403 |
); |
1404 |
); |
1404 |
ModDateLastSeen( $item->{'itemnumber'} ); |
1405 |
ModDateLastSeen( $item->{'itemnumber'} ); |
1405 |
|
1406 |
|
Lines 1832-1838
sub AddReturn {
Link Here
|
1832 |
$item->{location} = $item->{permanent_location}; |
1833 |
$item->{location} = $item->{permanent_location}; |
1833 |
} |
1834 |
} |
1834 |
|
1835 |
|
1835 |
ModItem( $item, $item->{'biblionumber'}, $item->{'itemnumber'} ); |
1836 |
ModItem( $item, $item->{'biblionumber'}, $item->{'itemnumber'}, 0 ); |
1836 |
} |
1837 |
} |
1837 |
|
1838 |
|
1838 |
# full item data, but no borrowernumber or checkout info (no issue) |
1839 |
# full item data, but no borrowernumber or checkout info (no issue) |
Lines 1856-1862
sub AddReturn {
Link Here
|
1856 |
foreach my $key ( keys %$rules ) { |
1857 |
foreach my $key ( keys %$rules ) { |
1857 |
if ( $item->{notforloan} eq $key ) { |
1858 |
if ( $item->{notforloan} eq $key ) { |
1858 |
$messages->{'NotForLoanStatusUpdated'} = { from => $item->{notforloan}, to => $rules->{$key} }; |
1859 |
$messages->{'NotForLoanStatusUpdated'} = { from => $item->{notforloan}, to => $rules->{$key} }; |
1859 |
ModItem( { notforloan => $rules->{$key} }, undef, $itemnumber ); |
1860 |
ModItem( { notforloan => $rules->{$key} }, undef, $itemnumber, 0 ); |
1860 |
last; |
1861 |
last; |
1861 |
} |
1862 |
} |
1862 |
} |
1863 |
} |
Lines 1922-1928
sub AddReturn {
Link Here
|
1922 |
|
1923 |
|
1923 |
} |
1924 |
} |
1924 |
|
1925 |
|
1925 |
ModItem({ onloan => undef }, $item->{biblionumber}, $item->{'itemnumber'}); |
1926 |
ModItem( { onloan => undef }, $item->{biblionumber}, $item->{itemnumber}, 0 ); |
1926 |
} |
1927 |
} |
1927 |
|
1928 |
|
1928 |
# the holdingbranch is updated if the document is returned to another location. |
1929 |
# the holdingbranch is updated if the document is returned to another location. |
Lines 2158-2164
sub MarkIssueReturned {
Link Here
|
2158 |
# And finally delete the issue |
2159 |
# And finally delete the issue |
2159 |
$issue->delete; |
2160 |
$issue->delete; |
2160 |
|
2161 |
|
2161 |
ModItem( { 'onloan' => undef }, undef, $itemnumber ); |
2162 |
ModItem( { 'onloan' => undef }, undef, $itemnumber, 0 ); |
2162 |
|
2163 |
|
2163 |
if ( C4::Context->preference('StoreLastBorrower') ) { |
2164 |
if ( C4::Context->preference('StoreLastBorrower') ) { |
2164 |
my $item = Koha::Items->find( $itemnumber ); |
2165 |
my $item = Koha::Items->find( $itemnumber ); |
Lines 2397-2403
sub _FixAccountForLostAndReturned {
Link Here
|
2397 |
} |
2398 |
} |
2398 |
); |
2399 |
); |
2399 |
|
2400 |
|
2400 |
ModItem( { paidfor => '' }, undef, $itemnumber ); |
2401 |
ModItem( { paidfor => '' }, undef, $itemnumber, 0 ); |
2401 |
|
2402 |
|
2402 |
return $credit_id; |
2403 |
return $credit_id; |
2403 |
} |
2404 |
} |
Lines 2822-2828
sub AddRenewal {
Link Here
|
2822 |
|
2823 |
|
2823 |
# Update the renewal count on the item, and tell zebra to reindex |
2824 |
# Update the renewal count on the item, and tell zebra to reindex |
2824 |
$renews = $item->{renewals} + 1; |
2825 |
$renews = $item->{renewals} + 1; |
2825 |
ModItem({ renewals => $renews, onloan => $datedue->strftime('%Y-%m-%d %H:%M')}, $item->{biblionumber}, $itemnumber); |
2826 |
ModItem( { renewals => $renews, onloan => $datedue->strftime('%Y-%m-%d %H:%M')}, $item->{biblionumber}, $itemnumber, 0 ); |
2826 |
|
2827 |
|
2827 |
# Charge a new rental fee, if applicable? |
2828 |
# Charge a new rental fee, if applicable? |
2828 |
my ( $charge, $type ) = GetIssuingCharges( $itemnumber, $borrowernumber ); |
2829 |
my ( $charge, $type ) = GetIssuingCharges( $itemnumber, $borrowernumber ); |
Lines 3701-3707
sub ProcessOfflineReturn {
Link Here
|
3701 |
ModItem( |
3702 |
ModItem( |
3702 |
{ renewals => 0, onloan => undef }, |
3703 |
{ renewals => 0, onloan => undef }, |
3703 |
$issue->{'biblionumber'}, |
3704 |
$issue->{'biblionumber'}, |
3704 |
$itemnumber |
3705 |
$itemnumber, |
|
|
3706 |
0 |
3705 |
); |
3707 |
); |
3706 |
return "Success."; |
3708 |
return "Success."; |
3707 |
} else { |
3709 |
} else { |