Caculate totals

rss

Posted by TWendt - Mar 10 ’17 at 06:03

Hi,

i will calculate the totals from two fields (Currency) with this script.

//Caculate Totals

function calctotal() {

var total = parseFloat(fd.field('Costs').value());

total += parseFloat(fd.field('Wartung').value());

fd.field('Kosten_x002d_Insgesamt').value(total);

}

//Update Field "Kosten_x002d_Insgesamt"

fd.field('Costs').control().change(calctotal);

fd.field('Wartung').change(calctotal);

calctotal();

But the result for the field "Kosten_x002d_Insgesamt"

 

For example:

Costs 30000

Wartung 17.500

Result is 30017.5

Correct Result is 47500

Where is the error?

Best wishes

Tom

 

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 5 years 9 months 26 days
    #1 by Dmitry Kozlov Mar 13 ’17 at 04:55

    Hi Tom,

    Please, replace this line:

    total += parseFloat(fd.field('Wartung').value());

    with:

    total += parseFloat(fd.field('Wartung').value().replace(/./g,''));

  • DanielHeller
    Member
    Member for: 2 years 3 months 6 days
    #2 by DanielHeller Apr 12 ’17 at 03:34

    The goal of the company alone makes this one of the best essay services. It focuses on customer satisfaction and production of high quality papers. Their reliability cannot be questioned by customers. Their writers always have something to offer to their customer, which is the value for their money. Not forgetting writers, they handle their homework best. All students who have used custom essay writing service have said it is worth it. Its paper writing services are extremely professional and legitimate.

  • anthonyanson
    Member
    Member for: 8 months 15 days
    #3 by anthonyanson Nov 1 ’18 at 07:44

    Well, It's all about confidence and hard work because once you choose writing assignment help services it means that you have some kind of difficulties and want experts suggestion to solve but looks like you did a great job to calculate all the equations easily, If you can give us some more related equations then it will be more easy for us to see the outcomes of these calculations.

  • Salman
    Member
    Member for: 7 months 25 days
    #4 by Salman Nov 22 ’18 at 01:31

    Buddy, It is a technical question and I know the answer is here for this question and I am looking where is the error but I do not find it and I always these type of problems in my proposals projects then I take help with research proposal help Dubai. Well, I am looking the error in this question and If I find so I will tell you!

  • Waltersmith
    Member
    Member for: 6 months 14 days
    #5 by Waltersmith Jan 3 ’19 at 07:16

    For fear that you simply need to share an calculation you have made and make an application out of it with clear data sources and yields I would prescribe the new administration I ran over www.buyassignment.com/do-my-homework-hw.html. Make the calculation in a spread sheet (javascript can likewise be utilized) and share the information and output cells you require.

Displaying 1 to 5 of 5 messages