Koha-clms/acqui
Nick Clemens b494df730f Bug 14680: Always subtract discount from price to calculate estimated cost
This patch simply removes a discrepancty where when a discount is provided on the order form
we add the discount to the price, and when it comes form the vendor we subtract the discount.

Discounts should always descrease the estimated cost

To test:
 0 - Have a vendor with a discount of 10% specified
 1 - Export a record from your Koha
 2 - Stage the record for import and match on biblionumber
 3 - Add to a basket in acq from the staged file
 4 - Select the title, and set order price to $10 and do not fill the discount field
 5 - Add the order - note $10 RRP and $9 actual/budgeted cost
 6 - Repeat 2&3
 7 - Select the tile, set price $10 and discount 50%
 8 - Add the order - note $20 RRP and $10 actual/budgeted cost! FAIL
 9 - Apply patch, restart all
10 - Repeat 2-7
11 - Add the order, note $10 RRP and $5 actual.budgeted cost

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7c734c6903)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 96eed0f5e0)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit da1633125f)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-09-10 02:01:15 +02:00
..
acqui-home.pl Bug 29287: Add child funds to display of parent funds on acqui home 2022-03-20 14:58:26 +00:00
add_user_search.pl Bug 23271: Replace search_limited with search_with_library_limits 2021-04-21 15:25:07 +02:00
addorder.pl Bug 23971: Rename pref with AcquisitionLog 2021-04-23 11:58:49 +02:00
addorderiso2709.pl Bug 14680: Always subtract discount from price to calculate estimated cost 2022-09-10 02:01:15 +02:00
ajax-getauthvaluedropbox.pl Bug 23830: Adapt callers 2021-02-08 17:09:34 +01:00
basket.pl Bug 29785: Rename Koha::Object->message with ->object_messages 2022-02-21 16:35:20 +00:00
basketgroup.pl Bug 23971: (follow-up) Remove stale param 2021-04-23 11:58:49 +02:00
basketheader.pl Bug 23971: (follow-up) Remove data duplication 2021-04-23 11:58:49 +02:00
booksellers.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
cancelorder.pl Bug 29785: Rename Koha::Object->message with ->object_messages 2022-02-21 16:35:20 +00:00
check_budget_total.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
check_uniqueness.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
duplicate_orders.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
edi_ean.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
edifactmsgs.pl Bug 23682: Fix use Koha::Plugins::Handler statements 2020-09-03 15:00:48 +02:00
edimsg.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
finishreceive.pl Bug 29771: Remove trivial cases 2022-04-25 19:44:44 +00:00
histsearch.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
invoice-files.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
invoice.pl Bug 22773: Bulk Close invoices and Filter invoice view (open/closed) 2021-04-08 15:37:43 +02:00
invoices.pl Bug 22773: Bulk Close invoices and Filter invoice view (open/closed) 2021-04-08 15:37:43 +02:00
lateorders-export.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
lateorders.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
modordernotes.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
neworderempty.pl Bug 27828: (bug 24469 follow-up) Add missing import 2021-03-03 11:57:51 +01:00
newordersubscription.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
newordersuggestion.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
ordered.pl Bug 26997: Remove 0000-00-00 from aqorders.datecancellationprinted 2021-02-23 13:07:49 +01:00
orderreceive.pl Bug 28881: (bug 23376 follow-up) Fix suggestion display on order receive page 2021-09-03 09:55:04 -04:00
parcel.pl Bug 20212: Use the DT column filtering provided by the wrapper 2021-01-28 16:44:40 +01:00
parcels.pl Bug 27485: Rename system preference gist to TaxRates 2021-01-22 14:09:46 +01:00
showorder.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
spent.pl Bug 26997: Remove 0000-00-00 from aqorders.datecancellationprinted 2021-02-23 13:07:49 +01:00
supplier.pl Bug 27485: Rename system preference gist to TaxRates 2021-01-22 14:09:46 +01:00
transferorder.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
uncertainprice.pl Bug 27082: uncertainprice.pl does not handle pagination 2020-11-25 14:38:14 +01:00
updatesupplier.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
z3950_search.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00