12 Replies Latest reply on Feb 12, 2015 10:31 PM by philmodjunk

    ODD Calculation result



      ODD Calculation result


      Anybody know why I am getting such a strange calculation result which is just a few .'s off the correct figure?

      See attached images. It is an invoice area which has several different things happening, which you will see.


        • 1. Re: ODD Calculation result
          /files/ac1aa53547/Screen_Shot_2015-02-11_at_18.43.50.png 541x63
          • 2. Re: ODD Calculation result
            /files/a4e7fe505e/Screen_Shot_2015-02-11_at_18.43.41.png 643x238
            • 3. Re: ODD Calculation result

              From the calculation that I see in your post, it may be that you need to enclose Discount/subtotal inside a call to the Round function to round it to either a whole number or two decimal places.

              What I see looks like "round off error".

              This is when you combine several different data terms in a calculation where you first round the values to a specific number of decimal places and then perform the same calculation with unrounded values only to discover that the results are slightly different.

              The real challenge is to figure out which result is the correct result in a given situation.

              Note that if you are using data formatting to display rounded values of fields that you then combine into a calculation to show the result in the lower right corner, your calculation is combining unrounded values.

              • 4. Re: ODD Calculation result

                Thanks, so I need to insert "Round(number: precision)" into the calculation somehow? How does this work?

                • 5. Re: ODD Calculation result

                  I have tried this but it thinks precision is a field and says it can't be found..

                  ARTWORK::Invoice Total + Btw 6 + Btw 21 - Round (Discount / Subtotal; precision) + Btw 6 + Btw 21 - Discount

                  • 6. Re: ODD Calculation result

                    Don't worry working now.. thanks

                    ARTWORK::Invoice Total + Btw 6 + Btw 21 - Discount + Artist Production Costs - Production Costs

                    • 7. Re: ODD Calculation result

                      To answer your question about the Round function, you would need to enter a number in place of the "precision" placeholder.

                      • 8. Re: ODD Calculation result

                        Thank you. On a separate note, I am trying to figure out a way not to make a "tax not applicable button". If for example an artist is making an invoice and doesn't want to charge tax (or VAT) on his or her production costs for an artwork. If that makes sense. Attached is the bottom part of an invoice as it stands. I have buttons which calculate the 6% or 21% tax from either the subtotal field or the net field. If I have a button that elects no tax on production, would I need a calculation as part of those tax buttons that removes the production tax amount from the final given amount. Sorry difficult to explain....

                        • 9. Re: ODD Calculation result

                          Attached will  help make sense. So if the Not Taxed button is clicked I need to add something about it being clicked (or valid?) to this calculation below. and have the calculation remove the tax amount from the subtotal tax amount... if that makes sense?


                          If(IsEmpty (INVOICES::Subtotal) ; ARTWORK::Invoice Total  *.06 ; INVOICES::Subtotal *.06 )

                          • 10. Re: ODD Calculation result

                            What I see is a "not taxed" check box, not a "button".

                            If you set up a calculation field, cTaxableAmount as:

                            If ( IsEmpty ( NotTaxed ) ; amount )

                            You can refer to cTaxableamount instead of Amount in your calculations to compute a tax.

                            • 11. Re: ODD Calculation result

                              thanks, couldn't somrthing like this work? It currently returns only a ? but maybe it's not correct yet. The check boxes are designated as fields "No Artist Production Tax" and "No Gallery Production Tax".

                              If(IsEmpty (INVOICES::Subtotal) ; ARTWORK::Invoice Total  *.06 ; INVOICES::Subtotal *.06 )  / If (not IsEmpty (INVOICES::No Artist Production Tax) ; INVOICES::Subtotal - INVOICES::Artist Production Costs *6)



                              • 12. Re: ODD Calculation result

                                I do not have a complete picture of all the pieces that have to fit together and thus cannot suggest a better approach without a complete picture.

                                I typical invoice uses a related table of line items to list multiple items sold in the same transaction, but it looks like this is not what you have set up here.