Announcement

Collapse
No announcement yet.

error in mathematical formulas

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • error in mathematical formulas

    hi, I made an app bills, I have this problem.
    I created two fields in the database and VAT payable with decimal 10.2 - these are my formulas:

    //(prezzo tot
    {Totale} = {prezzo1}+{prezzo2}+{prezzo3}+{prezzo4}+{prezzo5};


    //imponibile

    {imponibile} ={totale} /1.22 ;



    //iva
    {iva}= {totale} - {imponibile};


    {Totale_complessivo} = {iva} + {imponibile};



    in this example if have total 25,00 - my {imponibile} 20,49 ( the tax is calculated at 22%)


    {iva} 4,50, but this have issue the right value is 4,51

    can i solve this? Thanks!!!!

  • #2
    If you work with taxes added, dont do imponivile + iba becaude always will fail. Work with imponivile and take IVA as indepent. Sorry ti not explain better
    /Giuseppe

    Professional Scriptcase Services
    Some Customers opinions

    Comment


    • #3
      Sorrt for all bad letters im on Mobile and I can't fix it.

      What i tried to say. Is, if you are working with added tax, always calculate IVA when needed, not sum and try to get the total again because will not work. The IVA of total is total -iva, not the sum of all IVA, because always will have problems with rounding. I hope I explained better
      /Giuseppe

      Professional Scriptcase Services
      Some Customers opinions

      Comment


      • #4
        Originally posted by Giu View Post
        Sorrt for all bad letters im on Mobile and I can't fix it.

        What i tried to say. Is, if you are working with added tax, always calculate IVA when needed, not sum and try to get the total again because will not work. The IVA of total is total -iva, not the sum of all IVA, because always will have problems with rounding. I hope I explained better


        i try to reinsert my formulas in event onvalidate success and works fine

        Comment

        Working...
        X