Bugzilla – Attachment 69352 Details for
Bug 18889
Add barcode to 'Pay Fines' tab in patrons payment page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18889 - Storing and display of barcode with fines in intranet
Bug-18889---Storing-and-display-of-barcode-with-fi.patch (text/plain), 5.26 KB, created by
Alex Buckley
on 2017-11-27 00:25:35 UTC
(
hide
)
Description:
Bug 18889 - Storing and display of barcode with fines in intranet
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2017-11-27 00:25:35 UTC
Size:
5.26 KB
patch
obsolete
>From 367574d24cc2df63664e83fb5e4c9a4e2c0f3ab3 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Mon, 27 Nov 2017 13:11:09 +1300 >Subject: [PATCH] Bug 18889 - Storing and display of barcode with fines in > intranet > >Test plan: >1. Create a manual invoice fine making sure you enter in a barcode value > >2. Go to the 'Pay fines' tab and notice that the barcode value is not >displayed > >3. Apply patch > >4. Update your database by running the updatedatabase.pl script in >koha-shell > >This will run the atomicupdate file >bug_18889_added_barcode_field_to_accountlines.sql which contains the >database changes > >5. Update your DBIx by running the command (in the Koha root directory): >misc/devel/update_dbix_class_files.pl --db_name=<dbname> --db_user=<dbuser> --db_pass=<dbpass> > >6. Repeat step 1 and 2 and notice that there is a new front end column >in the 'Pay fines' page which displays the item barcode > >Sponsored-By: Catalyst IT >--- > C4/Accounts.pm | 4 +++- > .../atomicupdate/bug_18889_added_barcode_field_to_accountlines.sql | 2 ++ > koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt | 2 ++ > members/maninvoice.pl | 2 +- > members/pay.pl | 1 + > 5 files changed, 9 insertions(+), 2 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_18889_added_barcode_field_to_accountlines.sql > >diff --git a/C4/Accounts.pm b/C4/Accounts.pm >index 0717215..7ed3237 100644 >--- a/C4/Accounts.pm >+++ b/C4/Accounts.pm >@@ -266,7 +266,7 @@ should be the empty string. > # > > sub manualinvoice { >- my ( $borrowernumber, $itemnum, $desc, $type, $amount, $note, $skip_notify ) = @_; >+ my ( $borrowernumber, $itemnum, $desc, $type, $amount, $note, $barcode, $skip_notify ) = @_; > my $manager_id = 0; > $manager_id = C4::Context->userenv->{'number'} if C4::Context->userenv; > my $dbh = C4::Context->dbh; >@@ -292,6 +292,7 @@ sub manualinvoice { > date => \'NOW()', > amount => $amount, > description => $desc, >+ barcode => $barcode, > accounttype => $type, > amountoutstanding => $amountleft, > itemnumber => $itemnum || undef, >@@ -316,6 +317,7 @@ sub manualinvoice { > accountno => $accountno, > amount => $amount, > description => $desc, >+ barcode => $barcode, > accounttype => $type, > amountoutstanding => $amountleft, > notify_id => $notifyid, >diff --git a/installer/data/mysql/atomicupdate/bug_18889_added_barcode_field_to_accountlines.sql b/installer/data/mysql/atomicupdate/bug_18889_added_barcode_field_to_accountlines.sql >new file mode 100644 >index 0000000..12a6057 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_18889_added_barcode_field_to_accountlines.sql >@@ -0,0 +1,2 @@ >+ALTER TABLE accountlines add barcode varchar(20) DEFAULT NULL; >+ >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..9c33730 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt >@@ -77,6 +77,7 @@ function enableCheckboxActions(){ > <th> </th> > <th>Fines & charges</th> > <th>Description</th> >+ <th>Barcode</th> > <th>Payment note</th> > <th>Account type</th> > <th>Notify id</th> >@@ -143,6 +144,7 @@ function enableCheckboxActions(){ > [%- IF line.description %], [% line.description %][% END %] > [% IF line.title %]([% line.title %])[% END %] > </td> >+ <td>[%- IF line.barcode %] [% line.barcode %][% END %]</td> > <td><input type="text" name="payment_note_[% line.accountlines_id %]" /></td> > <td>[% line.accounttype %]</td> > <td>[% line.notify_id %]</td> >diff --git a/members/maninvoice.pl b/members/maninvoice.pl >index bd24a10..d0b85f5 100755 >--- a/members/maninvoice.pl >+++ b/members/maninvoice.pl >@@ -61,7 +61,7 @@ if ($add){ > my $amount=$input->param('amount'); > my $type=$input->param('type'); > my $note = $input->param('note'); >- my $error = manualinvoice( $borrowernumber, $itemnum, $desc, $type, $amount, $note ); >+ my $error = manualinvoice( $borrowernumber, $itemnum, $desc, $type, $amount, $note, $barcode ); > if ($error) { > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > { template_name => "members/maninvoice.tt", >diff --git a/members/pay.pl b/members/pay.pl >index 70e45e2..a4415c2 100755 >--- a/members/pay.pl >+++ b/members/pay.pl >@@ -194,6 +194,7 @@ sub redirect_to_paycollect { > $redirect .= > get_for_redirect( 'amountoutstanding', "amountoutstanding$line_no", 1 ); > $redirect .= get_for_redirect( 'description', "description$line_no", 0 ); >+ $redirect .= get_for_redirect( 'barcode', "description$line_no", 0 ); > $redirect .= get_for_redirect( 'title', "title$line_no", 0 ); > $redirect .= get_for_redirect( 'itemnumber', "itemnumber$line_no", 0 ); > $redirect .= get_for_redirect( 'notify_id', "notify_id$line_no", 0 ); >-- >2.1.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 18889
:
64772
|
69352
|
73362
|
73365
|
73366
|
73519
|
75197
|
75198