mirror of
https://github.com/fspc/Yellow-Bike-Database.git
synced 2026-09-03 10:21:38 -04:00
Fixes an issue when Sum has ",", and a spelling mistake.
This commit is contained in:
+2
-1
@@ -133,7 +133,8 @@ $(function() {
|
||||
$("#" + k + "_sum span").text("$" + sum.toFixed(2));
|
||||
|
||||
// Difference
|
||||
var deposit_amount = $('input[name="' + k + '"]').parent().prev().prev().text().replace(/\$(\d*\.\d*)\s+/, "$1" );
|
||||
var deposit_amount = $('input[name="' + k + '"]').parent().prev().prev().text().replace(/\$(\d*(?:,\d{3})*\.\d*)\s+/, "$1" );
|
||||
deposit_amount = deposit_amount.replace(/,/, "");
|
||||
if (deposit_amount != 0) {
|
||||
var diff = deposit_amount - sum;
|
||||
$("#" + k + "_difference span").text("$"+ diff.toFixed(2));
|
||||
|
||||
Reference in New Issue
Block a user