From 3790439ed6b3cc2e04f2fe9ef34684f1b4f61a0d Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 15 Jul 2019 18:01:25 +0000 Subject: [PATCH] Bug 23320 - Removed unused close parameter in neworderempty To test: 1 - Add to basket 2 - Note the options on the page 3 - Add &close=1 to the url 4 - Note some inputs are disabled 5 - Save anyway, note it is a regular order 6 - Add another order to basket 7 - Save it 8 - Modify 9 - Add close to the url again 10 - Save changes 11 - No functional change 12 - Apply patch 13 - Note close parameter has no effect now 14 - Confirm you can place and confirm orders as before --- acqui/neworderempty.pl | 15 +--- .../prog/en/modules/acqui/neworderempty.tt | 96 +++++++--------------- 2 files changed, 29 insertions(+), 82 deletions(-) diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl index 9ca2b5b05a..60958c4e27 100755 --- a/acqui/neworderempty.pl +++ b/acqui/neworderempty.pl @@ -60,8 +60,6 @@ if this order comes from a suggestion. =item breedingid the item's id in the breeding reservoir -=item close - =back =cut @@ -106,7 +104,6 @@ my $ordernumber = $input->param('ordernumber') || ''; our $biblionumber = $input->param('biblionumber'); our $basketno = $input->param('basketno'); my $suggestionid = $input->param('suggestionid'); -my $close = $input->param('close'); my $uncertainprice = $input->param('uncertainprice'); my $import_batch_id = $input->param('import_batch_id'); # if this is filled, we come from a staged file, and we will return here after saving the order ! my $from_subscriptionid = $input->param('from_subscriptionid'); @@ -335,11 +332,6 @@ foreach my $r (@{$budgets}) { }; } -if ($close) { - $budget_id = $data->{'budget_id'}; - $budget_name = $budget->{'budget_name'}; - -} $template->param( sort1 => $data->{'sort1'} ); $template->param( sort2 => $data->{'sort2'} ); @@ -390,12 +382,6 @@ if ( defined $from_subscriptionid ) { # Find the items.barcode subfield for barcode validations my (undef, $barcode_subfield) = GetMarcFromKohaField('items.barcode', ''); -# fill template -$template->param( - close => $close, - budget_id => $budget_id, - budget_name => $budget_name -) if ($close); # get option values for gist syspref my @gst_values = map { @@ -407,6 +393,7 @@ my $quantity = $input->param('rr_quantity_to_order') ? $data->{'quantity'}; $quantity //= 0; +# fill template $template->param( existing => $biblionumber, ordernumber => $ordernumber, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt index ff0113f563..e4dc6d1239 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -297,28 +297,23 @@ Accounting details
  1. - [% IF ( close ) %] - Quantity: - [% quantity | html %] + + [% IF subscriptionid %] + + [% ELSIF AcqCreateItemOrdering %] + [% IF basket.is_standing %] + + [% ELSE %] + + [% END %] [% ELSE %] - - [% IF subscriptionid %] - - [% ELSIF AcqCreateItemOrdering %] - [% IF basket.is_standing %] - - [% ELSE %] - - [% END %] + [% IF basket.is_standing %] + [% ELSE %] - [% IF basket.is_standing %] - - [% ELSE %] - - [% END %] + [% END %] - Required [% END %] + Required @@ -333,10 +328,6 @@ [% END %]
  2. - [% IF ( close ) %] - Fund: - [% Budget_name | html %] - [% ELSE %] [% active_count = 0 %] [% IF !ordernumber %] @@ -364,7 +355,6 @@ [% END %] [% budget_loo.b_txt | html %][% IF !budget_loo.b_active %] (inactive)[% END %] - [% END %] Required @@ -372,10 +362,6 @@ [% END %]
  3. - [% IF ( close ) %] - Currency: - [% currency | html %] - [% ELSE %] [% END %]
  4. - [% IF ( close ) %] - Vendor price: - [% listprice | html %] [% IF (listincgst == 1) %](tax inclusive)[% ELSE %](tax exclusive)[% END %] - [% ELSE %] [% IF (listincgst == 1) %](tax inclusive)[% ELSE %](tax exclusive)[% END %] - [% END %]
  5. - [% UNLESS ( close ) %]
  6. [% IF ( uncertainprice ) %] @@ -406,52 +385,33 @@ [% END %]
  7. - [% END %] [% IF ( gst_values ) %]
  8. - [% IF ( close ) %] - Tax rate: - [% tax_rate | html %]% - [% ELSE %] - - + + + [% ELSE %]
  9. [% END %]
  10. - [% IF ( close ) %] - [% IF ( orderdiscount ) %] - [% orderdiscount_2dp | html %]% - [% ELSE %] - [% discount_2dp | html %]% - [% END %] + [% IF ( orderdiscount ) %] + % [% ELSE %] - [% IF ( orderdiscount ) %] - % - [% ELSE %] - % - [% END %] + % [% END %]
  11. - [% IF ( close ) %] - Retail price: - [% rrp | html %] (adjusted for [% cur_active | html %], [% IF (listincgst == 1) %]tax inclusive[% ELSE %]tax exclusive[% END %]) - [% ELSE %] - - (adjusted for [% cur_active | html %], [% IF (listincgst == 1) %]tax inclusive[% ELSE %]tax exclusive[% END %]) - [% END %] + + (adjusted for [% cur_active | html %], [% IF (listincgst == 1) %]tax inclusive[% ELSE %]tax exclusive[% END %])
  12. -- 2.11.0