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

(-)a/acqui/cancelorder.pl (-2 / +2 lines)
Lines 48-61 my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( { Link Here
48
my $op = $input->param('op') || q{};
48
my $op = $input->param('op') || q{};
49
my $ordernumber = $input->param('ordernumber');
49
my $ordernumber = $input->param('ordernumber');
50
my $biblionumber = $input->param('biblionumber');
50
my $biblionumber = $input->param('biblionumber');
51
my $basketno = $input->param('basketno');
51
my $order  = Koha::Acquisition::Orders->find($ordernumber);
52
my $basketno = $order->basketno;
52
my $basket = Koha::Acquisition::Baskets->find({ basketno => $basketno }, { prefetch => 'booksellerid' });
53
my $basket = Koha::Acquisition::Baskets->find({ basketno => $basketno }, { prefetch => 'booksellerid' });
53
my $referrer = $input->param('referrer') || $input->referer;
54
my $referrer = $input->param('referrer') || $input->referer;
54
my $delete_biblio = $input->param('del_biblio') ? 1 : 0;
55
my $delete_biblio = $input->param('del_biblio') ? 1 : 0;
55
56
56
if( $op eq "cud-confirmcancel" ) {
57
if( $op eq "cud-confirmcancel" ) {
57
    my $reason = $input->param('reason');
58
    my $reason = $input->param('reason');
58
    my $order  = Koha::Acquisition::Orders->find($ordernumber);
59
    my @messages;
59
    my @messages;
60
    if( !$order ) {
60
    if( !$order ) {
61
        push @messages, Koha::Object::Message->new({ message => 'error_order_not_found', type => 'error' });
61
        push @messages, Koha::Object::Message->new({ message => 'error_order_not_found', type => 'error' });
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-3 / +2 lines)
Lines 729-738 Link Here
729
                                                                    [% IF ( books_loo.left_holds_on_order ) %]
729
                                                                    [% IF ( books_loo.left_holds_on_order ) %]
730
                                                                        <span class="button" title="Can't cancel order, ([% books_loo.holds_on_order | html %]) holds are linked with this order. Cancel holds first">Can't cancel order</span><br>
730
                                                                        <span class="button" title="Can't cancel order, ([% books_loo.holds_on_order | html %]) holds are linked with this order. Cancel holds first">Can't cancel order</span><br>
731
                                                                    [% ELSE %]
731
                                                                    [% ELSE %]
732
                                                                        <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% books_loo.ordernumber | uri %]&biblionumber=[% books_loo.biblionumber | uri %]&basketno=[% basketno | uri %]&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno | uri %]" class="button">Cancel order</a><br>
732
                                                                        <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% books_loo.ordernumber | uri %]&biblionumber=[% books_loo.biblionumber | uri %]&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno | uri %]" class="button">Cancel order</a><br>
733
                                                                    [% END %]
733
                                                                    [% END %]
734
                                                                    [% IF ( books_loo.can_del_bib ) %]
734
                                                                    [% IF ( books_loo.can_del_bib ) %]
735
                                                                        <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% books_loo.ordernumber | uri %]&biblionumber=[% books_loo.biblionumber | uri %]&basketno=[% basketno | uri %]&del_biblio=1&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno | uri %]" class="button">Cancel order and delete catalog record</a><br>
735
                                                                        <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% books_loo.ordernumber | uri %]&biblionumber=[% books_loo.biblionumber | uri %]&del_biblio=1&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno | uri %]" class="button">Cancel order and delete catalog record</a><br>
736
                                                                    [% ELSE %]
736
                                                                    [% ELSE %]
737
                                                                        <span class="button" title="Can't delete catalog record, see constraints below">Can't cancel order and delete catalog record</span><br>
737
                                                                        <span class="button" title="Can't delete catalog record, see constraints below">Can't cancel order and delete catalog record</span><br>
738
                                                                    [% END %]
738
                                                                    [% END %]
739
- 

Return to bug 36173