Lines 19-24
use CGI qw ( -utf8 );
Link Here
|
19 |
use C4::Auth qw(&check_api_auth); |
19 |
use C4::Auth qw(&check_api_auth); |
20 |
|
20 |
|
21 |
use Koha::Patron::Attributes; |
21 |
use Koha::Patron::Attributes; |
|
|
22 |
use Koha::Plugins; |
22 |
use Koha::Items; |
23 |
use Koha::Items; |
23 |
|
24 |
|
24 |
use UNIVERSAL::can; |
25 |
use UNIVERSAL::can; |
Lines 519-524
sub handle_checkout {
Link Here
|
519 |
$fields = $self->{fields}; |
520 |
$fields = $self->{fields}; |
520 |
|
521 |
|
521 |
$patron_id = $fields->{ (FID_PATRON_ID) }; |
522 |
$patron_id = $fields->{ (FID_PATRON_ID) }; |
|
|
523 |
($patron_id) = Koha::Plugins->call('barcode_transform', 'patron', $patron_id ) || $patron_id; |
522 |
$item_id = $fields->{ (FID_ITEM_ID) }; |
524 |
$item_id = $fields->{ (FID_ITEM_ID) }; |
523 |
my $fee_ack = $fields->{ (FID_FEE_ACK) }; |
525 |
my $fee_ack = $fields->{ (FID_FEE_ACK) }; |
524 |
|
526 |
|
Lines 735-740
sub handle_block_patron {
Link Here
|
735 |
$patron_id = $fields->{ (FID_PATRON_ID) }; |
737 |
$patron_id = $fields->{ (FID_PATRON_ID) }; |
736 |
$terminal_pwd = $fields->{ (FID_TERMINAL_PWD) }; |
738 |
$terminal_pwd = $fields->{ (FID_TERMINAL_PWD) }; |
737 |
|
739 |
|
|
|
740 |
($patron_id) = Koha::Plugins->call('barcode_transform', 'patron', $patron_id ) || $patron_id; |
741 |
|
738 |
# Terminal passwords are different from account login |
742 |
# Terminal passwords are different from account login |
739 |
# passwords, but I have no idea what to do with them. So, |
743 |
# passwords, but I have no idea what to do with them. So, |
740 |
# I'll just ignore them for now. |
744 |
# I'll just ignore them for now. |
Lines 959-964
sub handle_patron_info {
Link Here
|
959 |
$start = $fields->{ (FID_START_ITEM) }; |
963 |
$start = $fields->{ (FID_START_ITEM) }; |
960 |
$end = $fields->{ (FID_END_ITEM) }; |
964 |
$end = $fields->{ (FID_END_ITEM) }; |
961 |
|
965 |
|
|
|
966 |
($patron_id) = Koha::Plugins->call('barcode_transform', 'patron', $patron_id ) || $patron_id; |
967 |
|
962 |
$patron = $ils->find_patron($patron_id); |
968 |
$patron = $ils->find_patron($patron_id); |
963 |
|
969 |
|
964 |
$resp = (PATRON_INFO_RESP); |
970 |
$resp = (PATRON_INFO_RESP); |
Lines 1116-1121
sub handle_fee_paid {
Link Here
|
1116 |
$fee_id = $fields->{ (FID_FEE_ID) }; |
1122 |
$fee_id = $fields->{ (FID_FEE_ID) }; |
1117 |
$trans_id = $fields->{ (FID_TRANSACTION_ID) }; |
1123 |
$trans_id = $fields->{ (FID_TRANSACTION_ID) }; |
1118 |
|
1124 |
|
|
|
1125 |
($patron_id) = Koha::Plugins->call('barcode_transform', 'patron', $patron_id ) || $patron_id; |
1126 |
|
1119 |
$ils->check_inst_id( $inst_id, "handle_fee_paid" ); |
1127 |
$ils->check_inst_id( $inst_id, "handle_fee_paid" ); |
1120 |
|
1128 |
|
1121 |
my $pay_result = $ils->pay_fee( $patron_id, $patron_pwd, $fee_amt, $fee_type, $pay_type, $fee_id, $trans_id, $currency, $is_writeoff, $disallow_overpayment, $register_id ); |
1129 |
my $pay_result = $ils->pay_fee( $patron_id, $patron_pwd, $fee_amt, $fee_type, $pay_type, $fee_id, $trans_id, $currency, $is_writeoff, $disallow_overpayment, $register_id ); |
Lines 1306-1311
sub handle_patron_enable {
Link Here
|
1306 |
$patron_id = $fields->{ (FID_PATRON_ID) }; |
1314 |
$patron_id = $fields->{ (FID_PATRON_ID) }; |
1307 |
$patron_pwd = $fields->{ (FID_PATRON_PWD) }; |
1315 |
$patron_pwd = $fields->{ (FID_PATRON_PWD) }; |
1308 |
|
1316 |
|
|
|
1317 |
($patron_id) = Koha::Plugins->call('barcode_transform', 'patron', $patron_id ) || $patron_id; |
1318 |
|
1309 |
siplog( "LOG_DEBUG", "handle_patron_enable: patron_id: '%s', patron_pwd: '%s'", $patron_id, $patron_pwd ); |
1319 |
siplog( "LOG_DEBUG", "handle_patron_enable: patron_id: '%s', patron_pwd: '%s'", $patron_id, $patron_pwd ); |
1310 |
|
1320 |
|
1311 |
$patron = $ils->find_patron($patron_id); |
1321 |
$patron = $ils->find_patron($patron_id); |
Lines 1369-1374
sub handle_hold {
Link Here
|
1369 |
$title_id = $fields->{ (FID_TITLE_ID) } || ''; |
1379 |
$title_id = $fields->{ (FID_TITLE_ID) } || ''; |
1370 |
$fee_ack = $fields->{ (FID_FEE_ACK) } || 'N'; |
1380 |
$fee_ack = $fields->{ (FID_FEE_ACK) } || 'N'; |
1371 |
|
1381 |
|
|
|
1382 |
($patron_id) = Koha::Plugins->call('barcode_transform', 'patron', $patron_id ) || $patron_id; |
1383 |
|
1372 |
if ( $hold_mode eq '+' ) { |
1384 |
if ( $hold_mode eq '+' ) { |
1373 |
$status = $ils->add_hold( $patron_id, $patron_pwd, $item_id, $title_id, $expiry_date, $pickup_locn, $hold_type, $fee_ack ); |
1385 |
$status = $ils->add_hold( $patron_id, $patron_pwd, $item_id, $title_id, $expiry_date, $pickup_locn, $hold_type, $fee_ack ); |
1374 |
} elsif ( $hold_mode eq '-' ) { |
1386 |
} elsif ( $hold_mode eq '-' ) { |
Lines 1434-1439
sub handle_renew {
Link Here
|
1434 |
$item_props = $fields->{ (FID_ITEM_PROPS) }; |
1446 |
$item_props = $fields->{ (FID_ITEM_PROPS) }; |
1435 |
$fee_ack = $fields->{ (FID_FEE_ACK) }; |
1447 |
$fee_ack = $fields->{ (FID_FEE_ACK) }; |
1436 |
|
1448 |
|
|
|
1449 |
($patron_id) = Koha::Plugins->call('barcode_transform', 'patron', $patron_id ) || $patron_id; |
1450 |
|
1437 |
$status = $ils->renew( $patron_id, $patron_pwd, $item_id, $title_id, $no_block, $nb_due_date, $third_party, $item_props, $fee_ack ); |
1451 |
$status = $ils->renew( $patron_id, $patron_pwd, $item_id, $title_id, $no_block, $nb_due_date, $third_party, $item_props, $fee_ack ); |
1438 |
|
1452 |
|
1439 |
$patron = $status->patron; |
1453 |
$patron = $status->patron; |
Lines 1515-1520
sub handle_renew_all {
Link Here
|
1515 |
$terminal_pwd = $fields->{ (FID_TERMINAL_PWD) }; |
1529 |
$terminal_pwd = $fields->{ (FID_TERMINAL_PWD) }; |
1516 |
$fee_ack = $fields->{ (FID_FEE_ACK) }; |
1530 |
$fee_ack = $fields->{ (FID_FEE_ACK) }; |
1517 |
|
1531 |
|
|
|
1532 |
($patron_id) = Koha::Plugins->call('barcode_transform', 'patron', $patron_id ) || $patron_id; |
1533 |
|
1518 |
$status = $ils->renew_all( $patron_id, $patron_pwd, $fee_ack ); |
1534 |
$status = $ils->renew_all( $patron_id, $patron_pwd, $fee_ack ); |
1519 |
|
1535 |
|
1520 |
$resp .= $status->ok ? '1' : '0'; |
1536 |
$resp .= $status->ok ? '1' : '0'; |