added global parsefloat method which derives from C# culture.
This commit is contained in:
@@ -91,14 +91,14 @@ function getAndValidateGasRecordValues() {
|
||||
} else {
|
||||
$("#gasRecordMileage").removeClass("is-invalid");
|
||||
}
|
||||
if (gasGallons.trim() == '' || parseFloat(gasGallons) <= 0) {
|
||||
if (gasGallons.trim() == '' || globalParseFloat(gasGallons) <= 0) {
|
||||
hasError = true;
|
||||
$("#gasRecordGallons").addClass("is-invalid");
|
||||
} else {
|
||||
$("#gasRecordGallons").removeClass("is-invalid");
|
||||
}
|
||||
if (gasCostType != undefined && gasCostType == 'unit') {
|
||||
var convertedGasCost = parseFloat(gasCost) * parseFloat(gasGallons);
|
||||
var convertedGasCost = globalParseFloat(gasCost) * globalParseFloat(gasGallons);
|
||||
gasCost = convertedGasCost.toFixed(2).toString();
|
||||
if (isNaN(gasCost))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user