Lines 2858-2863
sub populate_order_with_prices {
Link Here
|
2858 |
|
2858 |
|
2859 |
if ($receiving) { |
2859 |
if ($receiving) { |
2860 |
if ( $bookseller->{invoiceincgst} ) { |
2860 |
if ( $bookseller->{invoiceincgst} ) { |
|
|
2861 |
# Trick for unitprice. If the unit price rounded value is the same as the ecost rounded value |
2862 |
# we need to keep the exact ecost value |
2863 |
if ( Koha::Number::Price->new( $order->{unitprice} )->round == Koha::Number::Price->new( $order->{ecost_tax_included} )->round ) { |
2864 |
$order->{unitprice} = $order->{ecost_tax_included}; |
2865 |
} |
2866 |
|
2861 |
# The user entered the unit price tax included |
2867 |
# The user entered the unit price tax included |
2862 |
$order->{unitprice_tax_included} = $order->{unitprice}; |
2868 |
$order->{unitprice_tax_included} = $order->{unitprice}; |
2863 |
|
2869 |
|
Lines 2865-2870
sub populate_order_with_prices {
Link Here
|
2865 |
$order->{unitprice_tax_excluded} = $order->{unitprice_tax_included} / ( 1 + $order->{tax_rate} ); |
2871 |
$order->{unitprice_tax_excluded} = $order->{unitprice_tax_included} / ( 1 + $order->{tax_rate} ); |
2866 |
} |
2872 |
} |
2867 |
else { |
2873 |
else { |
|
|
2874 |
# Trick for unitprice. If the unit price rounded value is the same as the ecost rounded value |
2875 |
# we need to keep the exact ecost value |
2876 |
if ( Koha::Number::Price->new( $order->{unitprice} )->round == Koha::Number::Price->new( $order->{ecost_tax_excluded} )->round ) { |
2877 |
$order->{unitprice} = $order->{ecost_tax_excluded}; |
2878 |
} |
2879 |
|
2868 |
# The user entered the unit price tax excluded |
2880 |
# The user entered the unit price tax excluded |
2869 |
$order->{unitprice_tax_excluded} = $order->{unitprice}; |
2881 |
$order->{unitprice_tax_excluded} = $order->{unitprice}; |
2870 |
|
2882 |
|
2871 |
- |
|
|