Fun_MoneyToCh.md 1.21 KB

Fun_MoneyToCh (function)

  • Type: FUNCTION
  • Returns: varchar(150)
  • Deterministic: NO
  • SQL data access: CONTAINS SQL

Parameters

# Mode Name Type
1 IN MONEY decimal(14,6)

Body

Body is not pre-cached. To inspect: mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE FUNCTIONFunMoneyToCh'._

Narrative

Business context: Converts a numeric currency amount into its formal Chinese capitalized form (大写金额, e.g. 123.45壹佰贰拾叁元肆角伍分) — the format required on Chinese invoices, receipts, and finance bills.

What it does: Splits the amount into integer and two decimal places, then walks up to twelve integer positions plus jiao/fen, mapping digits to 零壹贰叁肆伍陆柒捌玖 and place markers to 元/拾/佰/仟/万/亿/角/分. Suppresses redundant zeros and emits when there is no fractional part.

Invocation: Status: appears orphaned. No form-master, gdsmodule, other-routine, or Java caller references this name (the matching xly-src/script/标版/30000101/Fun_MoneyToCh.sql is the definition itself). Candidate for maintainer audit — likely a leftover from an older finance-print template.