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('patron_barcode_transform', $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 740-745
sub handle_block_patron {
Link Here
|
740 |
$patron_id = $fields->{ (FID_PATRON_ID) }; |
742 |
$patron_id = $fields->{ (FID_PATRON_ID) }; |
741 |
$terminal_pwd = $fields->{ (FID_TERMINAL_PWD) }; |
743 |
$terminal_pwd = $fields->{ (FID_TERMINAL_PWD) }; |
742 |
|
744 |
|
|
|
745 |
($patron_id) = Koha::Plugins->call('patron_barcode_transform', $patron_id ) || $patron_id; |
746 |
|
743 |
# Terminal passwords are different from account login |
747 |
# Terminal passwords are different from account login |
744 |
# passwords, but I have no idea what to do with them. So, |
748 |
# passwords, but I have no idea what to do with them. So, |
745 |
# I'll just ignore them for now. |
749 |
# I'll just ignore them for now. |
Lines 964-969
sub handle_patron_info {
Link Here
|
964 |
$start = $fields->{ (FID_START_ITEM) }; |
968 |
$start = $fields->{ (FID_START_ITEM) }; |
965 |
$end = $fields->{ (FID_END_ITEM) }; |
969 |
$end = $fields->{ (FID_END_ITEM) }; |
966 |
|
970 |
|
|
|
971 |
($patron_id) = Koha::Plugins->call('patron_barcode_transform', $patron_id ) || $patron_id; |
972 |
|
967 |
$patron = $ils->find_patron($patron_id); |
973 |
$patron = $ils->find_patron($patron_id); |
968 |
|
974 |
|
969 |
$resp = (PATRON_INFO_RESP); |
975 |
$resp = (PATRON_INFO_RESP); |
Lines 1121-1126
sub handle_fee_paid {
Link Here
|
1121 |
$fee_id = $fields->{ (FID_FEE_ID) }; |
1127 |
$fee_id = $fields->{ (FID_FEE_ID) }; |
1122 |
$trans_id = $fields->{ (FID_TRANSACTION_ID) }; |
1128 |
$trans_id = $fields->{ (FID_TRANSACTION_ID) }; |
1123 |
|
1129 |
|
|
|
1130 |
($patron_id) = Koha::Plugins->call('patron_barcode_transform', $patron_id ) || $patron_id; |
1131 |
|
1124 |
$ils->check_inst_id( $inst_id, "handle_fee_paid" ); |
1132 |
$ils->check_inst_id( $inst_id, "handle_fee_paid" ); |
1125 |
|
1133 |
|
1126 |
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 ); |
1134 |
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 1317-1322
sub handle_patron_enable {
Link Here
|
1317 |
$patron_id = $fields->{ (FID_PATRON_ID) }; |
1325 |
$patron_id = $fields->{ (FID_PATRON_ID) }; |
1318 |
$patron_pwd = $fields->{ (FID_PATRON_PWD) }; |
1326 |
$patron_pwd = $fields->{ (FID_PATRON_PWD) }; |
1319 |
|
1327 |
|
|
|
1328 |
($patron_id) = Koha::Plugins->call('patron_barcode_transform', $patron_id ) || $patron_id; |
1329 |
|
1320 |
siplog( "LOG_DEBUG", "handle_patron_enable: patron_id: '%s', patron_pwd: '%s'", $patron_id, $patron_pwd ); |
1330 |
siplog( "LOG_DEBUG", "handle_patron_enable: patron_id: '%s', patron_pwd: '%s'", $patron_id, $patron_pwd ); |
1321 |
|
1331 |
|
1322 |
$patron = $ils->find_patron($patron_id); |
1332 |
$patron = $ils->find_patron($patron_id); |
Lines 1380-1385
sub handle_hold {
Link Here
|
1380 |
$title_id = $fields->{ (FID_TITLE_ID) } || ''; |
1390 |
$title_id = $fields->{ (FID_TITLE_ID) } || ''; |
1381 |
$fee_ack = $fields->{ (FID_FEE_ACK) } || 'N'; |
1391 |
$fee_ack = $fields->{ (FID_FEE_ACK) } || 'N'; |
1382 |
|
1392 |
|
|
|
1393 |
($patron_id) = Koha::Plugins->call('patron_barcode_transform', $patron_id ) || $patron_id; |
1394 |
|
1383 |
if ( $hold_mode eq '+' ) { |
1395 |
if ( $hold_mode eq '+' ) { |
1384 |
$status = $ils->add_hold( $patron_id, $patron_pwd, $item_id, $title_id, $expiry_date, $pickup_locn, $hold_type, $fee_ack ); |
1396 |
$status = $ils->add_hold( $patron_id, $patron_pwd, $item_id, $title_id, $expiry_date, $pickup_locn, $hold_type, $fee_ack ); |
1385 |
} elsif ( $hold_mode eq '-' ) { |
1397 |
} elsif ( $hold_mode eq '-' ) { |
Lines 1445-1450
sub handle_renew {
Link Here
|
1445 |
$item_props = $fields->{ (FID_ITEM_PROPS) }; |
1457 |
$item_props = $fields->{ (FID_ITEM_PROPS) }; |
1446 |
$fee_ack = $fields->{ (FID_FEE_ACK) }; |
1458 |
$fee_ack = $fields->{ (FID_FEE_ACK) }; |
1447 |
|
1459 |
|
|
|
1460 |
($patron_id) = Koha::Plugins->call('patron_barcode_transform', $patron_id ) || $patron_id; |
1461 |
|
1448 |
$status = $ils->renew( $patron_id, $patron_pwd, $item_id, $title_id, $no_block, $nb_due_date, $third_party, $item_props, $fee_ack ); |
1462 |
$status = $ils->renew( $patron_id, $patron_pwd, $item_id, $title_id, $no_block, $nb_due_date, $third_party, $item_props, $fee_ack ); |
1449 |
|
1463 |
|
1450 |
$patron = $status->patron; |
1464 |
$patron = $status->patron; |
Lines 1526-1531
sub handle_renew_all {
Link Here
|
1526 |
$terminal_pwd = $fields->{ (FID_TERMINAL_PWD) }; |
1540 |
$terminal_pwd = $fields->{ (FID_TERMINAL_PWD) }; |
1527 |
$fee_ack = $fields->{ (FID_FEE_ACK) }; |
1541 |
$fee_ack = $fields->{ (FID_FEE_ACK) }; |
1528 |
|
1542 |
|
|
|
1543 |
($patron_id) = Koha::Plugins->call('patron_barcode_transform', $patron_id ) || $patron_id; |
1544 |
|
1529 |
$status = $ils->renew_all( $patron_id, $patron_pwd, $fee_ack ); |
1545 |
$status = $ils->renew_all( $patron_id, $patron_pwd, $fee_ack ); |
1530 |
|
1546 |
|
1531 |
$resp .= $status->ok ? '1' : '0'; |
1547 |
$resp .= $status->ok ? '1' : '0'; |