extensions/cividiscountls Fix discount to use largest amount, for given item
This addresses a long-standing issue / discussion with many PRs - see !215 (closed) #303 (closed)
I think there is general agreement that the highest applicable discount should apply but there is concern over
- re-introducing cumulative discounts - this is missed by some but not all
- having more than one discount per transaction, resulting in issues with tracking
This ensures that only one discount is applied but also that it is the one that gives the greatest discount (calculated across all line items)