Lines 70-76
FIXME : if no replacement price, borrower just doesn't get charged?
Link Here
|
70 |
sub chargelostitem { |
70 |
sub chargelostitem { |
71 |
my $dbh = C4::Context->dbh(); |
71 |
my $dbh = C4::Context->dbh(); |
72 |
my ($borrowernumber, $itemnumber, $amount, $description) = @_; |
72 |
my ($borrowernumber, $itemnumber, $amount, $description) = @_; |
73 |
my $itype = Koha::ItemTypes->find({ itemtype => Koha::Items->find($itemnumber)->effective_itemtype() }); |
73 |
my $item = Koha::Items->find($itemnumber); |
|
|
74 |
my $itype = Koha::ItemTypes->find({ itemtype => $item->effective_itemtype() }); |
74 |
my $replacementprice = $amount; |
75 |
my $replacementprice = $amount; |
75 |
my $defaultreplacecost = $itype->defaultreplacecost; |
76 |
my $defaultreplacecost = $itype->defaultreplacecost; |
76 |
my $processfee = $itype->processfee; |
77 |
my $processfee = $itype->processfee; |
Lines 80-85
sub chargelostitem {
Link Here
|
80 |
$replacementprice = $defaultreplacecost; |
81 |
$replacementprice = $defaultreplacecost; |
81 |
} |
82 |
} |
82 |
my $checkout = Koha::Checkouts->find({ itemnumber => $itemnumber }); |
83 |
my $checkout = Koha::Checkouts->find({ itemnumber => $itemnumber }); |
|
|
84 |
if ( !$checkout && $item->in_bundle ) { |
85 |
my $host = $item->bundle_host; |
86 |
$checkout = $host->checkout; |
87 |
} |
83 |
my $issue_id = $checkout ? $checkout->issue_id : undef; |
88 |
my $issue_id = $checkout ? $checkout->issue_id : undef; |
84 |
|
89 |
|
85 |
my $account = Koha::Account->new({ patron_id => $borrowernumber }); |
90 |
my $account = Koha::Account->new({ patron_id => $borrowernumber }); |