On the service calcShipmentCostEstimate, each estimated shipment cost is analysed to resolve which ones should be applied on the order.
During the breakQtys block analysis, OFBiz checks if the estimate match the quantity with their breaks and validates if one is good.
If a rule contains multiple break type (ex: weight and price) this will be ignored or use as partial, only one break would be analysed.
To solve it we extend the analyse on the break type combinaison.
After a global code review, we reformat the function to down less code quantity for help the reader on:
* use an Util function to resolve BigDecimal values
* dedicate function to resolve the shipping address
* dedicate function to validate a break type
* move multiple loop to stream
Thanks to Gil Portenseigne and Jacques Leroux for their look