|
Lines 2875-2880
sub populate_order_with_prices {
Link Here
|
| 2875 |
|
2875 |
|
| 2876 |
if ($receiving) { |
2876 |
if ($receiving) { |
| 2877 |
if ( $bookseller->{invoiceincgst} ) { |
2877 |
if ( $bookseller->{invoiceincgst} ) { |
|
|
2878 |
# Trick for unitprice. If the unit price rounded value is the same as the ecost rounded value |
| 2879 |
# we need to keep the exact ecost value |
| 2880 |
if ( Koha::Number::Price->new( $order->{unitprice} )->round == Koha::Number::Price->new( $order->{ecost_tax_included} )->round ) { |
| 2881 |
$order->{unitprice} = $order->{ecost_tax_included}; |
| 2882 |
} |
| 2883 |
|
| 2878 |
# The user entered the unit price tax included |
2884 |
# The user entered the unit price tax included |
| 2879 |
$order->{unitprice_tax_included} = $order->{unitprice}; |
2885 |
$order->{unitprice_tax_included} = $order->{unitprice}; |
| 2880 |
|
2886 |
|
|
Lines 2882-2887
sub populate_order_with_prices {
Link Here
|
| 2882 |
$order->{unitprice_tax_excluded} = $order->{unitprice_tax_included} / ( 1 + $order->{tax_rate} ); |
2888 |
$order->{unitprice_tax_excluded} = $order->{unitprice_tax_included} / ( 1 + $order->{tax_rate} ); |
| 2883 |
} |
2889 |
} |
| 2884 |
else { |
2890 |
else { |
|
|
2891 |
# Trick for unitprice. If the unit price rounded value is the same as the ecost rounded value |
| 2892 |
# we need to keep the exact ecost value |
| 2893 |
if ( Koha::Number::Price->new( $order->{unitprice} )->round == Koha::Number::Price->new( $order->{ecost_tax_excluded} )->round ) { |
| 2894 |
$order->{unitprice} = $order->{ecost_tax_excluded}; |
| 2895 |
} |
| 2896 |
|
| 2885 |
# The user entered the unit price tax excluded |
2897 |
# The user entered the unit price tax excluded |
| 2886 |
$order->{unitprice_tax_excluded} = $order->{unitprice}; |
2898 |
$order->{unitprice_tax_excluded} = $order->{unitprice}; |
| 2887 |
|
2899 |
|
| 2888 |
- |
|
|