Lines 77-85
sub BasketTotal {
Link Here
|
77 |
for my $order (@orders){ |
77 |
for my $order (@orders){ |
78 |
# FIXME The following is wrong |
78 |
# FIXME The following is wrong |
79 |
if ( $bookseller->listincgst ) { |
79 |
if ( $bookseller->listincgst ) { |
80 |
$total = $total + ( get_rounded_price($order->{ecost_tax_included}) * $order->{quantity} ); |
80 |
my $total_unitprice_tax_inc_rounded = get_rounded_price( $order->{unitprice_tax_included} ) * $order->{quantity}; |
81 |
} else { |
81 |
my $total_ecost_tax_inc_rounded = get_rounded_price( $order->{ecost_tax_included} ) * $order->{quantity}; |
82 |
$total = $total + ( get_rounded_price($order->{ecost_tax_excluded}) * $order->{quantity} ); |
82 |
$total += $total_unitprice_tax_inc_rounded || $total_ecost_tax_inc_rounded; |
|
|
83 |
} |
84 |
else { |
85 |
my $total_unitprice_tax_exc_rounded = get_rounded_price( $order->{unitprice_tax_excluded} ) * $order->{quantity}; |
86 |
my $total_ecost_tax_exc_rounded = get_rounded_price( $order->{ecost_tax_excluded} ) * $order->{quantity}; |
87 |
$total += $total_unitprice_tax_exc_rounded || $total_ecost_tax_exc_rounded; |
83 |
} |
88 |
} |
84 |
} |
89 |
} |
85 |
return $total; |
90 |
return $total; |
86 |
- |
|
|