I have a comparison of values to check whether it is possible to take a draw or not.
I'm having trouble formatting the values and comparing them.
See:
Andintheconsoleisbringingmeformattedthisway:
Thatis,wheneveritisvalidatediftheamounttobewithdrawnislessthantheavailablebalance,itentersintotheconditionthatreturnsthatthevalueforthedrawisgreaterthantheavailablevalue,becauseoftheformatting/punctuation.
Followthecodebelow:
if(parseFloat($("#txtVlrSacar").val().replace(",", ".")) > parseFloat($("#lblSaldo").text().replace(",", "."))) {
LimparSaque();
swal("", "Valor para saque maior do que valor disponível!", "warning");
return;
}