Bug 27585

Summary: Adding multiple items doesn't update total cost
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: AcquisitionsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: janet.mcgowan, jean-manuel.broust, jeremy.evans
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Screenshot of order details

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.