The acq detail tab shows either the unitprice (actual price) or the ecost (estimated price) depending on if one or the other is set. The check for this is wrong when the actual price is a negative value (see bug 34170).
Created attachment 153610 [details] [review] Bug 34305: Account for negative prices on acq details tab The acquisition detail tab shows the estimated cost while the order is still pending and the actual price, once received. At least the tool tip on the table header row says so. This was not working correctly. To test: * Create a basket * Create a new order line with a negative list price (credit) * Close the basket * Verify that the price shows correctly in the acquisition details tab on the record * Receive the order and enter a different negative actual price. * Reload detail view, verify it still shows the estimcated price * Apply patch, restart_all * Verify now the correct actual price displays * Create another basket and order line * Verify while not yet received, it still shows the estimaed price
Created attachment 153621 [details] [review] Bug 34305: Account for negative prices on acq details tab The acquisition detail tab shows the estimated cost while the order is still pending and the actual price, once received. At least the tool tip on the table header row says so. This was not working correctly. To test: * Create a basket * Create a new order line with a negative list price (credit) * Close the basket * Verify that the price shows correctly in the acquisition details tab on the record * Receive the order and enter a different negative actual price. * Reload detail view, verify it still shows the estimated price * Apply patch, restart_all * Verify now the correct actual price displays * Create another basket and order line * Verify while not yet received, it still shows the estimated price Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
For testing, it's easier if either the AcqCreateItem is on cataloguing the record, or when creating the basket, you choose to create items when cataloguing the record... It's just easier not to have to create the item at all for credits :)
Created attachment 154257 [details] [review] Bug 34305: Account for negative prices on acq details tab The acquisition detail tab shows the estimated cost while the order is still pending and the actual price, once received. At least the tool tip on the table header row says so. This was not working correctly. To test: * Create a basket * Create a new order line with a negative list price (credit) * Close the basket * Verify that the price shows correctly in the acquisition details tab on the record * Receive the order and enter a different negative actual price. * Reload detail view, verify it still shows the estimated price * Apply patch, restart_all * Verify now the correct actual price displays * Create another basket and order line * Verify while not yet received, it still shows the estimated price Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed to master for 23.11. Nice work everyone, thanks!
Pushed to 23.05.x for 23.05.03
Nice work everyone! Pushed to 22.11.x for next release