Lines 132-152
sub delete_confirm {
Link Here
|
132 |
my $curr = shift; |
132 |
my $curr = shift; |
133 |
|
133 |
|
134 |
$template->param( delete_confirm => 1 ); |
134 |
$template->param( delete_confirm => 1 ); |
135 |
my $total_row = $dbh->selectrow_hashref( |
135 |
my ($nb_of_vendors) = $dbh->selectrow_array(q{ |
136 |
'select count(*) as total from aqbooksellers where currency=?', |
136 |
select count(*) from aqbooksellers |
137 |
{}, $curr ); |
137 |
where listprice = ? or invoiceprice = ? |
|
|
138 |
}, {}, $curr, $curr); |
139 |
my ($nb_of_orders) = $dbh->selectrow_array(q{ |
140 |
select count(*) from aqorders |
141 |
where currency = ? |
142 |
}, {}, $curr); |
138 |
|
143 |
|
139 |
my $curr_ref = $dbh->selectrow_hashref( |
144 |
my $curr_ref = $dbh->selectrow_hashref( |
140 |
'select currency,rate from currency where currency=?', |
145 |
'select currency,rate from currency where currency=?', |
141 |
{}, $curr ); |
146 |
{}, $curr ); |
142 |
|
147 |
|
143 |
if ( $total_row->{total} ) { |
|
|
144 |
$template->param( totalgtzero => 1 ); |
145 |
} |
146 |
|
147 |
$template->param( |
148 |
$template->param( |
148 |
rate => $curr_ref->{rate}, |
149 |
rate => $curr_ref->{rate}, |
149 |
total => $total_row->{total} |
150 |
nb_of_orders => $nb_of_orders, |
|
|
151 |
nb_of_vendors => $nb_of_vendors, |
150 |
); |
152 |
); |
151 |
|
153 |
|
152 |
return; |
154 |
return; |