# `Fun_getMoneyFormart` (function)

> 根据key值获取json字符串值


- **Type:** FUNCTION
- **Returns:** `text`
- **Deterministic:** NO
- **SQL data access:** CONTAINS SQL

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sMoney` | `varchar(255)` |

## Body

_Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE FUNCTION `Fun_getMoneyFormart`'`._

## Narrative

**Business context:** Amount-in-words digit splitter for printed invoices / 收据 — pads `sMoney` to 9 integer digits + 2 decimal digits, then emits each position as a comma-separated cell value, substituting `null` for leading blanks. Lets a report template render the digit columns 亿/千万/百万/.../角/分 separately.

**What it does:** Floors `sMoney` to integer, `LPAD`s to 9 chars with `*`, walks each char and appends either the digit or `'null'`; repeats for the 2-digit fractional part; returns the comma-joined string, or 11 commas of `null` when `sMoney <= 0`.

**Invocation:** Status: appears orphaned. No caller found in any channel (form-master, gdsmodule hooks, other routines, xly-src grep beyond the routine's own deployment SQL) — candidate for maintainer audit. The catalog header `根据key值获取json字符串值` was copy-pasted from a JSON helper and is wrong.
