|
Lines 503-514
sub populate_with_prices_for_ordering {
Link Here
|
| 503 |
|
503 |
|
| 504 |
my $discount = $self->discount || 0; |
504 |
my $discount = $self->discount || 0; |
| 505 |
$discount /= 100 if $discount > 1; |
505 |
$discount /= 100 if $discount > 1; |
|
|
506 |
my $unitprice = $self->unitprice // 0; |
| 506 |
|
507 |
|
| 507 |
if ( $bookseller->listincgst ) { |
508 |
if ( $bookseller->listincgst ) { |
| 508 |
|
509 |
|
| 509 |
# The user entered the prices tax included |
510 |
# The user entered the prices tax included |
| 510 |
$self->unitprice( $self->unitprice + 0 ); |
511 |
$self->unitprice($unitprice); |
| 511 |
$self->unitprice_tax_included( $self->unitprice ); |
512 |
$self->unitprice_tax_included($unitprice); |
| 512 |
$self->rrp_tax_included( $self->rrp ); |
513 |
$self->rrp_tax_included( $self->rrp ); |
| 513 |
|
514 |
|
| 514 |
# price tax excluded = price tax included / ( 1 + tax rate ) |
515 |
# price tax excluded = price tax included / ( 1 + tax rate ) |
|
Lines 536-542
sub populate_with_prices_for_ordering {
Link Here
|
| 536 |
} else { |
537 |
} else { |
| 537 |
|
538 |
|
| 538 |
# The user entered the prices tax excluded |
539 |
# The user entered the prices tax excluded |
| 539 |
$self->unitprice_tax_excluded( $self->unitprice ); |
540 |
$self->unitprice_tax_excluded($unitprice); |
| 540 |
$self->rrp_tax_excluded( $self->rrp ); |
541 |
$self->rrp_tax_excluded( $self->rrp ); |
| 541 |
|
542 |
|
| 542 |
# price tax included = price tax excluded * ( 1 - tax rate ) |
543 |
# price tax included = price tax excluded * ( 1 - tax rate ) |