# formatAmountInput

Source: https://pakdatakit.dev/api/typescript/format/functions/formatamountinput/

```ts
function formatAmountInput(input): string | null;
```

Defined in: [format.ts:188](https://github.com/chmuzamil/pakdatakit/blob/a6eeaa47381308c4e4fcda45b29642fe4fbfb1fc/src/format.ts#L188)

Writes back an amount typed in any form [parseAmount](https://pakdatakit.dev/api/typescript/format/functions/parseamount/) accepts, for
showing next to the field ("= Rs. 150,000"): `Rs.`, international
grouping, and paisa only when there are any (`Rs. 1,234.50`). Returns
`null` when `parseAmount` does; it never throws.

## Parameters

| Parameter | Type | Description |
| :------ | :------ | :------ |
| `input` | `string` | The amount as typed |

## Returns

`string` \| `null`

E.g. `"Rs. 150,000"` for `"1.5 lakh"`, or `null`
