subtotal = Math.round

Home Forums Quform WordPress subtotal = Math.round

This topic is: resolved
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #36563
    Icemanmx
    Participant

    Hello
    I need a correction for the comma and dot placement for sub total, iva and total..
    I need it in spanish format like this 1,000,000.00 as you see comma and dot.
    I need you to help me…

    This is the code now:


    subtotal = Math.round(subtotal * 100) / 100; // round subtotal to 2 decimal places
    tax = subtotal * 0.16;
    tax = Math.round(tax * 100) / 100; // round tax to 2 decimal places
    total = subtotal + tax;

    $('.quform-field-1_389').val(subtotal.toFixed(2));
    $('.quform-field-1_390').val(tax.toFixed(2));
    $('.quform-field-1_391').val(total.toFixed(2));

    I will attache the complete code also.

    Best Regards
    Icemanmx

    • This topic was modified 1 month, 2 weeks ago by Icemanmx.
    Attachments:
    You must be logged in to view attached files.
    #36568
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #36570
    Icemanmx
    Participant

    Hello Ally
    Thanks for your help again, it just function perfect…
    The result for a test run looks like this…
    SUB TOTAL: $ 300,000,000.00 I.V.A. 16%: $ 48,000,000.00 TOTAL: $ 348,000,000.00

    Best Regards
    Icemanmx

    #36576
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy