• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
7

Problem with my calculations

Explorer ,
May 06, 2024 May 06, 2024

Copy link to clipboard

Copied

Hello, I am having some problems with the calculations for our GST on my form. The GST 50 column should take the GST from gst.1 divide by half first and then round down second. It only needs to round down if the number is not perfectly divisible by 2 though. so if I enter 16.06 which is an even number, as the GST it should round to 8.03 but its not, its rounding down to 8.02.  If I have say 5.27 that isn't easily divisible, the government pays the lower half, we pay the higher half, so I need that to round down to 2.62. 

 

I had to redo my calculations for the Receipt total, GST on receipt  km $ and Total meals columns to the sum method,  but it seems to have broken my calculation script and validation script when i did that. I have attached the file. 

 

Any assistance would be amazing!

TOPICS
General troubleshooting , How to , JavaScript , PDF , PDF forms

Views

3.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 08, 2024 May 08, 2024

Copy link to clipboard

Copied

and yes if you can show me the changes that would be good, i need to learn this stuff so i can  stop bugging you all 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 08, 2024 May 08, 2024

Copy link to clipboard

Copied

That calculation already include your part?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 08, 2024 May 08, 2024

Copy link to clipboard

Copied

ok strange, this is how its calculating on my end in the sheet you sent me 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 08, 2024 May 08, 2024

Copy link to clipboard

Copied

I put your scripts back in "ProgramCostsRow" fields, now it will only calculate "GSThalf" fields.

https://drive.google.com/file/d/1KFIXSFdIVMNYB7kSvhNWFH8F3zZ6muuj/view?usp=sharing 

But from what I can see, your calculations in "ProgramCostsRow" fields may not be correct.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 08, 2024 May 08, 2024

Copy link to clipboard

Copied

I'm sorry I guess I am not understanding, when i open this one the GST 50 column no longer has a calculating field?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 08, 2024 May 08, 2024

Copy link to clipboard

Copied

I think I have figured it out...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 08, 2024 May 08, 2024

Copy link to clipboard

Copied

LATEST

Yes! It is calculating correctly, I have now changed all of that last section to read only, which is great now no one can type in there and break it! Thank you again so much for your help! 

 

So this is the only calculation needed in the GST 50 column? if(event.value == 0)event.value = ""; and you changed it to read only, was there anything I missed.?

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines