Bug 27203: Calculate tax based on ecost if unitprice not set
authorNick Clemens <nick@bywatersolutions.com>
Thu, 17 Dec 2020 12:21:32 +0000 (12:21 +0000)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Tue, 25 May 2021 14:42:06 +0000 (16:42 +0200)
commit7239867879ab8b249a93fcf19fd70a1a3256cac1
tree0b675f79f01462d5424929326206ac8e77fd56c6
parent34671f3713dae6a40cc18a0887560275a3218e3f
Bug 27203: Calculate tax based on ecost if unitprice not set

There is code in populate_order_with_prices that is intended to use ecost over unitprice,
it just doens't seem to be working.

Making it more explicit seems to take care of the issue.

To test:
1 - Create a basket
2 - Add an order line, don't set 'Actual cost: ', but use vendor price
and a discount.
3 - Save
4 - Display all columns, 'Actual cost tax inc.' are GST columns aren't set.
5 - Apply batch
6 - Redo 1,2, 3
7 - Display all columns, GST is calculated correctly, unitprice remains 0.

Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 66d26fa301a8e5375998da513a0a18d21974ce94)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a103cdbf1fddc41597ef8b0632fbdd475bad439a)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit d464378b288ccc60f1b8653ae94223dd390d7218)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
C4/Acquisition.pm