[Koha-bugs] [Bug 28627] Revert the order receive page to display 'Actual cost' as ecost_tax_included/ecost_tax_excluded if unitprice not set

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Nov 12 22:22:10 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627

Andrew Fuerste-Henry <andrew at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #127592|0                           |1
        is obsolete|                            |

--- Comment #6 from Andrew Fuerste-Henry <andrew at bywatersolutions.com> ---
Created attachment 127597
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127597&action=edit
Bug 28627: [alternate] Calculate unitprice if not set

On bug 23376 the developer was too clever by half. Instead of passing
values to the template we moved to simply passing the order object.

The calculations that populated the unitprice, however, were simply dropped.

This patch restores the behaviour of setting unitprice to the estimated cost
by default. We do this conditionally in the template

To test:
 1 - Create a basket and adding items to it. Set the 'Vendor price' to
    '20', do not add an 'Actual cost'
 2 - Close the basket
 3 - Select 'Receive shipment'
 4 - Set a value for vendor invoice
 5 - Receive the order you created
 6 - Observe 'Actual cost' is = 0.00
 7 - Apply patch
 8 - Refresh the order receival page, and confirm the 'Actual cost' =
    20.00
 9 - Cancel receipt - reopen basket - edit order - add an actual cost - close
10 - Receive the order again
11 - Confirm the actual price is used
12 - Repeat this whole plan, but ensure the vendor has a different value for
     Invoice prices: Include tax

Signed-off-by: Andrew Fuerste-Henry <andrew at bywatersolutions.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list