Bonjour !!
voici mon code xsl :
MON PROBLEME : je souhaiterais avoir la somme des multiplications entre LOTPF_poidsUnitaire_pf et LOTPF_quantiteFabriquee_pf
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48 <xsl:output method="html"/> <xsl:template match="/"> <html> <head> <title>OF</title> </head> <body> <a name="haut"/> <center>Gestion des OF</center><br/><br/> <xsl:for-each select="/XML_TEST/OF"> <center><xsl:value-of select="OF_num"/></center> Quantité à fabriquer en Kg : <xsl:value-of select="OF_quantite"/><br/> Date : <xsl:value-of select="OF_date"/><br/> <br/><br/> <center> <table border="1"> <tr> <th>Marque du produit</th> <th>Désignation du produitf fini</th> <th>Poids unitaire</th> <th>Date Limite d'Utilisation Optimale</th> <th>pd</th> </tr> <xsl:for-each select="OF_lotPF"> <tr align="center" valign="middle"> <td><xsl:value-of select="LOTPF_marque_pf"/></td> <td><xsl:value-of select="LOTPF_designation_pf"/></td> <td><xsl:value-of select="LOTPF_quantiteFabriquee_pf"/></td> <td><xsl:value-of select="LOTPF_DLUO_pf"/></td> <td><xsl:value-of select="LOTPF_poidsUnitaire_pf"/></td> </tr> </xsl:for-each> </table> </center> </xsl:for-each> </body> </html> </xsl:template> </xsl:stylesheet>
si j'ai deux lotsPF, alors je voudrais avoir la somme suivante : quantitéfabriquée1*poids1 + quantitéfabriquée2*poids2
En fait, c'est comme si j'avais deux variables une variable quantité et une variable poids que je dois multiplier pour avoir le total pour un lot puis que je dois additionner pour avoir le total général.
C'est le même principe que pour avoir le total global d'une commande :
produit 1 * prix produit 1 + produit 2* prix produit 2 + etc etc etc...
MERCI pour votre aide !!!
Partager