When applying discount higher than amount of manual invoice Koha explodes with a message: "Exception 'Koha::Exceptions::ParameterTooHigh' thrown 'Amount to reduce (100) is higher than original amount (10.000000)' at /usr/share/perl5/Exception/Class/Base.pm line 88". To reproduce: 1. Go to the patron -> accounting 2. Create manual invoice with positive amount (e.g. 10). Click Save. 3. In Transactions tab click 'Apply discount' button and enter discount to apply higher than amount entered in p. 2 (e.g. 100). 4. Koha explodes.
I believe this has something to do with the 'Amount charged' price not populating when a price is divisible by .10 (a.k.a. ends in a 0 in the 2nd decimal place). The check built into the 'Discount to apply' field is not working, because the amount is not being populated. Allowing you to enter an amount larger than the account line amount. This is fixed with the patch I submitted on Bug 37563 which fixes the amount issuing not be populated, along with a number of other issues in the Accounting and POS modals.