Bugzilla – Attachment 100385 Details for
Bug 24828
Add cash register support to SIP2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24828: Add ability to specify cash register in SIP config
Bug-24828-Add-ability-to-specify-cash-register-in-.patch (text/plain), 3.30 KB, created by
Martin Renvoize (ashimema)
on 2020-03-09 14:56:16 UTC
(
hide
)
Description:
Bug 24828: Add ability to specify cash register in SIP config
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-03-09 14:56:16 UTC
Size:
3.30 KB
patch
obsolete
>From 3d649dc73aee61bfb02b3a06821abd9f0ed11df9 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 9 Mar 2020 14:53:05 +0000 >Subject: [PATCH] Bug 24828: Add ability to specify cash register in SIP config > >This patch adds the ablity to specify a cash register id to link to >payments taken via SIP2 clients. >--- > C4/SIP/ILS.pm | 10 ++++++++-- > C4/SIP/ILS/Transaction.pm | 1 + > C4/SIP/ILS/Transaction/FeePayment.pm | 10 ++++++---- > 3 files changed, 15 insertions(+), 6 deletions(-) > >diff --git a/C4/SIP/ILS.pm b/C4/SIP/ILS.pm >index 785ab1b0cf..4fe3760d68 100644 >--- a/C4/SIP/ILS.pm >+++ b/C4/SIP/ILS.pm >@@ -136,6 +136,7 @@ sub checkout { > $circ->item( $item = C4::SIP::ILS::Item->new($item_id) ); > if ($fee_ack) { > $circ->fee_ack($fee_ack); >+ $circ->registerid($self->{institution}->{policy}->{registerid}); > } > > if ( !$patron ) { >@@ -260,9 +261,14 @@ sub end_patron_session { > } > > sub pay_fee { >- my ($self, $patron_id, $patron_pwd, $fee_amt, $fee_type, $pay_type, $fee_id, $trans_id, $currency, $is_writeoff, $disallow_overpayment ) = @_; >+ my ($self, $patron_id, $patron_pwd, $fee_amt, $fee_type, $pay_type, $fee_id, $trans_id, $currency, $is_writeoff, $disallow_overpayment, $registerid) = @_; > > my $trans = C4::SIP::ILS::Transaction::FeePayment->new(); >+ if (!defined $registerid) { >+ syslog('LOG_ERR', 'pay_fee passed undefined tillid'); >+ $registerid = 0; >+ } >+ > > $trans->transaction_id($trans_id); > my $patron; >@@ -271,7 +277,7 @@ sub pay_fee { > $trans->screen_msg('Invalid patron barcode.'); > return $trans; > } >- my $trans_result = $trans->pay( $patron->{borrowernumber}, $fee_amt, $pay_type, $fee_id, $is_writeoff, $disallow_overpayment ); >+ my $trans_result = $trans->pay( $patron->{borrowernumber}, $fee_amt, $pay_type, $fee_id, $is_writeoff, $disallow_overpayment, $registerid ); > my $ok = $trans_result->{ok}; > $trans->ok($ok); > >diff --git a/C4/SIP/ILS/Transaction.pm b/C4/SIP/ILS/Transaction.pm >index 011aa980b3..44d7279371 100644 >--- a/C4/SIP/ILS/Transaction.pm >+++ b/C4/SIP/ILS/Transaction.pm >@@ -24,6 +24,7 @@ my %fields = ( > screen_msg => '', > print_line => '', > fee_ack => 'N', >+ registerid => undef, > ); > > our $AUTOLOAD; >diff --git a/C4/SIP/ILS/Transaction/FeePayment.pm b/C4/SIP/ILS/Transaction/FeePayment.pm >index 152c17610e..ec0a7487de 100644 >--- a/C4/SIP/ILS/Transaction/FeePayment.pm >+++ b/C4/SIP/ILS/Transaction/FeePayment.pm >@@ -49,6 +49,7 @@ sub pay { > my $fee_id = shift; > my $is_writeoff = shift; > my $disallow_overpayment = shift; >+ my $registerid = shift; > > my $type = $is_writeoff ? 'WRITEOFF' : 'PAYMENT'; > >@@ -86,10 +87,11 @@ sub pay { > else { > my $pay_response = $account->pay( > { >- amount => $amt, >- type => $type, >- payment_type => 'SIP' . $sip_type, >- interface => C4::Context->interface >+ amount => $amt, >+ type => $type, >+ payment_type => 'SIP' . $sip_type, >+ interface => C4::Context->interface, >+ cash_register => $registerid > } > ); > return { >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24828
:
100385
|
101447
|
101449