Bugzilla – Attachment 103382 Details for
Bug 22393
Remove last remaining manualinvoice use
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22393: (follow-up) Corrections for QA feedback
Bug-22393-follow-up-Corrections-for-QA-feedback.patch (text/plain), 2.98 KB, created by
Martin Renvoize (ashimema)
on 2020-04-21 14:57:01 UTC
(
hide
)
Description:
Bug 22393: (follow-up) Corrections for QA feedback
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-04-21 14:57:01 UTC
Size:
2.98 KB
patch
obsolete
>From 4f3fdb141e316f921c93169afc2c613d992af272 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 21 Apr 2020 15:54:45 +0100 >Subject: [PATCH] Bug 22393: (follow-up) Corrections for QA feedback > >We correct the behviour of 'amount' being passed back to the template >and add a work around for the existance of deleted_items alongside a FK >to items in the accountlines table. >--- > .../prog/en/modules/members/maninvoice.tt | 2 ++ > members/maninvoice.pl | 11 +++++++---- > 2 files changed, 9 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt >index dfbc5e2338..028bbf1ed6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt >@@ -104,8 +104,10 @@ > this.form.desc.value = this.options[this.selectedIndex].value; > this.form.amount.value = type_fees[this.options[this.selectedIndex].value]; > }); >+ [% UNLESS amount.defined %] > $("#maninvoice #desc").val($("#maninvoice #type option:selected").text()); > $("#maninvoice #amount").val(type_fees[$("#maninvoice #type option:selected").val()]); >+ [% END %] > $("#maninvoice #type").change(function(){ > $("#maninvoice #desc").val($(this).find("option:selected").text()); > $("#maninvoice #amount").val(type_fees[$(this).val()]); >diff --git a/members/maninvoice.pl b/members/maninvoice.pl >index 3b4736d8d3..c6c28ee9b4 100755 >--- a/members/maninvoice.pl >+++ b/members/maninvoice.pl >@@ -109,6 +109,7 @@ if ($add) { > # If barcode is passed, attempt to find the associated item > my $failed; > my $item_id; >+ my $olditem; # FIXME: When items and deleted_items are merged, we can remove this > my $issue_id; > if ($barcode) { > my $item = Koha::Items->find( { barcode => $barcode } ); >@@ -116,9 +117,11 @@ if ($add) { > $item_id = $item->itemnumber; > } > else { >- $item = Koha::Old::Items->find( { barcode => $barcode } ); >- if ($item) { >- $item_id = $item->itemnumber; >+ $item = Koha::Old::Items->search( { barcode => $barcode }, >+ { order_by => { -desc => 'timestamp' }, rows => 1 } ); >+ if ($item->count) { >+ $item_id = $item->next->itemnumber; >+ $olditem = 1; > } > else { > $template->param( error => 'itemnumber' ); >@@ -158,7 +161,7 @@ if ($add) { > interface => 'intranet', > library_id => $library_id, > type => $debit_type, >- item_id => $item_id, >+ ( $olditem ? () : ( item_id => $item_id ) ), > issue_id => $issue_id > } > ); >-- >2.20.1
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 22393
:
85516
|
95298
|
95303
|
95308
|
95309
|
95325
|
95326
|
98662
|
98663
|
103336
|
103382
|
103897
|
103898
|
106773
|
108330
|
108331
|
108332