From 80a5cfd705b80f28c4bf74cc3e8a59bdeff5018e 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Séverine QUEUNE Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- acqui/neworderempty.pl | 15 +-- .../prog/en/modules/acqui/neworderempty.tt | 98 ++++++------------- 2 files changed, 30 insertions(+), 83 deletions(-) diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl index 862719b51e..a10bf4663f 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'); @@ -338,11 +335,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'} ); @@ -394,12 +386,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 { @@ -411,6 +397,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 04a41a9e96..c2d0a1cb12 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -299,28 +299,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 @@ -335,10 +330,6 @@ [% END %]
  2. - [% IF ( close ) %] - Fund: - [% Budget_name | html %] - [% ELSE %] [% active_count = 0 %] [% IF !ordernumber %] @@ -364,20 +355,15 @@ style="padding-left:[% budget_loo.b_level | html %]em;" > [% END %] - [% budget_loo.b_txt | html %][% IF !budget_loo.b_active %] (inactive)[% END %] + [% budget_loo.b_txt | html %][% IF !budget_loo.b_active %] (inactive)[% END %] [% END %] Required - [% 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 ) %] @@ -408,52 +387,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.39.5