amountInWords
function amountInWords(amount, options?): string;Defined in: words.ts:261
Writes a rupee amount in words, with paisa, as used on Pakistani cheques and invoices. Amounts are rounded to the nearest paisa.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
amount |
number |
Amount in PKR (must be zero or more) |
options? |
AmountInWordsOptions |
Output language and cheque style |
Returns
Section titled “Returns”string
The amount in words
Example
Section titled “Example”amountInWords(125000.5);// "one lakh twenty-five thousand rupees and fifty paisa"amountInWords(125000, { cheque: true });// "Rupees One Lakh Twenty-Five Thousand Only"amountInWords(125000, { language: 'ur' });// "ایک لاکھ پچیس ہزار روپے"Throws
Section titled “Throws”If amount is negative, not finite, or too large