added global parsefloat method which derives from C# culture.

This commit is contained in:
DESKTOP-T0O5CDB\DESK-555BD
2024-01-22 10:52:30 -07:00
parent 85eb0b70e6
commit aad1655f2e
10 changed files with 154 additions and 61 deletions

View File

@@ -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))
{