Lines 511-516
sub handle_checkout {
Link Here
|
511 |
|
511 |
|
512 |
$patron_id = $fields->{(FID_PATRON_ID)}; |
512 |
$patron_id = $fields->{(FID_PATRON_ID)}; |
513 |
$item_id = $fields->{(FID_ITEM_ID)}; |
513 |
$item_id = $fields->{(FID_ITEM_ID)}; |
|
|
514 |
my $fee_ack = $fields->{(FID_FEE_ACK)}; |
514 |
|
515 |
|
515 |
|
516 |
|
516 |
if ($no_block eq 'Y') { |
517 |
if ($no_block eq 'Y') { |
Lines 525-531
sub handle_checkout {
Link Here
|
525 |
} else { |
526 |
} else { |
526 |
# Does the transaction date really matter for items that are |
527 |
# Does the transaction date really matter for items that are |
527 |
# checkout out while the terminal is online? I'm guessing 'no' |
528 |
# checkout out while the terminal is online? I'm guessing 'no' |
528 |
$status = $ils->checkout($patron_id, $item_id, $sc_renewal_policy); |
529 |
$status = $ils->checkout($patron_id, $item_id, $sc_renewal_policy, $fee_ack); |
529 |
} |
530 |
} |
530 |
|
531 |
|
531 |
$item = $status->item; |
532 |
$item = $status->item; |
Lines 567-583
sub handle_checkout {
Link Here
|
567 |
$resp .= maybe_add(FID_MEDIA_TYPE, $item->sip_media_type); |
568 |
$resp .= maybe_add(FID_MEDIA_TYPE, $item->sip_media_type); |
568 |
$resp .= maybe_add(FID_ITEM_PROPS, $item->sip_item_properties); |
569 |
$resp .= maybe_add(FID_ITEM_PROPS, $item->sip_item_properties); |
569 |
|
570 |
|
570 |
# Financials |
|
|
571 |
if ($status->fee_amount) { |
572 |
$resp .= add_field(FID_FEE_AMT, $status->fee_amount); |
573 |
$resp .= maybe_add(FID_CURRENCY, $status->sip_currency); |
574 |
$resp .= maybe_add(FID_FEE_TYPE, $status->sip_fee_type); |
575 |
$resp .= maybe_add(FID_TRANSACTION_ID, |
576 |
$status->transaction_id); |
577 |
} |
571 |
} |
578 |
} |
572 |
} |
579 |
|
573 |
|
580 |
} else { |
574 |
else { |
581 |
# Checkout failed |
575 |
# Checkout failed |
582 |
# Checkout Response: not ok, no renewal, don't know mag. media, |
576 |
# Checkout Response: not ok, no renewal, don't know mag. media, |
583 |
# no desensitize |
577 |
# no desensitize |
Lines 607-612
sub handle_checkout {
Link Here
|
607 |
} |
601 |
} |
608 |
} |
602 |
} |
609 |
} |
603 |
} |
|
|
604 |
if ($protocol_version >= 2) { |
605 |
# Financials : return irrespective of ok status |
606 |
if ($status->fee_amount) { |
607 |
$resp .= add_field(FID_FEE_AMT, $status->fee_amount); |
608 |
$resp .= maybe_add(FID_CURRENCY, $status->sip_currency); |
609 |
$resp .= maybe_add(FID_FEE_TYPE, $status->sip_fee_type); |
610 |
$resp .= maybe_add(FID_TRANSACTION_ID, |
611 |
$status->transaction_id); |
612 |
} |
613 |
} |
610 |
|
614 |
|
611 |
$self->write_msg($resp,undef,$server->{account}->{terminator},$server->{account}->{encoding}); |
615 |
$self->write_msg($resp,undef,$server->{account}->{terminator},$server->{account}->{encoding}); |
612 |
return(CHECKOUT); |
616 |
return(CHECKOUT); |
613 |
- |
|
|