Forum

The forum is a free service supported by community members. Please consider opening a support ticket if you need timely help.

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 11 Apr 2024 06:16 PM by  Steve L
totalamount - tax
 16 Replies
Sort:
You are not authorized to post a reply.
Page 2 of 4 << < 1234 > >>
Author Messages


Basic Member


Posts:281
Basic Member


--
10 Apr 2024 06:22 AM

Hi Stephen,

I have tried all kind of combination, however I cannot get the job done. :-(
Nothing gives me the the value I seek/
It is al about how to write the syntax how to add those values.
xsl:value-of select="in/salesOrder/SubTotalAmount + HandlingAmount + ShippingAmount"
xsl:value-of select="in/salesOrder/SubTotalAmount + in/salesOrder/HandlingAmount + in/salesOrder/ShippingAmount"

Zahlungskosten: € 2,41
Versand: € 27,83
Ex VAT:
MwSt: € 10,55
Gesamt: € 60,79

Can you let me know what I am doingwrong here?

NB: I left the brackets away in order not to disturb the forum

With regards, Ton

0


Veteran Member


Posts:2955
Veteran Member


--
10 Apr 2024 01:10 PM
It should be case-sensitive like this below. Refer to the documentation link I sent you earlier. Notice the elements in the XML are camelCase.

xsl:value-of select="in/salesOrder/subTotalAmount + in/salesOrder/handlingAmount + in/salesOrder/shippingAmount"
0


Basic Member


Posts:281
Basic Member


--
10 Apr 2024 03:42 PM

Hi Stephen,

The calculation works ok, however the output is not workable.
- there are 4 fractions like Euro 4.1234 instead of 2 Euro 4.12
- the . is used in the Englisch language and in the the europian notification they use the ,
- I have place the Euro sign before the amount myself.

Net:    € 35.4822
BTW:    € 7,45
Totaal:    € 42,93

Then I tried to use the formatted value of the subtotalamount and that gives an error.
All this is going beyond my knowledge and I preciate the support from you sofar.

Do you know if this feature of "formatted Net value" will be availabe in a future version?

With regards, Ton

0


Veteran Member


Posts:2955
Veteran Member


--
10 Apr 2024 03:45 PM

You can try using the format-number function like this to get the 2 decimals:

xsl:value-of select="format-number(in/salesOrder/subTotalAmount + in/salesOrder/handlingAmount + in/salesOrder/shippingAmount, '0.00', 2)"

See here for more info:

https://www.w3schools.com...unc_formatnumber.asp

0


Basic Member


Posts:281
Basic Member


--
10 Apr 2024 04:16 PM

Hi Stephen,

Thanks for your answer.
However the output is total broken now.
Note: I removed the brackets in order to not disturb the forum.

Net:    xsl:value-of select="format-number(in/salesOrder/subTotalAmount + in/salesOrder/handlingAmount + in/salesOrder/shippingAmount, '0.00', 2)" /
BTW:    xsl:value-of select="in/salesOrder/formattedTotalTaxAmount" /
Totaal:    xsl:value-of select="in/salesOrder/formattedTotalAmount" /

0
You are not authorized to post a reply.
Page 2 of 4 << < 1234 > >>