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 ); |
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 732-737
sub handle_block_patron {
Link Here
|
732 |
$patron_id = $fields->{ (FID_PATRON_ID) }; |
734 |
$patron_id = $fields->{ (FID_PATRON_ID) }; |
733 |
$terminal_pwd = $fields->{ (FID_TERMINAL_PWD) }; |
735 |
$terminal_pwd = $fields->{ (FID_TERMINAL_PWD) }; |
734 |
|
736 |
|
|
|
737 |
($patron_id) = Koha::Plugins->call('barcode_transform', 'patron', $patron_id ); |
738 |
|
735 |
# Terminal passwords are different from account login |
739 |
# Terminal passwords are different from account login |
736 |
# passwords, but I have no idea what to do with them. So, |
740 |
# passwords, but I have no idea what to do with them. So, |
737 |
# I'll just ignore them for now. |
741 |
# I'll just ignore them for now. |
Lines 956-961
sub handle_patron_info {
Link Here
|
956 |
$start = $fields->{ (FID_START_ITEM) }; |
960 |
$start = $fields->{ (FID_START_ITEM) }; |
957 |
$end = $fields->{ (FID_END_ITEM) }; |
961 |
$end = $fields->{ (FID_END_ITEM) }; |
958 |
|
962 |
|
|
|
963 |
($patron_id) = Koha::Plugins->call('barcode_transform', 'patron', $patron_id ); |
964 |
|
959 |
$patron = $ils->find_patron($patron_id); |
965 |
$patron = $ils->find_patron($patron_id); |
960 |
|
966 |
|
961 |
$resp = (PATRON_INFO_RESP); |
967 |
$resp = (PATRON_INFO_RESP); |
Lines 1113-1118
sub handle_fee_paid {
Link Here
|
1113 |
$fee_id = $fields->{ (FID_FEE_ID) }; |
1119 |
$fee_id = $fields->{ (FID_FEE_ID) }; |
1114 |
$trans_id = $fields->{ (FID_TRANSACTION_ID) }; |
1120 |
$trans_id = $fields->{ (FID_TRANSACTION_ID) }; |
1115 |
|
1121 |
|
|
|
1122 |
($patron_id) = Koha::Plugins->call('barcode_transform', 'patron', $patron_id ); |
1123 |
|
1116 |
$ils->check_inst_id( $inst_id, "handle_fee_paid" ); |
1124 |
$ils->check_inst_id( $inst_id, "handle_fee_paid" ); |
1117 |
|
1125 |
|
1118 |
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 ); |
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 ); |
Lines 1301-1306
sub handle_patron_enable {
Link Here
|
1301 |
$patron_id = $fields->{ (FID_PATRON_ID) }; |
1309 |
$patron_id = $fields->{ (FID_PATRON_ID) }; |
1302 |
$patron_pwd = $fields->{ (FID_PATRON_PWD) }; |
1310 |
$patron_pwd = $fields->{ (FID_PATRON_PWD) }; |
1303 |
|
1311 |
|
|
|
1312 |
($patron_id) = Koha::Plugins->call('barcode_transform', 'patron', $patron_id ); |
1313 |
|
1304 |
siplog( "LOG_DEBUG", "handle_patron_enable: patron_id: '%s', patron_pwd: '%s'", $patron_id, $patron_pwd ); |
1314 |
siplog( "LOG_DEBUG", "handle_patron_enable: patron_id: '%s', patron_pwd: '%s'", $patron_id, $patron_pwd ); |
1305 |
|
1315 |
|
1306 |
$patron = $ils->find_patron($patron_id); |
1316 |
$patron = $ils->find_patron($patron_id); |
Lines 1364-1369
sub handle_hold {
Link Here
|
1364 |
$title_id = $fields->{ (FID_TITLE_ID) } || ''; |
1374 |
$title_id = $fields->{ (FID_TITLE_ID) } || ''; |
1365 |
$fee_ack = $fields->{ (FID_FEE_ACK) } || 'N'; |
1375 |
$fee_ack = $fields->{ (FID_FEE_ACK) } || 'N'; |
1366 |
|
1376 |
|
|
|
1377 |
($patron_id) = Koha::Plugins->call('barcode_transform', 'patron', $patron_id ); |
1378 |
|
1367 |
if ( $hold_mode eq '+' ) { |
1379 |
if ( $hold_mode eq '+' ) { |
1368 |
$status = $ils->add_hold( $patron_id, $patron_pwd, $item_id, $title_id, $expiry_date, $pickup_locn, $hold_type, $fee_ack ); |
1380 |
$status = $ils->add_hold( $patron_id, $patron_pwd, $item_id, $title_id, $expiry_date, $pickup_locn, $hold_type, $fee_ack ); |
1369 |
} elsif ( $hold_mode eq '-' ) { |
1381 |
} elsif ( $hold_mode eq '-' ) { |
Lines 1429-1434
sub handle_renew {
Link Here
|
1429 |
$item_props = $fields->{ (FID_ITEM_PROPS) }; |
1441 |
$item_props = $fields->{ (FID_ITEM_PROPS) }; |
1430 |
$fee_ack = $fields->{ (FID_FEE_ACK) }; |
1442 |
$fee_ack = $fields->{ (FID_FEE_ACK) }; |
1431 |
|
1443 |
|
|
|
1444 |
($patron_id) = Koha::Plugins->call('barcode_transform', 'patron', $patron_id ); |
1445 |
|
1432 |
$status = $ils->renew( $patron_id, $patron_pwd, $item_id, $title_id, $no_block, $nb_due_date, $third_party, $item_props, $fee_ack ); |
1446 |
$status = $ils->renew( $patron_id, $patron_pwd, $item_id, $title_id, $no_block, $nb_due_date, $third_party, $item_props, $fee_ack ); |
1433 |
|
1447 |
|
1434 |
$patron = $status->patron; |
1448 |
$patron = $status->patron; |
Lines 1510-1515
sub handle_renew_all {
Link Here
|
1510 |
$terminal_pwd = $fields->{ (FID_TERMINAL_PWD) }; |
1524 |
$terminal_pwd = $fields->{ (FID_TERMINAL_PWD) }; |
1511 |
$fee_ack = $fields->{ (FID_FEE_ACK) }; |
1525 |
$fee_ack = $fields->{ (FID_FEE_ACK) }; |
1512 |
|
1526 |
|
|
|
1527 |
($patron_id) = Koha::Plugins->call('barcode_transform', 'patron', $patron_id ); |
1528 |
|
1513 |
$status = $ils->renew_all( $patron_id, $patron_pwd, $fee_ack ); |
1529 |
$status = $ils->renew_all( $patron_id, $patron_pwd, $fee_ack ); |
1514 |
|
1530 |
|
1515 |
$resp .= $status->ok ? '1' : '0'; |
1531 |
$resp .= $status->ok ? '1' : '0'; |