i'm still pretty confused as the calc button in the top line calls the processMoor() function and that function has a number of syntax issues, the worst of which is this line:
var moorTotal = serviceBSubTotal + taxAmount;
using a variable that does not exist:
serviceBSubTotal
there is subTotalB, but no serviceBSubTotal.
in other areas< you have code for the if statement:
if(quantity <30);
{
(isFlatRate = true);
(flatRate = 1599);
(flatRate = unitPrice);
(flateRate = subTotalA);
}
that is wrong for a number of reasons:
a) no semi colon after the if statement
b) the open bracket should be on the same line as the if:
if(quantity <30) {
c) You redefine twice
(flatRate = 1599);
(flatRate = unitPrice);
(flateRate = subTotalA);
d) no parens are needed around setting flat rate:
flatRate = 1599;
the format of the if else statement should be:
if(quantity <30) {
do something
} else {
do something else
}