Bug 23863: Editing a basket clears create_items value
authorKyle M Hall <kyle@bywatersolutions.com>
Tue, 22 Oct 2019 18:07:46 +0000 (14:07 -0400)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 24 Oct 2019 09:56:01 +0000 (10:56 +0100)
Test Plan:
1) Create a basket with a non-default value for aqbasket.create_items
2) Click Edit from basket.pl
3) Click Save without changing anything
4) Note that aqbasket.create_items is no longer set
5) Apply this patch
6) Restart all the things!
7) Repeat steps 1-3
8) Note create_items is unchanged!

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

acqui/basketheader.pl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketheader.tt

index 202f6b9..0eb479f 100755 (executable)
@@ -131,6 +131,7 @@ if ( $op eq 'add_form' ) {
                     basketno => $basketno,
                     booksellers => \@booksellers,
                     is_standing => $basket->{is_standing},
+                    create_items => $basket->{create_items},
     );
 
     my $billingplace = $basket->{'billingplace'} || C4::Context->userenv->{"branch"};
index f6a89c7..4b87af4 100644 (file)
                     [% END %]
                     <div class="hint">Standing orders do not close when received.</div>
                 </li>
-                [% UNLESS basketno %]
+                [% IF basketno %]
+                    <input type="hidden" name="create_items" value="[% create_items %]" />
+                [% ELSE %]
                  <li>
                     <label for="create_items">Create items when:</label>
                     <select name="create_items" id="create_items">