Created
July 28, 2022 13:06
-
-
Save marwan-nwh/3442d35e1c304685f810a753776e6c26 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let netpaymentInWords = i18n | |
.spellOut({ number: Number(netpayment), locale: "en" }) | |
.toLowerCase(); | |
if (netpaymentInWords.indexOf("point") > -1) { | |
netpaymentInWords = | |
netpaymentInWords.replace("point", "saudi riyal point") + | |
" halala only."; | |
} else { | |
netpaymentInWords += " saudi riyal only."; | |
} | |
netpaymentInWords = netpaymentInWords.toUpperCase(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment