ok a $300 TOTAL plus tax..
tax = 8.625%
tax in dollars comes to - $25.87
I need it to round up no matter what.
Problem is im not a PHP Programmer, the in house guy we had he got canned. hope you guys can help.
partsVal = (Math.round(parts*100))/100;
frm.partsSubTotal.value = partsVal;
minutesLabor = minutes;
labor = minutesLabor/60*rate;
laborVal = (Math.round(labor*100))/100;
if(isNaN(laborVal)) frm.labor.value='0.00'; else frm.labor.value=laborVal;
overtimeCost = overtime * rate * overtimeRate;
otcostVal = (Math.round(overtimeCost*100))/100;
if(isNaN(overtimeCost)) frm.overtimeCost.value='0.00'; else frm.overtimeCost.value=otcostVal;
travelCost = travel * rate;
trVal = (Math.round(travelCost*100))/100;
if(isNaN(trVal)) frm.travelCost.value='0.00'; else frm.travelCost.value=trVal;
total = minutes/60 * rate + overtime * overtimeRate * rate + other + parts + travel*rate;
tax = total * taxRate;
total += tax;
taxVal = (Math.round(tax*100))/100;
totalVal = (Math.round(total*100))/100;
if(taxable) {
if (isNaN(tax)) frm.tax.value = '';
else frm.tax.value = taxVal;
if (isNaN(total)) frm.total.value = '';
else frm.total.value = totalVal;
} else {
frm.tax.value = '0.00';
frm.total.value = '0.00';
}
} else {
//not billable
frm.partsSubTotal.value = '0.00';
frm.tax.value = '0.00';
frm.total.value = '0.00';
frm.travelCost.value='0.00';
frm.overtimeCost.value='0.00';
frm.labor.value='0.00';