Bugzilla – Attachment 73362 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.22 KB, created by
Alex Buckley
on 2018-03-28 03:25:49 UTC
(
hide
)
Description:
Bug 18889 - Storing and display of barcode with fines in intranet
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2018-03-28 03:25:49 UTC
Size:
5.22 KB
patch
obsolete
>From fbfdf81a704019ce56fbefe3da9606fe91f90ef9 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 | 1 + > koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt | 2 ++ > members/maninvoice.pl | 2 +- > members/pay.pl | 1 + > 5 files changed, 8 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 b84627b..4183926 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 ) = @_; >+ 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; >@@ -281,6 +281,7 @@ sub manualinvoice { > date => \'NOW()', > amount => $amount, > description => $desc, >+ barcode => $barcode, > accounttype => $type, > amountoutstanding => $amountleft, > itemnumber => $itemnum || undef, >@@ -304,6 +305,7 @@ sub manualinvoice { > accountno => $accountno, > amount => $amount, > description => $desc, >+ barcode => $barcode, > accounttype => $type, > amountoutstanding => $amountleft, > note => $note, >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..20347bb >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_18889_added_barcode_field_to_accountlines.sql >@@ -0,0 +1 @@ >+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 34b6d11..78a737e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt >@@ -41,6 +41,7 @@ > <th> </th> > <th>Fines & charges</th> > <th>Description</th> >+ <th>Barcode</th> > <th>Payment note</th> > <th>Account type</th> > <th>Amount</th> >@@ -101,6 +102,7 @@ > [%- 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 class="debit" style="text-align: right;">[% line.amount | $Price %]</td> >diff --git a/members/maninvoice.pl b/members/maninvoice.pl >index 84ed122..816b005 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 05b73e5..d23b9a4 100755 >--- a/members/pay.pl >+++ b/members/pay.pl >@@ -178,6 +178,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( 'accountlines_id', "accountlines_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