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 132-148
elsif ( $op eq 'delete_confirm' ) {
Link Here
|
132 |
} |
132 |
} |
133 |
#DELETE_CONFIRMED: called by delete_confirm, used to effectively confirm deletion of data in DB |
133 |
#DELETE_CONFIRMED: called by delete_confirm, used to effectively confirm deletion of data in DB |
134 |
elsif ( $op eq 'delete_confirmed' ) { |
134 |
elsif ( $op eq 'delete_confirmed' ) { |
135 |
$template->param( delete_confirmed => 1 ); |
135 |
my $deleted = DelContract( { contractnumber => $contractnumber } ); |
136 |
|
136 |
|
137 |
DelContract( { contractnumber => $contractnumber } ); |
137 |
if ( $deleted ) { |
138 |
|
138 |
print $input->redirect("/cgi-bin/koha/acqui/supplier.pl?booksellerid=$booksellerid"); |
139 |
print $input->redirect("/cgi-bin/koha/acqui/supplier.pl?booksellerid=$booksellerid"); |
139 |
exit; |
140 |
exit; |
140 |
} else { |
|
|
141 |
$template->param( error => 'not_deleted' ); |
142 |
$op = 'list'; |
143 |
} |
141 |
|
144 |
|
142 |
# END $OP eq DELETE_CONFIRMED |
145 |
# END $OP eq LIST |
143 |
} |
146 |
} |
144 |
# DEFAULT: Builds a list of contracts and displays them |
147 |
# DEFAULT: Builds a list of contracts and displays them |
145 |
else { |
148 |
if ( $op eq 'list' ) { |
146 |
$template->param(else => 1); |
149 |
$template->param(else => 1); |
147 |
|
150 |
|
148 |
# get contracts |
151 |
# get contracts |