Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com>
  • Loading branch information
sampoyigi committed Oct 16, 2021
1 parent 68817d7 commit ed54e05
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions assets/src/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,23 +100,22 @@ $(function () {

// CURRENCY HELPER FUNCTION DEFINITION
// ============================
if (app) {

app.currencyFormat = function (amount) {

if (!app.currency)
throw 'Currency values not defined in app scope';

return currency(amount, {
decimal: app.currency.decimal_sign,
precision: app.currency.decimal_precision,
separator: app.currency.thousand_sign,
symbol: app.currency.symbol,
pattern: app.currency.symbol_position ? '#!' : '!#',
}).format();

};

}
$(function () {
if (app) {
app.currencyFormat = function (amount) {
if (!app.currency)
throw 'Currency values not defined in app scope';

return currency(amount, {
decimal: app.currency.decimal_sign,
precision: app.currency.decimal_precision,
separator: app.currency.thousand_sign,
symbol: app.currency.symbol,
pattern: app.currency.symbol_position ? '#!' : '!#',
}).format();

};
}
})


0 comments on commit ed54e05

Please sign in to comment.