Bug 34478: Manual fix - edi_ean (cud-ediorder)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Nick Clemens 2024-01-19 16:50:47 +00:00 committed by Jonathan Druart
parent ed70fdc2a8
commit acee057c4c
Signed by: jonathan.druart
GPG key ID: A085E712BEF0E0F0
4 changed files with 13 additions and 7 deletions

View file

@ -225,7 +225,7 @@ if ( $op eq 'cud-delete_confirm' ) {
ReopenBasket(scalar $query->param('basketno'));
print $query->redirect('/cgi-bin/koha/acqui/basket.pl?basketno='.$basket->{'basketno'})
}
elsif ( $op eq 'ediorder' ) {
elsif ( $op eq 'cud-ediorder' ) {
edi_close_and_order()
} elsif ( $op eq 'cud-mod_users' ) {
my $basketusers_ids = $query->param('users_ids');

View file

@ -41,7 +41,7 @@ my $basketno = $query->param('basketno');
if ( @eans == 1 ) {
my $ean = $eans[0]->ean;
print $query->redirect(
"/cgi-bin/koha/acqui/basket.pl?basketno=$basketno&op=ediorder&ean=$ean"
"/cgi-bin/koha/acqui/basket.pl?basketno=$basketno&op=cud-ediorder&ean=$ean"
);
}
else {

View file

@ -101,7 +101,12 @@
[% PROCESS csv_export %]
[% IF Koha.Preference('EDIFACT') && ediaccount %]
<div class="btn-group"><a href="/cgi-bin/koha/acqui/edi_ean.pl?op=ediorder&amp;basketno=[% basketno | uri %]&amp;booksellerid=[% booksellerid | uri %]" class="btn btn-default" id="ediorderbutton"><i class="fa fa-download"></i> Create EDIFACT order</a></div>
<div class="btn-group"><form action="/cgi-bin/koha/acqui/edi_ean.pl" method="post">
<input type="hidden" name="op" value="cud-ediorder" />
<input type="hidden" name="basketno" value="[% basketno | html %]" />
<input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
<button type="submit" class="btn btn-default" id="ediorderbutton"><i class="fa fa-download"></i> Create EDIFACT order</button>
</form></div>
[% END %]
[% IF ( active && books_loop ) %]
@ -882,7 +887,7 @@
[% IF edi_confirm %]
<div id="closebasket_needsconfirmation" class="dialog alert">
<form action="/cgi-bin/koha/acqui/basket.pl">
<form action="/cgi-bin/koha/acqui/basket.pl" method="post">
<h1>Are you sure you want to generate an EDIFACT order and close basket [% basketname | html %]?</h1>
[% IF CAN_user_acquisition_group_manage %]
<p>
@ -891,7 +896,7 @@
</p>
[% END %]
<input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
<input type="hidden" value="ediorder" name="op" />
<input type="hidden" value="cud-ediorder" name="op" />
<input type="hidden" name="ean" value="[% ean | html %]" />
<input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
<input type="hidden" name="confirm" value="1" />

View file

@ -34,7 +34,8 @@
<h1>Select the library account submitting the EDI order</h1>
<div class="page-section">
<form action="/cgi-bin/koha/acqui/basket.pl" method="get">
<form action="/cgi-bin/koha/acqui/basket.pl" method="post">
[% INCLUDE 'csrf-token.inc' %]
<p>Select ordering library account: </p>
<select id="ean" name="ean">
[% FOREACH eanacct IN eans %]
@ -42,7 +43,7 @@
[% END %]
</select>
<input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
<input type="hidden" value="ediorder" name="op" />
<input type="hidden" value="cud-ediorder" name="op" />
<p>
<input type="submit" class="btn btn-primary" value="Send EDI order" />
</p>