Bugzilla – Attachment 69002 Details for
Bug 5620
Capture Mode of payment
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 5620 - (Rebase) - Collect payment mode in staff interface
Bug-5620---Rebase---Collect-payment-mode-in-staff-.patch (text/plain), 9.28 KB, created by
David Bourgault
on 2017-11-07 16:49:23 UTC
(
hide
)
Description:
Bug 5620 - (Rebase) - Collect payment mode in staff interface
Filename:
MIME Type:
Creator:
David Bourgault
Created:
2017-11-07 16:49:23 UTC
Size:
9.28 KB
patch
obsolete
>From a14a97cf55709979e8597e73a77f044befeb8b8a Mon Sep 17 00:00:00 2001 >From: David Bourgault <david.bourgault@inlibro.com> >Date: Thu, 5 Oct 2017 08:32:10 -0400 >Subject: [PATCH] Bug 5620 - (Rebase) - Collect payment mode in staff interface > >Followed test plan, patch worked as described. Also ran QA test tool >everything passed > >Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> >--- > 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(-) > >diff --git a/C4/SIP/ILS/Transaction/FeePayment.pm b/C4/SIP/ILS/Transaction/FeePayment.pm >index 41ed5c7..ea74425 100644 >--- a/C4/SIP/ILS/Transaction/FeePayment.pm >+++ b/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, > } > ); >diff --git a/Koha/Account.pm b/Koha/Account.pm >index ed1fd3c..54d623f 100644 >--- a/Koha/Account.pm >+++ b/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{}; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >index ef4354a..0eb5d22 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >+++ b/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 >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt >index ead4ce4..daca0f6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt >+++ b/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 >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >index 12b2c4b..9d55398 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >@@ -148,6 +148,18 @@ function moneyFormat(textObj) { > <!-- default to paying all --> > <input name="paid" id="paid" value="[% amountoutstanding | format('%.2f') %]" /> > </li> >+ <li> >+ <label for="paymode">Payment mode: </label> >+ <select name="paymode"> >+ <option value="">Other</option> >+ <option value="03">Cash</option> >+ <option value="04">Credit card</option> >+ <option value="05">Debit</option> >+ <option value="08">Paypal</option> >+ <option value="06">Check</option> >+ <option value="07">Cryptocurrency</option>\ >+ </select> >+ </li> > </ol> > </fieldset> > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >index 44c8555..2097166 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >+++ b/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 >diff --git a/members/paycollect.pl b/members/paycollect.pl >index 9ec3077..fb4f441 100755 >--- a/members/paycollect.pl >+++ b/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( >diff --git a/opac/opac-account-pay-paypal-return.pl b/opac/opac-account-pay-paypal-return.pl >index 64292d4..4b36ce7 100755 >--- a/opac/opac-account-pay-paypal-return.pl >+++ b/opac/opac-account-pay-paypal-return.pl >@@ -104,7 +104,7 @@ if ( $response->is_success ) { > { > amount => $amount, > lines => \@lines, >- note => 'PayPal' >+ mode => '08', > } > ); > } >-- >2.7.4
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 5620
:
2997
|
51290
|
56036
|
56037
|
56080
|
60994
|
60996
|
67361
|
67362
|
67394
|
67603
|
67634
|
67661
| 69002