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

(-)a/admin/aqcontract.pl (-8 / +11 lines)
Lines 33-39 use C4::Contract; Link Here
33
my $input          = new CGI;
33
my $input          = new CGI;
34
my $contractnumber = $input->param('contractnumber');
34
my $contractnumber = $input->param('contractnumber');
35
my $booksellerid   = $input->param('booksellerid');
35
my $booksellerid   = $input->param('booksellerid');
36
my $op             = $input->param('op') || '';
36
my $op             = $input->param('op') || 'list';
37
37
38
my $bookseller = GetBookSellerFromId($booksellerid);
38
my $bookseller = GetBookSellerFromId($booksellerid);
39
39
Lines 133-149 elsif ( $op eq 'delete_confirm' ) { Link Here
133
}
133
}
134
#DELETE_CONFIRMED: called by delete_confirm, used to effectively confirm deletion of data in DB
134
#DELETE_CONFIRMED: called by delete_confirm, used to effectively confirm deletion of data in DB
135
elsif ( $op eq 'delete_confirmed' ) {
135
elsif ( $op eq 'delete_confirmed' ) {
136
    $template->param( delete_confirmed => 1 );
136
    my $deleted = DelContract( { contractnumber => $contractnumber } );
137
137
138
    DelContract( { contractnumber => $contractnumber } );
138
    if ( $deleted ) {
139
139
        print $input->redirect("/cgi-bin/koha/acqui/supplier.pl?booksellerid=$booksellerid");
140
    print $input->redirect("/cgi-bin/koha/acqui/supplier.pl?booksellerid=$booksellerid");
140
        exit;
141
    exit;
141
    } else {
142
        $template->param( error => 'not_deleted' );
143
        $op = 'list';
144
    }
142
145
143
    # END $OP eq DELETE_CONFIRMED
146
    # END $OP eq LIST
144
}
147
}
145
# DEFAULT: Builds a list of contracts and displays them
148
# DEFAULT: Builds a list of contracts and displays them
146
else {
149
if ( $op eq 'list' ) {
147
    $template->param(else => 1);
150
    $template->param(else => 1);
148
151
149
    # get contracts
152
    # get contracts
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqcontract.tt (-1 / +5 lines)
Lines 90-95 function Check(ff) { Link Here
90
    <div class="yui-b">
90
    <div class="yui-b">
91
91
92
[% INCLUDE 'acquisitions-toolbar.inc' %]
92
[% INCLUDE 'acquisitions-toolbar.inc' %]
93
94
[% IF error == 'not_deleted' %]
95
    <div class="dialog alert">Contract has not been deleted. Maybe a basket linked to this contract exists.</div>
96
[% END %]
97
93
                [% IF ( add_form ) %]
98
                [% IF ( add_form ) %]
94
                    <form name="Aform" action="[% script_name %]" method="post">
99
                    <form name="Aform" action="[% script_name %]" method="post">
95
                        <input type="hidden" name="op" value="add_validate" />
100
                        <input type="hidden" name="op" value="add_validate" />
96
- 

Return to bug 12508