Bugzilla – Attachment 15234 Details for
Bug 6413
Notes in Fines doing wonky things
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6413 - QA Followup - Add notes for 'Pay selected'
Bug-6413---QA-Followup---Add-notes-for-Pay-selecte.patch (text/plain), 6.30 KB, created by
Kyle M Hall (khall)
on 2013-02-11 12:49:34 UTC
(
hide
)
Description:
Bug 6413 - QA Followup - Add notes for 'Pay selected'
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-02-11 12:49:34 UTC
Size:
6.30 KB
patch
obsolete
>From e0cba1a95ed8d6e958d6ff732985d01e44874c3d Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 24 Jan 2013 14:03:48 -0500 >Subject: [PATCH] Bug 6413 - QA Followup - Add notes for 'Pay selected' > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > C4/Accounts.pm | 8 ++++---- > .../prog/en/modules/members/boraccount.tt | 2 +- > .../intranet-tmpl/prog/en/modules/members/pay.tt | 6 +++--- > .../prog/en/modules/members/paycollect.tt | 4 ++++ > members/pay.pl | 4 +++- > members/paycollect.pl | 7 ++++--- > 6 files changed, 19 insertions(+), 12 deletions(-) > >diff --git a/C4/Accounts.pm b/C4/Accounts.pm >index c6f5f29..f32f3ca 100644 >--- a/C4/Accounts.pm >+++ b/C4/Accounts.pm >@@ -685,7 +685,7 @@ will be credited to the next one. > =cut > > sub recordpayment_selectaccts { >- my ( $borrowernumber, $amount, $accts ) = @_; >+ my ( $borrowernumber, $amount, $accts, $note ) = @_; > > my $dbh = C4::Context->dbh; > my $newamtos = 0; >@@ -728,9 +728,9 @@ sub recordpayment_selectaccts { > > # create new line > $sql = 'INSERT INTO accountlines ' . >- '(borrowernumber, accountno,date,amount,description,accounttype,amountoutstanding,manager_id) ' . >- q|VALUES (?,?,now(),?,'Payment,thanks','Pay',?,?)|; >- $dbh->do($sql,{},$borrowernumber, $nextaccntno, 0 - $amount, 0 - $amountleft, $manager_id ); >+ '(borrowernumber, accountno,date,amount,description,accounttype,amountoutstanding,manager_id,note) ' . >+ q|VALUES (?,?,now(),?,'Payment,thanks','Pay',?,?,?)|; >+ $dbh->do($sql,{},$borrowernumber, $nextaccntno, 0 - $amount, 0 - $amountleft, $manager_id, $note ); > UpdateStats( $branch, 'payment', $amount, '', '', '', $borrowernumber, $nextaccntno ); > return; > } >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 727430a..d64c63b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >@@ -45,7 +45,7 @@ > [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %] > <td>[% account.date %]</td> > <td>[% account.description %] [% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.biblionumber %]&itemnumber=[% account.itemnumber %]">View item</a> [% END %][% account.title |html %]</td> >- <td>[% account.note %]</td> >+ <td>[% account.note | html_line_break %]</td> > [% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount %]</td> > [% IF ( account.amountoutstandingcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amountoutstanding %]</td> > [% IF ( reverse_col ) %] >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 1a36ab1..f766112 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt >@@ -57,7 +57,7 @@ > </thead> > <tfoot> > <tr> >- <td class="total" colspan="7">Total Due:</td> >+ <td class="total" colspan="8">Total Due:</td> > <td>[% total | format('%.2f') %]</td> > </tr> > </tfoot> >@@ -88,7 +88,7 @@ > [% END %] > </td> > <td>[% line.description %] ([% line.title |html_entity %])</td> >- <td><input type="text" name="payment_note_[% line.accountno %]"></input></td> >+ <td><input type="text" name="payment_note_[% line.accountno %]" /></td> > <td>[% line.accounttype %]</td> > <td>[% line.notify_id %]</td> > <td>[% line.notify_level %]</td> >@@ -99,7 +99,7 @@ > [% IF ( account_grp.total ) %] > <tr> > >- <td class="total" colspan="7">Sub total:</td> >+ <td class="total" colspan="8">Sub total:</td> > <td>[% account_grp.total | format('%.2f') %]</td> > </tr> > [% END %] >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 65fec3f..7c3e10f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >@@ -204,6 +204,10 @@ function moneyFormat(textObj) { > <!-- default to paying all --> > <input name="paid" id="paid" value="[% total | format('%.2f') %]" onchange="moneyFormat(document.payfine.paid)"/> > </li> >+ <li> >+ <label for="selected_accts_notes">Note: </label> >+ <textarea name="selected_accts_notes" id="selected_accts_notes">[% selected_accts_notes %]</textarea> >+ </li> > </ol> > </fieldset> > <div class="action"><input type="submit" name="submitbutton" value="Confirm" /> >diff --git a/members/pay.pl b/members/pay.pl >index d02c830..93fceb6 100755 >--- a/members/pay.pl >+++ b/members/pay.pl >@@ -266,10 +266,12 @@ sub payselected { > } > $amt = '&amt=' . $amt; > my $sel = '&selected=' . join ',', @lines_to_pay; >+ my $notes = '¬es=' . join("%0A", map { $input->param("payment_note_$_") } @lines_to_pay ); > my $redirect = > "/cgi-bin/koha/members/paycollect.pl?borrowernumber=$borrowernumber" > . $amt >- . $sel; >+ . $sel >+ . $notes; > > print $input->redirect($redirect); > return; >diff --git a/members/paycollect.pl b/members/paycollect.pl >index b4a8538..6185dc3 100755 >--- a/members/paycollect.pl >+++ b/members/paycollect.pl >@@ -93,7 +93,8 @@ if ( $individual || $writeoff ) { > $total_due = $input->param('amt'); > $template->param( > selected_accts => $select_lines, >- amt => $total_due >+ amt => $total_due, >+ selected_accts_notes => $input->param('notes'), > ); > } > >@@ -120,8 +121,8 @@ if ( $total_paid and $total_paid ne '0.00' ) { > $select = $1; # ensure passing no junk > } > my @acc = split /,/, $select; >- recordpayment_selectaccts( $borrowernumber, $total_paid, >- \@acc ); >+ my $note = $input->param('selected_accts_notes'); >+ recordpayment_selectaccts( $borrowernumber, $total_paid, \@acc, $note ); > } else { > recordpayment( $borrowernumber, $total_paid ); > } >-- >1.7.2.5
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 6413
:
7333
|
7496
|
9107
|
9129
|
9144
|
9220
|
9221
|
9374
|
12658
|
12661
|
12668
|
12669
|
14832
|
14833
|
14834
|
14840
|
14846
|
14895
|
14896
|
14899
|
14900
|
15232
|
15233
|
15234
|
16486
|
16487
|
16488
|
16489
|
18035