Bugzilla – Attachment 29665 Details for
Bug 7162
Factorize code for order cancellation and add field for giving a reason
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 7162: Factorize code for order cancellation (QA fixes)
PASSED-QA-Bug-7162-Factorize-code-for-order-cancel.patch (text/plain), 5.33 KB, created by
Katrin Fischer
on 2014-07-12 20:38:48 UTC
(
hide
)
Description:
[PASSED QA] Bug 7162: Factorize code for order cancellation (QA fixes)
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-07-12 20:38:48 UTC
Size:
5.33 KB
patch
obsolete
>From 3994df4a4170b162debd648e0225499f937d0658 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Mon, 7 Jul 2014 09:27:58 +0200 >Subject: [PATCH] [PASSED QA] Bug 7162: Factorize code for order cancellation > (QA fixes) > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Passes tests and QA script. >Checked cancelling the orders from the basket and from the receive page. >Both worked nicely. >Cancellation reason is shown on the cancelled order line in the basket. >--- > acqui/addorder.pl | 8 ++++---- > acqui/cancelorder.pl | 23 +++++++++++----------- > .../prog/en/modules/acqui/cancelorder.tt | 4 ++-- > t/db_dependent/Acquisition.t | 6 +++--- > 4 files changed, 21 insertions(+), 20 deletions(-) > >diff --git a/acqui/addorder.pl b/acqui/addorder.pl >index 91d980c..30c256d 100755 >--- a/acqui/addorder.pl >+++ b/acqui/addorder.pl >@@ -122,10 +122,10 @@ if it is an order from an existing suggestion : the id of this suggestion. > use strict; > use warnings; > use CGI; >-use C4::Auth; # get_template_and_user >-use C4::Acquisition; # NewOrder ModOrder >-use C4::Suggestions; # ModStatus >-use C4::Biblio; # AddBiblio TransformKohaToMarc >+use C4::Auth; # get_template_and_user >+use C4::Acquisition; # NewOrder ModOrder >+use C4::Suggestions; # ModStatus >+use C4::Biblio; # AddBiblio TransformKohaToMarc > use C4::Budgets; > use C4::Items; > use C4::Output; >diff --git a/acqui/cancelorder.pl b/acqui/cancelorder.pl >index c45b8da..a0b7597 100755 >--- a/acqui/cancelorder.pl >+++ b/acqui/cancelorder.pl >@@ -1,20 +1,21 @@ > #!/usr/bin/perl > >-# Copyright 2011 BibLibre SARL >+# Copyright 2014 BibLibre >+# > # This file is part of Koha. > # >-# Koha is free software; you can redistribute it and/or modify it under the >-# terms of the GNU General Public License as published by the Free Software >-# Foundation; either version 2 of the License, or (at your option) any later >-# version. >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. > # >-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY >-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR >-# A PARTICULAR PURPOSE. See the GNU General Public License for more details. >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. > # >-# You should have received a copy of the GNU General Public License along >-# with Koha; if not, write to the Free Software Foundation, Inc., >-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <http://www.gnu.org/licenses>. > > =head1 NAME > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/cancelorder.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/cancelorder.tt >index 8df5f2c..7f36cd1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/cancelorder.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/cancelorder.tt >@@ -34,8 +34,8 @@ > [% IF (del_biblio) %] > <input type="hidden" value="1" name="del_biblio" /> > [% END %] >- <input type="submit" class="approve" value="Yes, Cancel (Y)" accesskey="y" /> >- <input type="submit" class="deny" value="No, Don't Cancel (N)" accesskey="n" onclick="window.location='[% referrer %]';return false;" /> >+ <input type="submit" class="approve" value="Yes, cancel (Y)" accesskey="y" /> >+ <input type="submit" class="deny" value="No, don't cancel (N)" accesskey="n" onclick="window.location='[% referrer %]';return false;" /> > </div> > </form> > [% ELSE %] >diff --git a/t/db_dependent/Acquisition.t b/t/db_dependent/Acquisition.t >index 8abb0e0..2f7539e 100755 >--- a/t/db_dependent/Acquisition.t >+++ b/t/db_dependent/Acquisition.t >@@ -934,8 +934,8 @@ ok((defined $order1->{datecancellationprinted}), "order is cancelled"); > ok((not defined $order1->{cancellationreason}), "order has no cancellation reason"); > ok((defined GetBiblio($order1->{biblionumber})), "biblio still exists"); > >-my $order2 = GetOrder($ordernumbers[1]); >-my $error = DelOrder($order2->{biblionumber}, $order2->{ordernumber}, 1); >+$order2 = GetOrder($ordernumbers[1]); >+$error = DelOrder($order2->{biblionumber}, $order2->{ordernumber}, 1); > ok((not defined $error), "DelOrder does not fail"); > $order2 = GetOrder($order2->{ordernumber}); > ok((defined $order2->{datecancellationprinted}), "order is cancelled"); >@@ -943,7 +943,7 @@ ok((not defined $order2->{cancellationreason}), "order has no cancellation reaso > ok((not defined GetBiblio($order2->{biblionumber})), "biblio does not exist anymore"); > > my $order4 = GetOrder($ordernumbers[3]); >-my $error = DelOrder($order4->{biblionumber}, $order4->{ordernumber}, 1, "foobar"); >+$error = DelOrder($order4->{biblionumber}, $order4->{ordernumber}, 1, "foobar"); > ok((not defined $error), "DelOrder does not fail"); > $order4 = GetOrder($order4->{ordernumber}); > ok((defined $order4->{datecancellationprinted}), "order is cancelled"); >-- >1.9.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7162
:
6219
|
7007
|
9148
|
9238
|
13224
|
13225
|
16373
|
16374
|
16409
|
16457
|
18455
|
18456
|
19315
|
21333
|
21334
|
21335
|
22719
|
22720
|
22721
|
24075
|
24076
|
24077
|
26235
|
26236
|
26237
|
28353
|
28558
|
28559
|
28560
|
28836
|
29535
|
29536
|
29661
|
29662
|
29663
|
29664
|
29665
|
29698
|
29889
|
29890
|
29891
|
29892
|
29893
|
29894
|
29918
|
29943
|
32895
|
32896
|
32897
|
32898
|
32899
|
32900
|
32902