From 810c256b591c9df53c0409aefbdad14f4c1a1a6b Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 15 Jun 2020 21:06:38 +0000 Subject: [PATCH] Bug 25763: Allow updating of order fund from invoice To test: 1 - Receive some orders via acquisitions 2 - View the invoice with these orders 3 - Click 'Modify fund' on the received orders list 4 - Confirm you can change the fund 5 - Set some authorised value categories for funds 6 - Reload the invoice 7 - Confirm the categories dropdowns change when different funds selected 8 - Confirm updating the statistic fields saves correctly 9 - Add an inactive budget with some funds 10 - Test the 'show inactive' button on shipment fund, adjustments, and modifying order fund Signed-off-by: Barbara Johnson Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- acqui/invoice.pl | 3 + .../prog/en/modules/acqui/invoice.tt | 189 ++++++++++++------ 2 files changed, 132 insertions(+), 60 deletions(-) diff --git a/acqui/invoice.pl b/acqui/invoice.pl index 0f8f57b6f6..0e21a20c11 100755 --- a/acqui/invoice.pl +++ b/acqui/invoice.pl @@ -303,6 +303,8 @@ foreach my $r ( @{$budgets} ) { b_txt => $r->{budget_name}, b_active => $r->{budget_period_active}, selected => $selected, + b_sort1_authcat => $r->{'sort1_authcat'}, + b_sort2_authcat => $r->{'sort2_authcat'}, }; } @@ -326,6 +328,7 @@ $template->param( suppliername => $details->{'suppliername'}, booksellerid => $details->{'booksellerid'}, shipmentdate => $details->{'shipmentdate'}, + shipment_budget_id => $shipmentcost_budgetid, billingdate => $details->{'billingdate'}, invoiceclosedate => $details->{'closedate'}, shipmentcost => $shipmentcost, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt index f520f0e5e5..b94c400b69 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt @@ -5,6 +5,53 @@ [% USE Price %] [% SET footerjs = 1 %] [% USE AuthorisedValues %] +[% Asset.css("css/humanmsg.css") | $raw %] + + +[% BLOCK fund_dropdown %] + + + + + + +[% END %] + + + [% INCLUDE 'doc-head-open.inc' %] Invoice › Acquisitions › Koha @@ -96,25 +143,7 @@ [% END %]
  • - - [% IF readonly %] - [% budget.budget_name | html %] - [% ELSE %] - - - - [% END %] + [% PROCESS fund_dropdown form_id => 'shipment_budget_id' form_name => 'shipment_budget_id' selected => shipment_budget_id %]
  • [% IF ( invoiceclosedate ) %] @@ -218,26 +247,7 @@ [% END %] - [% IF readonly %] - [% adjustement.fund.budget_name | html %] - [% ELSE %] - - [% END %] + [% PROCESS fund_dropdown form_id => "budget_id_" _ adjustment.adjustment_id form_name => 'budget_id' selected => adjustment.budget_id %] [% IF adjustment.encumber_open %] @@ -304,21 +314,7 @@
  • - - - - + [% PROCESS fund_dropdown form_id => "budget_id_new" form_name => 'budget_id' selected => "" %]
  • @@ -393,7 +389,10 @@ [% order.total_tax_included | $Price %] [% order.tax_rate * 100 | html %] [% order.tax_value | $Price %] - [% order.budget_name | html %] + + [% order.budget_name | html %]
    + Modify fund + [% END %] @@ -484,6 +483,8 @@ [% MACRO jsinclude BLOCK %] [% Asset.js("js/acquisitions-menu.js") | $raw %] + [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %] + [% Asset.js("js/acq.js") | $raw %] [% INCLUDE 'calendar.inc' %] [% INCLUDE 'datatables.inc' %]