Lines 357-370
if ( $op eq 'list' ) {
Link Here
|
357 |
push @books_loop, $line; |
357 |
push @books_loop, $line; |
358 |
|
358 |
|
359 |
$foot{$$line{tax_rate}}{tax_rate} = $$line{tax_rate}; |
359 |
$foot{$$line{tax_rate}}{tax_rate} = $$line{tax_rate}; |
360 |
$foot{$$line{tax_rate}}{tax_value} += get_rounded_price($$line{tax_value}); |
360 |
$foot{$$line{tax_rate}}{tax_value} += $$line{tax_value}; |
361 |
$total_tax_value += $$line{tax_value}; |
361 |
$total_tax_value += $$line{tax_value}; |
362 |
$foot{$$line{tax_rate}}{quantity} += get_rounded_price($$line{quantity}); |
362 |
$foot{$$line{tax_rate}}{quantity} += $$line{quantity}; |
363 |
$total_quantity += $$line{quantity}; |
363 |
$total_quantity += $$line{quantity}; |
364 |
$foot{$$line{tax_rate}}{total_tax_excluded} += $$line{total_tax_excluded}; |
364 |
$foot{$$line{tax_rate}}{total_tax_excluded} += $$line{total_tax_excluded}; |
365 |
$total_tax_excluded += $$line{total_tax_excluded}; |
365 |
$total_tax_excluded += get_rounded_price($$line{total_tax_excluded}); |
366 |
$foot{$$line{tax_rate}}{total_tax_included} += $$line{total_tax_included}; |
366 |
$foot{$$line{tax_rate}}{total_tax_included} += $$line{total_tax_included}; |
367 |
$total_tax_included += $$line{total_tax_included}; |
367 |
$total_tax_included += get_rounded_price($$line{total_tax_included}); |
368 |
} |
368 |
} |
369 |
|
369 |
|
370 |
push @book_foot_loop, map {$_} values %foot; |
370 |
push @book_foot_loop, map {$_} values %foot; |
Lines 471-480
sub get_order_infos {
Link Here
|
471 |
# If we have an actual cost that should be the total, otherwise use the ecost |
471 |
# If we have an actual cost that should be the total, otherwise use the ecost |
472 |
$line{unitprice_tax_included} += 0; |
472 |
$line{unitprice_tax_included} += 0; |
473 |
$line{unitprice_tax_excluded} += 0; |
473 |
$line{unitprice_tax_excluded} += 0; |
474 |
my $cost_tax_included = $line{unitprice_tax_included} || $line{ecost_tax_included}; |
474 |
$line{total_tax_included} = get_rounded_price($line{ecost_tax_included} * $line{quantity}); |
475 |
my $cost_tax_excluded = $line{unitprice_tax_excluded} || $line{ecost_tax_excluded}; |
475 |
$line{total_tax_excluded} = get_rounded_price($line{ecost_tax_excluded} * $line{quantity}); |
476 |
$line{total_tax_included} = get_rounded_price($cost_tax_included) * $line{quantity}; |
|
|
477 |
$line{total_tax_excluded} = get_rounded_price($cost_tax_excluded) * $line{quantity}; |
478 |
$line{tax_value} = $line{tax_value_on_ordering}; |
476 |
$line{tax_value} = $line{tax_value_on_ordering}; |
479 |
$line{tax_rate} = $line{tax_rate_on_ordering}; |
477 |
$line{tax_rate} = $line{tax_rate_on_ordering}; |
480 |
|
478 |
|