Bug 27585 - Adding multiple items doesn't update total cost
Summary: Adding multiple items doesn't update total cost
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-01 18:04 UTC by Caroline Cyr La Rose
Modified: 2023-07-01 16:49 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Screenshot of order details (33.37 KB, image/png)
2021-02-01 18:05 UTC, Caroline Cyr La Rose
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2021-02-01 18:04:09 UTC
I noticed that when adding multiple items to an order (using the 'Add multiple items' button), the total cost (budgeted cost*quantity) is not updated.

1) In Acquisitions, search for a vendor
2) Click 'New basket'
3) Give a name to the basket
4) Make sure 'Create items when' is set to 'placing an order'
5) Click 'Save'
6) Click 'Add to basket' to add an order to the basket (I use from existing record)
7) Click 'Add item' at the end of the item form <-- Notice the quantity is now 1
8) Enter a vendor price, e.g. 12.95 <-- Notice the total (budgeted cost*quantity) is now 12.95
9) Click 'Add item' at the end of the item form again <-- Notice the quantity is now 2 and the total is now 25.90
10) Click 'Add multiple items' at the end of the item form 
11) Enter a quantity, e.g. 8, and click 'Add' <-- Notice the quantity is now 10 BUT the total stayed at 25.90

The total should be updated to 129.50.

When saving the order, the total cost is correct. So it's really just a display problem.
Comment 1 Caroline Cyr La Rose 2021-02-01 18:05:23 UTC
Created attachment 116178 [details]
Screenshot of order details

This is a screenshot showing my order details, the quantity is 10, but the total cost is 25.90
Comment 2 Katrin Fischer 2023-07-01 16:49:42 UTC
This is still an issue. It seems happen when the list price is entered before the items are created.

We need to trigger the calculation every time the quantity changes.