Lines 306-312
if ( $op eq 'delete_confirm' ) {
Link Here
|
306 |
|
306 |
|
307 |
my @cancelledorders = GetCancelledOrders($basketno); |
307 |
my @cancelledorders = GetCancelledOrders($basketno); |
308 |
foreach (@cancelledorders) { |
308 |
foreach (@cancelledorders) { |
309 |
$_->{'line_total'} = sprintf("%.2f", $_->{'ecost'} * $_->{'quantity'}); |
309 |
$_->{'line_total'} = $_->{'ecost'} * $_->{'quantity'}; |
310 |
} |
310 |
} |
311 |
|
311 |
|
312 |
$template->param( |
312 |
$template->param( |
Lines 330-338
if ( $op eq 'delete_confirm' ) {
Link Here
|
330 |
book_foot_loop => \@book_foot_loop, |
330 |
book_foot_loop => \@book_foot_loop, |
331 |
cancelledorders_loop => \@cancelledorders, |
331 |
cancelledorders_loop => \@cancelledorders, |
332 |
total_quantity => $total_quantity, |
332 |
total_quantity => $total_quantity, |
333 |
total_gste => sprintf( "%.2f", $total_gste ), |
333 |
total_gste => $total_gste, |
334 |
total_gsti => sprintf( "%.2f", $total_gsti ), |
334 |
total_gsti => $total_gsti, |
335 |
total_gstvalue => sprintf( "%.2f", $total_gstvalue ), |
335 |
total_gstvalue => $total_gstvalue, |
336 |
currency => $cur->{'currency'}, |
336 |
currency => $cur->{'currency'}, |
337 |
listincgst => $bookseller->{listincgst}, |
337 |
listincgst => $bookseller->{listincgst}, |
338 |
basketgroups => $basketgroups, |
338 |
basketgroups => $basketgroups, |
Lines 358-382
sub get_order_infos {
Link Here
|
358 |
$line{budget_name} = $budget->{budget_name}; |
358 |
$line{budget_name} = $budget->{budget_name}; |
359 |
$line{rrp} = ConvertCurrency( $order->{'currency'}, $line{rrp} ); # FIXME from comm |
359 |
$line{rrp} = ConvertCurrency( $order->{'currency'}, $line{rrp} ); # FIXME from comm |
360 |
if ( $bookseller->{'listincgst'} ) { |
360 |
if ( $bookseller->{'listincgst'} ) { |
361 |
$line{rrpgsti} = sprintf( "%.2f", $line{rrp} ); |
361 |
$line{rrpgsti} = $line{rrp}; |
362 |
$line{gstgsti} = sprintf( "%.2f", $line{gstrate} * 100 ); |
362 |
$line{gstgsti} = $line{gstrate} * 100; |
363 |
$line{rrpgste} = sprintf( "%.2f", $line{rrp} / ( 1 + ( $line{gstgsti} / 100 ) ) ); |
363 |
$line{rrpgste} = $line{rrp} / ( 1 + ( $line{gstgsti} / 100 ) ); |
364 |
$line{gstgste} = sprintf( "%.2f", $line{gstgsti} / ( 1 + ( $line{gstgsti} / 100 ) ) ); |
364 |
$line{gstgste} = $line{gstgsti} / ( 1 + ( $line{gstgsti} / 100 ) ); |
365 |
$line{ecostgsti} = sprintf( "%.2f", $line{ecost} ); |
365 |
$line{ecostgsti} = $line{ecost}; |
366 |
$line{ecostgste} = sprintf( "%.2f", $line{ecost} / ( 1 + ( $line{gstgsti} / 100 ) ) ); |
366 |
$line{ecostgste} = $line{ecost} / ( 1 + ( $line{gstgsti} / 100 ) ); |
367 |
$line{gstvalue} = sprintf( "%.2f", ( $line{ecostgsti} - $line{ecostgste} ) * $line{quantity}); |
367 |
$line{gstvalue} = ( $line{ecostgsti} - $line{ecostgste} ) * $line{quantity}; |
368 |
$line{totalgste} = sprintf( "%.2f", $order->{quantity} * $line{ecostgste} ); |
368 |
$line{totalgste} = $order->{quantity} * $line{ecostgste}; |
369 |
$line{totalgsti} = sprintf( "%.2f", $order->{quantity} * $line{ecostgsti} ); |
369 |
$line{totalgsti} = $order->{quantity} * $line{ecostgsti}; |
370 |
} else { |
370 |
} else { |
371 |
$line{rrpgsti} = sprintf( "%.2f", $line{rrp} * ( 1 + ( $line{gstrate} ) ) ); |
371 |
$line{rrpgsti} = $line{rrp} * ( 1 + ( $line{gstrate} ) ); |
372 |
$line{rrpgste} = sprintf( "%.2f", $line{rrp} ); |
372 |
$line{rrpgste} = $line{rrp}; |
373 |
$line{gstgsti} = sprintf( "%.2f", $line{gstrate} * 100 ); |
373 |
$line{gstgsti} = $line{gstrate} * 100; |
374 |
$line{gstgste} = sprintf( "%.2f", $line{gstrate} * 100 ); |
374 |
$line{gstgste} = $line{gstrate} * 100; |
375 |
$line{ecostgsti} = sprintf( "%.2f", $line{ecost} * ( 1 + ( $line{gstrate} ) ) ); |
375 |
$line{ecostgsti} = $line{ecost} * ( 1 + ( $line{gstrate} ) ); |
376 |
$line{ecostgste} = sprintf( "%.2f", $line{ecost} ); |
376 |
$line{ecostgste} = $line{ecost}; |
377 |
$line{gstvalue} = sprintf( "%.2f", ( $line{ecostgsti} - $line{ecostgste} ) * $line{quantity}); |
377 |
$line{gstvalue} = ( $line{ecostgsti} - $line{ecostgste} ) * $line{quantity}; |
378 |
$line{totalgste} = sprintf( "%.2f", $order->{quantity} * $line{ecostgste} ); |
378 |
$line{totalgste} = $order->{quantity} * $line{ecostgste}; |
379 |
$line{totalgsti} = sprintf( "%.2f", $order->{quantity} * $line{ecostgsti} ); |
379 |
$line{totalgsti} = $order->{quantity} * $line{ecostgsti}; |
380 |
} |
380 |
} |
381 |
|
381 |
|
382 |
if ( $line{uncertainprice} ) { |
382 |
if ( $line{uncertainprice} ) { |