Skip to content

Commit

Permalink
Merge pull request #1019 from bcgov/bugfix/AB#27592-custom-field-curr…
Browse files Browse the repository at this point in the history
…ency-handling

bugfix/AB#27623 update custom currency handling
  • Loading branch information
jimmyPasta authored Jan 23, 2025
2 parents 92af338 + 9a722a8 commit 9e31fe3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
(function () {
(function () {
$('.custom-currency-input').maskMoney({
thousands: ',',
decimal: '.'
}).maskMoney('mask');
})();

$('.custom-currency-input').on('blur', function () {
if ($(this).val() === '' || $(this).val() === '0') {
$(this).val('0.00');
}
});
})();

Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
$(function () {
$('.unity-currency-input').maskMoney();
});
(function () {
$('.custom-currency-input').maskMoney({
thousands: ',',
decimal: '.'
}).maskMoney('mask');

$('.custom-currency-input').on('blur', function () {
if ($(this).val() === '' || $(this).val() === '0') {
$(this).val('0.00');
}
});
})();

0 comments on commit 9e31fe3

Please sign in to comment.