Sales invoice sub total by tax code

All subtotals would be concurrent calculations, but besides that, to have sub-totals per tax code would also necessitate that the line items be sorted (grouped) by tax code otherwise what’s the point.

If a sales invoice has 50 line items of mixed up tax codes, how does a tax code subtotal at the base of the sales invoice have relevance to line items without manual screening.