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 934-941 ok((defined $order1->{datecancellationprinted}), "order is cancelled"); Link Here
934
ok((not defined $order1->{cancellationreason}), "order has no cancellation reason");
934
ok((not defined $order1->{cancellationreason}), "order has no cancellation reason");
935
ok((defined GetBiblio($order1->{biblionumber})), "biblio still exists");
935
ok((defined GetBiblio($order1->{biblionumber})), "biblio still exists");
936
936
937
my $order2 = GetOrder($ordernumbers[1]);
937
$order2 = GetOrder($ordernumbers[1]);
938
my $error = DelOrder($order2->{biblionumber}, $order2->{ordernumber}, 1);
938
$error = DelOrder($order2->{biblionumber}, $order2->{ordernumber}, 1);
939
ok((not defined $error), "DelOrder does not fail");
939
ok((not defined $error), "DelOrder does not fail");
940
$order2 = GetOrder($order2->{ordernumber});
940
$order2 = GetOrder($order2->{ordernumber});
941
ok((defined $order2->{datecancellationprinted}), "order is cancelled");
941
ok((defined $order2->{datecancellationprinted}), "order is cancelled");
Lines 943-949 ok((not defined $order2->{cancellationreason}), "order has no cancellation reaso Link Here
943
ok((not defined GetBiblio($order2->{biblionumber})), "biblio does not exist anymore");
943
ok((not defined GetBiblio($order2->{biblionumber})), "biblio does not exist anymore");
944
944
945
my $order4 = GetOrder($ordernumbers[3]);
945
my $order4 = GetOrder($ordernumbers[3]);
946
my $error = DelOrder($order4->{biblionumber}, $order4->{ordernumber}, 1, "foobar");
946
$error = DelOrder($order4->{biblionumber}, $order4->{ordernumber}, 1, "foobar");
947
ok((not defined $error), "DelOrder does not fail");
947
ok((not defined $error), "DelOrder does not fail");
948
$order4 = GetOrder($order4->{ordernumber});
948
$order4 = GetOrder($order4->{ordernumber});
949
ok((defined $order4->{datecancellationprinted}), "order is cancelled");
949
ok((defined $order4->{datecancellationprinted}), "order is cancelled");
950
- 

Return to bug 7162