Lines 1468-1481
sub AddIssue {
Link Here
|
1468 |
# If it costs to borrow this book, charge it to the patron's account. |
1468 |
# If it costs to borrow this book, charge it to the patron's account. |
1469 |
my ( $charge, $itemtype ) = GetIssuingCharges( $item_object->itemnumber, $borrower->{'borrowernumber'} ); |
1469 |
my ( $charge, $itemtype ) = GetIssuingCharges( $item_object->itemnumber, $borrower->{'borrowernumber'} ); |
1470 |
if ( $charge > 0 ) { |
1470 |
if ( $charge > 0 ) { |
1471 |
AddIssuingCharge( $issue, $charge, 'rent' ); |
1471 |
AddIssuingCharge( $issue, $charge, 'RENT' ); |
1472 |
} |
1472 |
} |
1473 |
|
1473 |
|
1474 |
my $itemtype_object = Koha::ItemTypes->find( $item_object->effective_itemtype ); |
1474 |
my $itemtype_object = Koha::ItemTypes->find( $item_object->effective_itemtype ); |
1475 |
if ( $itemtype_object ) { |
1475 |
if ( $itemtype_object ) { |
1476 |
my $accumulate_charge = $fees->accumulate_rentalcharge(); |
1476 |
my $accumulate_charge = $fees->accumulate_rentalcharge(); |
1477 |
if ( $accumulate_charge > 0 ) { |
1477 |
if ( $accumulate_charge > 0 ) { |
1478 |
AddIssuingCharge( $issue, $accumulate_charge, 'rent_daily' ) if $accumulate_charge > 0; |
1478 |
AddIssuingCharge( $issue, $accumulate_charge, 'RENT_DAILY' ) if $accumulate_charge > 0; |
1479 |
$charge += $accumulate_charge; |
1479 |
$charge += $accumulate_charge; |
1480 |
$item_unblessed->{charge} = $charge; |
1480 |
$item_unblessed->{charge} = $charge; |
1481 |
} |
1481 |
} |
Lines 2908-2914
sub AddRenewal {
Link Here
|
2908 |
# Charge a new rental fee, if applicable |
2908 |
# Charge a new rental fee, if applicable |
2909 |
my ( $charge, $type ) = GetIssuingCharges( $itemnumber, $borrowernumber ); |
2909 |
my ( $charge, $type ) = GetIssuingCharges( $itemnumber, $borrowernumber ); |
2910 |
if ( $charge > 0 ) { |
2910 |
if ( $charge > 0 ) { |
2911 |
AddIssuingCharge($issue, $charge, 'rent_renew'); |
2911 |
AddIssuingCharge($issue, $charge, 'RENT_RENEW'); |
2912 |
} |
2912 |
} |
2913 |
|
2913 |
|
2914 |
# Charge a new accumulate rental fee, if applicable |
2914 |
# Charge a new accumulate rental fee, if applicable |
Lines 2916-2922
sub AddRenewal {
Link Here
|
2916 |
if ( $itemtype_object ) { |
2916 |
if ( $itemtype_object ) { |
2917 |
my $accumulate_charge = $fees->accumulate_rentalcharge(); |
2917 |
my $accumulate_charge = $fees->accumulate_rentalcharge(); |
2918 |
if ( $accumulate_charge > 0 ) { |
2918 |
if ( $accumulate_charge > 0 ) { |
2919 |
AddIssuingCharge( $issue, $accumulate_charge, 'rent_daily_renew' ) |
2919 |
AddIssuingCharge( $issue, $accumulate_charge, 'RENT_DAILY_RENEW' ) |
2920 |
} |
2920 |
} |
2921 |
$charge += $accumulate_charge; |
2921 |
$charge += $accumulate_charge; |
2922 |
} |
2922 |
} |