From 0f3989dec77a516a07f29eece046315af70bf538 Mon Sep 17 00:00:00 2001
From: Katrin Fischer <katrin.fischer.83@web.de>
Date: Sat, 7 Jan 2023 00:46:20 +0100
Subject: [PATCH] Bug 32400: (follow-up) Add page-section to table of moved
 orders

To test:
* Make sure you have at least one open order, basket closed
* Go to Administration > budgets
* Clone the budget
* Close the budget
* Choose your new budget and save
* Confirm 'can't undo later...' question
* Verify the table of moved orders has the white background
  from the added page-section

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
---
 .../prog/en/modules/admin/aqbudgetperiods.tt  | 91 ++++++++++---------
 1 file changed, 47 insertions(+), 44 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt
index a4fd620120..78ef29164a 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt
@@ -415,52 +415,55 @@
   [% END %]
 [% ELSIF closed %]
     <h1>Budget [% budget_period_description | html %] closed</h1>
-  <h3>Report after moving unreceived orders from budget [% from_budget_period.budget_period_description | html %] ([% from_budget_period.budget_period_startdate | $KohaDates %] - [% from_budget_period.budget_period_enddate | $KohaDates %]) to [% to_budget_period.budget_period_description | html %] ([% to_budget_period.budget_period_startdate | $KohaDates %] - [% to_budget_period.budget_period_enddate | $KohaDates%])</h3>
-
-  <table id="closed_report">
-    <thead>
-      <tr>
-        <td>Budget id</td>
-        <td>Basket</td>
-        <td>Ordernumber</td>
-        <td>Details</td>
-      </tr>
-    </thead>
-    <tbody>
-      [% FOR r IN report %]
-          [% IF r.moved %]
-            [% IF r.orders_moved.size > 0 %]
-              [% FOR order IN r.orders_moved %]
-                <tr>
-                  <td>[% r.budget.budget_name | html %] (id=[% r.budget.budget_id | html %]) Amount=[% r.budget.budget_amount | $Price %][% IF r.unspent_moved %] ([% r.unspent_moved | $Price %] remaining has been moved)[% END %]</td>
-                  <td>[% order.basketname | html %]</td>
-                  <td>[% order.ordernumber | html %]</td>
-                  <td>Moved!</td>
-                </tr>
+
+    <div class="page-section">
+        <h3>Report after moving unreceived orders from budget [% from_budget_period.budget_period_description | html %] ([% from_budget_period.budget_period_startdate | $KohaDates %] - [% from_budget_period.budget_period_enddate | $KohaDates %]) to [% to_budget_period.budget_period_description | html %] ([% to_budget_period.budget_period_startdate | $KohaDates %] - [% to_budget_period.budget_period_enddate | $KohaDates%])</h3>
+
+        <table id="closed_report">
+        <thead>
+          <tr>
+            <td>Budget id</td>
+            <td>Basket</td>
+            <td>Ordernumber</td>
+            <td>Details</td>
+          </tr>
+        </thead>
+        <tbody>
+          [% FOR r IN report %]
+              [% IF r.moved %]
+                [% IF r.orders_moved.size > 0 %]
+                  [% FOR order IN r.orders_moved %]
+                    <tr>
+                      <td>[% r.budget.budget_name | html %] (id=[% r.budget.budget_id | html %]) Amount=[% r.budget.budget_amount | $Price %][% IF r.unspent_moved %] ([% r.unspent_moved | $Price %] remaining has been moved)[% END %]</td>
+                      <td>[% order.basketname | html %]</td>
+                      <td>[% order.ordernumber | html %]</td>
+                      <td>Moved!</td>
+                    </tr>
+                  [% END %]
+                [% ELSE %]
+                  <tr>
+                    <td>[% r.budget.budget_name | html %] (id=[% r.budget.budget_id | html %])</td>
+                    <td></td>
+                    <td></td>
+                    <td>There were no unreceived orders for this fund.</td>
+                  </tr>
+                [% END %]
+              [% ELSE %]
+                [% IF r.error == 'budget_code_not_exists' %]
+                  <tr>
+                    <td>[% r.budget.budget_id | html %] [% r.budget.budget_amount | $Price %][% IF r.unspent_moved %] ([% r.unspent_moved | $Price %] remaining has been moved)[% END %]</td>
+                    <td></td>
+                    <td></td>
+                    <td>This fund code does not exist in the destination budget.</td>
+                  </tr>
+                [% END %]
               [% END %]
-            [% ELSE %]
-              <tr>
-                <td>[% r.budget.budget_name | html %] (id=[% r.budget.budget_id | html %])</td>
-                <td></td>
-                <td></td>
-                <td>There were no unreceived orders for this fund.</td>
-              </tr>
-            [% END %]
-          [% ELSE %]
-            [% IF r.error == 'budget_code_not_exists' %]
-              <tr>
-                <td>[% r.budget.budget_id | html %] [% r.budget.budget_amount | $Price %][% IF r.unspent_moved %] ([% r.unspent_moved | $Price %] remaining has been moved)[% END %]</td>
-                <td></td>
-                <td></td>
-                <td>This fund code does not exist in the destination budget.</td>
-              </tr>
-            [% END %]
+            </tr>
           [% END %]
-        </tr>
-      [% END %]
-    </tbody>
-  </table>
-  <a class="cancel" href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Back</a>
+        </tbody>
+        </table>
+        <a class="cancel" href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Back</a>
+    </div>
 [% END %]
 
 <!--  DEFAULT  display budget periods list -->
-- 
2.30.2