I'm not quite sure what you're doing here. You seem to be trying to use two different approaches to grouping - are they supposed to produce the same output or different output? I'll concentrate on the first and ignore the second (which does things the old 1.0 way).
You apparently want to produce new rows for each "secondary" group, but you make no attempt to produce them. A good start would be:
<xsl:template match="TABLE">
<table border='1'>
<tr><th>TYP</th><th>SEN</th><th>QTE</th></tr>
<xsl:for-each-group select="ROW" group-by="TYP">
<tr><td colspan="3"><xsl:value-of select="current-grouping-key()" /></td>
<xsl:for-each-group select="current-group()" group-by="SEN">
<tr><td/>
<td><xsl:value-of select="current-grouping-key()" /></td>
<td><xsl:value-of select="sum(current-group()/QTE)"/></td>
</xsl:for-each-group>
</tr>
</xsl:for-each-group>
</table>
If you don't want to start a new row for the first group, you need some logic inside the inner for-each-group that does different things depending on test="position()=1". Alternatively, an easier way might be to produce nested tables, though you will have to be careful with the CSS formatting if you want everything nicely aligned.
You also say the totals are wrong but they look right to me.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference