@@ -, +, @@ --- C4/SIP/ILS/Transaction/FeePayment.pm | 4 ++-- Koha/Account.pm | 8 ++++---- .../intranet-tmpl/prog/en/modules/members/boraccount.tt | 6 ++++++ koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt | 6 ++++++ .../intranet-tmpl/prog/en/modules/members/paycollect.tt | 12 ++++++++++++ koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt | 6 ++++++ members/paycollect.pl | 14 +++++++++++--- opac/opac-account-pay-paypal-return.pl | 2 +- 8 files changed, 48 insertions(+), 10 deletions(-) --- a/C4/SIP/ILS/Transaction/FeePayment.pm +++ a/C4/SIP/ILS/Transaction/FeePayment.pm @@ -66,7 +66,7 @@ sub pay { $account->pay( { amount => $amt, - sip => $sip_type, + mode => $sip_type, type => $type, lines => [$fee], } @@ -81,7 +81,7 @@ sub pay { $account->pay( { amount => $amt, - sip => $sip_type, + mode => $sip_type, type => $type, } ); --- a/Koha/Account.pm +++ a/Koha/Account.pm @@ -50,7 +50,7 @@ This method allows payments to be made against fees/fines Koha::Account->new( { patron_id => $borrowernumber } )->pay( { amount => $amount, - sip => $sipmode, + mode => $mode, note => $note, description => $description, library_id => $branchcode, @@ -65,8 +65,8 @@ Koha::Account->new( { patron_id => $borrowernumber } )->pay( sub pay { my ( $self, $params ) = @_; - my $amount = $params->{amount}; - my $sip = $params->{sip}; + my $amount = $params->{amount}; + my $mode = $params->{mode}; my $description = $params->{description}; my $note = $params->{note} || q{}; my $library_id = $params->{library_id}; @@ -202,7 +202,7 @@ sub pay { $account_type ||= $type eq 'writeoff' ? 'W' - : defined($sip) ? "Pay$sip" + : defined($mode) ? "Pay$mode" : 'Pay'; $description ||= $type eq 'writeoff' ? 'Writeoff' : q{}; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt @@ -89,6 +89,12 @@ $(document).ready(function() { [% CASE 'Pay00' %]Payment, thanks (cash via SIP2) [% CASE 'Pay01' %]Payment, thanks (VISA via SIP2) [% CASE 'Pay02' %]Payment, thanks (credit card via SIP2) + [% CASE 'Pay03' %]Payment, thanks (cash) + [% CASE 'Pay04' %]Payment, thanks (credit card) + [% CASE 'Pay05' %]Payment, thanks (debit) + [% CASE 'Pay06' %]Payment, thanks (check) + [% CASE 'Pay07' %]Payment, thanks (cryptocurrency) + [% CASE 'Pay08' %]Payment, thanks (PayPal) [% CASE 'N' %]New card [% CASE 'F' %]Fine [% CASE 'A' %]Account management fee --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt @@ -122,6 +122,12 @@ function enableCheckboxActions(){ [% CASE 'Pay00' %]Payment, thanks (cash via SIP2) [% CASE 'Pay01' %]Payment, thanks (VISA via SIP2) [% CASE 'Pay02' %]Payment, thanks (credit card via SIP2) + [% CASE 'Pay03' %]Payment, thanks (cash) + [% CASE 'Pay04' %]Payment, thanks (credit card) + [% CASE 'Pay05' %]Payment, thanks (debit) + [% CASE 'Pay06' %]Payment, thanks (check) + [% CASE 'Pay07' %]Payment, thanks (cryptocurrency) + [% CASE 'Pay08' %]Payment, thanks (PayPal) [% CASE 'N' %]New card [% CASE 'F' %]Fine [% CASE 'A' %]Account management fee --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt @@ -148,6 +148,18 @@ function moneyFormat(textObj) { +
  • + + +
  • --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt @@ -109,6 +109,12 @@ [% CASE 'Pay00' %]Payment, thanks (cash via SIP2) [% CASE 'Pay01' %]Payment, thanks (VISA via SIP2) [% CASE 'Pay02' %]Payment, thanks (credit card via SIP2) + [% CASE 'Pay03' %]Payment, thanks (cash) + [% CASE 'Pay04' %]Payment, thanks (credit card) + [% CASE 'Pay05' %]Payment, thanks (debit) + [% CASE 'Pay06' %]Payment, thanks (check) + [% CASE 'Pay07' %]Payment, thanks (cryptocurrency) + [% CASE 'Pay08' %]Payment, thanks (PayPal) [% CASE 'N' %]New card [% CASE 'F' %]Fine [% CASE 'A' %]Account management fee --- a/members/paycollect.pl +++ a/members/paycollect.pl @@ -71,6 +71,7 @@ my $writeoff = $input->param('writeoff_individual'); my $select_lines = $input->param('selected'); my $select = $input->param('selected_accts'); my $payment_note = uri_unescape scalar $input->param('payment_note'); +my $paymode = $input->param('paymode') || undef; my $accountlines_id; if ( $individual || $writeoff ) { @@ -130,7 +131,8 @@ if ( $total_paid and $total_paid ne '0.00' ) { lines => [$line], amount => $total_paid, library_id => $branch, - note => $payment_note + note => $payment_note, + mode => $paymode, } ); print $input->redirect( @@ -161,13 +163,19 @@ if ( $total_paid and $total_paid ne '0.00' ) { amount => $total_paid, lines => \@lines, note => $note, + mode => $paymode, } ); } else { my $note = $input->param('selected_accts_notes'); - Koha::Account->new( { patron_id => $borrowernumber } ) - ->pay( { amount => $total_paid, note => $note } ); + Koha::Account->new( { patron_id => $borrowernumber } )->pay( + { + amount => $total_paid, + note => $note, + mode => $paymode, + } + ); } print $input->redirect( --- a/opac/opac-account-pay-paypal-return.pl +++ a/opac/opac-account-pay-paypal-return.pl @@ -104,7 +104,7 @@ if ( $response->is_success ) { { amount => $amount, lines => \@lines, - note => 'PayPal' + mode => '08', } ); } --