I suspect that some of your references to @GrossPrice should be to $GrossPrice, but I can't see how that accounts for the problem you are seeing. You haven't shown the call on the named template, perhaps there's an error there? Please try submitting a complete stylesheet and source document, so other people can see if they get the same result.
Your technique of looping through all the Discount elements and concatenating all those that match isn't a coding style I would recommend, it's intrinsically error-prone. You're only expecting one to match, so select it directly in a predicate:
<xsl:variable name="SpecificDiscount" select="//Discount[@Id=$ArticleId]/@DiscountValue"/>
<xsl:variable name="GenericDiscount" select="//Discount[@Id=$DiscountId]/@DiscountValue"/>
<xsl:variable name="Sum">
<xsl:choose>
<xsl:when test="$SpecificDiscount">
<xsl:value-of select="$SpecificDiscount"/>
<xsl:when>
<xsl:when test="$GenericDiscount">
<xsl:value-of select="$GrossPrice - ($GrossPrice * $GenericDiscount) div 100"/>
</xsl:when
...
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference