If you have a numbering system for naming your fields it would make things a lot easier for you. Without consistency in field naming you're going to end up with monster script subject to errors for a simple calculation. You had a lot of errors in your scripts, mostly lower case f's in this.getField, which you can find by checking the console for errors. I renamed the first row of your fields, deleted the rest, only entered one script into the first TonsYes field, then used the technique in the article linked above (Right-click > create multiple copies). Then I wrote the script in the 3D field. I also used "Sum of" in field 3C. You only have to select one field (Tons in this example) when you name the fields properly. See attachment.

