Koha/acqui
Christophe TORIN f72b8cbd3e
Bug 29607: Store the discount amount correctly when importing and order from a file
This bug fixes how the discount amount for an order is stored, when an order is added to a basket using "From staged MARC records".

Test plan:
1. Export a record (without the items) (Tools > Catalog > Export data).
2. Delete the record from the catalog (including any items).
3. Stage the record for import (Tools > Catalog > Stage MARC records for import).
4. Create a new vendor with a discount of 25%. (Or select and existing vendor that has a discount). (Acquisitions > New vendor)
5. Create a new basket for the vendor. (Acquisitions > Manage orders > search for vendors > New > Basket).
6. Add to the basket using "From a staged file":
   . select "Add orders" next to the staged file
   . select the record to add to the order
   . enter a price
   . leave the discount field blank
   . select a fund
   . select "Save"
   ==> The order is created!
7. Modify the order - note that the discount is showing on the form as .25% instead of 25%, also note that the discount amount is calculated correctly.
8. Check what is recorded in the database:
   . koha-mysql kohadev
   . select * from aqorders;
   ==> discount field for the basket item shows as 0.2500
9. Change the discount to 25%. Run step 8 again - discount amount will be correctly shown as 25.0000
10. Apply the patch.
11. Repeat steps 1-9 - discount amount is shown and calculated correctly.
12. Test modifying the discount amount - should be calculated and shown correctly.
13. Sign off!

See additional comments in the bug description.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-06 14:28:51 -03:00
..
acqui-home.pl Bug 29287: Add child funds to display of parent funds on acqui home 2022-03-01 22:47:46 -10:00
addorder.pl Bug 29111: Remove unused indicator modification code for items 2021-10-15 11:34:26 +02:00
addorderiso2709.pl Bug 29607: Store the discount amount correctly when importing and order from a file 2022-06-06 14:28:51 -03:00
ajax-getauthvaluedropbox.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
basket.pl Bug 29785: Rename Koha::Object->message with ->object_messages 2022-02-09 22:01:36 -10:00
basketgroup.pl Bug 16258: Add a syspref to govern EDIFACT functionality 2022-04-13 15:55:38 +02:00
basketheader.pl Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
booksellers.pl Bug 28082: Add acquisitions toolbar to vendors on vendor search page 2022-05-10 15:17:17 -10:00
cancelorder.pl Bug 29785: Rename Koha::Object->message with ->object_messages 2022-02-09 22:01:36 -10:00
check_budget_total.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
check_uniqueness.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
duplicate_orders.pl Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
edi_ean.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
edifactmsgs.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
edimsg.pl Bug 17600: Fix tests 2021-07-16 09:47:01 +02:00
finishreceive.pl Bug 29771: Remove trivial cases 2022-03-08 23:03:34 -10:00
histsearch.pl Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
invoice-files.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
invoice.pl Bug 24190: (QA follow-up) record unchanged bookfund and fix typo 2021-09-21 20:22:57 +02:00
invoices.pl Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
lateorders-export.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
lateorders.pl Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
modordernotes.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
neworderempty.pl Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
newordersubscription.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
newordersuggestion.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ordered.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
orderreceive.pl Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
parcel.pl Bug 17600: Fix tests 2021-07-16 09:47:01 +02:00
parcels.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
showorder.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
spent.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
supplier.pl Bug 28082: Add acquisitions toolbar to vendors on vendor search page 2022-05-10 15:17:17 -10:00
transferorder.pl Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
uncertainprice.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
updatesupplier.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
z3950_search.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00