View | Details | Raw Unified | Return to bug 7162
Collapse All | Expand All

(-)a/acqui/addorder.pl (-4 / +4 lines)
Lines 122-131 if it is an order from an existing suggestion : the id of this suggestion. Link Here
122
use strict;
122
use strict;
123
use warnings;
123
use warnings;
124
use CGI;
124
use CGI;
125
use C4::Auth;			# get_template_and_user
125
use C4::Auth;           # get_template_and_user
126
use C4::Acquisition;	# NewOrder ModOrder
126
use C4::Acquisition;    # NewOrder ModOrder
127
use C4::Suggestions;	# ModStatus
127
use C4::Suggestions;    # ModStatus
128
use C4::Biblio;			# AddBiblio TransformKohaToMarc
128
use C4::Biblio;         # AddBiblio TransformKohaToMarc
129
use C4::Budgets;
129
use C4::Budgets;
130
use C4::Items;
130
use C4::Items;
131
use C4::Output;
131
use C4::Output;
(-)a/acqui/cancelorder.pl (-11 / +12 lines)
Lines 1-20 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
# Copyright 2011 BibLibre SARL
3
# Copyright 2014 BibLibre
4
#
4
# This file is part of Koha.
5
# This file is part of Koha.
5
#
6
#
6
# Koha is free software; you can redistribute it and/or modify it under the
7
# Koha is free software; you can redistribute it and/or modify it
7
# terms of the GNU General Public License as published by the Free Software
8
# under the terms of the GNU General Public License as published by
8
# Foundation; either version 2 of the License, or (at your option) any later
9
# the Free Software Foundation; either version 3 of the License, or
9
# version.
10
# (at your option) any later version.
10
#
11
#
11
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
12
# Koha is distributed in the hope that it will be useful, but
12
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
13
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
14
#
16
#
15
# You should have received a copy of the GNU General Public License along
17
# You should have received a copy of the GNU General Public License
16
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
19
19
=head1 NAME
20
=head1 NAME
20
21
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/cancelorder.tt (-2 / +2 lines)
Lines 34-41 Link Here
34
          [% IF (del_biblio) %]
34
          [% IF (del_biblio) %]
35
            <input type="hidden" value="1" name="del_biblio" />
35
            <input type="hidden" value="1" name="del_biblio" />
36
          [% END %]
36
          [% END %]
37
          <input type="submit" class="approve" value="Yes, Cancel (Y)" accesskey="y" />
37
          <input type="submit" class="approve" value="Yes, cancel (Y)" accesskey="y" />
38
          <input type="submit" class="deny" value="No, Don't Cancel (N)" accesskey="n" onclick="window.location='[% referrer %]';return false;" />
38
          <input type="submit" class="deny" value="No, don't cancel (N)" accesskey="n" onclick="window.location='[% referrer %]';return false;" />
39
        </div>
39
        </div>
40
      </form>
40
      </form>
41
      [% ELSE %]
41
      [% ELSE %]
(-)a/t/db_dependent/Acquisition.t (-4 / +3 lines)
Lines 920-927 ok((defined $order1->{datecancellationprinted}), "order is cancelled"); Link Here
920
ok((not defined $order1->{cancellationreason}), "order has no cancellation reason");
920
ok((not defined $order1->{cancellationreason}), "order has no cancellation reason");
921
ok((defined GetBiblio($order1->{biblionumber})), "biblio still exists");
921
ok((defined GetBiblio($order1->{biblionumber})), "biblio still exists");
922
922
923
my $order2 = GetOrder($ordernumbers[1]);
923
$order2 = GetOrder($ordernumbers[1]);
924
my $error = DelOrder($order2->{biblionumber}, $order2->{ordernumber}, 1);
924
$error = DelOrder($order2->{biblionumber}, $order2->{ordernumber}, 1);
925
ok((not defined $error), "DelOrder does not fail");
925
ok((not defined $error), "DelOrder does not fail");
926
$order2 = GetOrder($order2->{ordernumber});
926
$order2 = GetOrder($order2->{ordernumber});
927
ok((defined $order2->{datecancellationprinted}), "order is cancelled");
927
ok((defined $order2->{datecancellationprinted}), "order is cancelled");
Lines 929-935 ok((not defined $order2->{cancellationreason}), "order has no cancellation reaso Link Here
929
ok((not defined GetBiblio($order2->{biblionumber})), "biblio does not exist anymore");
929
ok((not defined GetBiblio($order2->{biblionumber})), "biblio does not exist anymore");
930
930
931
my $order4 = GetOrder($ordernumbers[3]);
931
my $order4 = GetOrder($ordernumbers[3]);
932
my $error = DelOrder($order4->{biblionumber}, $order4->{ordernumber}, 1, "foobar");
932
$error = DelOrder($order4->{biblionumber}, $order4->{ordernumber}, 1, "foobar");
933
ok((not defined $error), "DelOrder does not fail");
933
ok((not defined $error), "DelOrder does not fail");
934
$order4 = GetOrder($order4->{ordernumber});
934
$order4 = GetOrder($order4->{ordernumber});
935
ok((defined $order4->{datecancellationprinted}), "order is cancelled");
935
ok((defined $order4->{datecancellationprinted}), "order is cancelled");
936
- 

Return to bug 7162