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