zenepay/baht-text
最新稳定版本:1.0.1
Composer 安装命令:
composer require zenepay/baht-text
包简介
reading money number to text in Thai baht
README 文档
README
This package helps to translate baht amount to text. This should be useful for Invoice, Receipts in Thai baht
Installation
You can install the package via composer:
composer require zenepay/baht-text
Usage
Just simply calls the static function toText()
Support input of valid money format without symbol eg. 1,000,20.50
use Zenepay\BahtText\Baht; $totalAmount = '2,010,025.25'; echo Baht::toText($totalAmount); // 'สองล้านหนึ่งหมื่นยี่สิบห้าบาทยี่สิบห้าสตางค์'
validate input format with
-10000.23 // true 1,000.23 // true -1,000.23 // true 1,0000,234.00 //false ู฿1,999,123.33 //false
Demo & Show Case
- Water Billing
- user login: demo@example.com
- password: demo1234
Credits
License
The MIT License (MIT)
Baht Text: ใช้เพื่อแปลงตัวเลขเงินบาท ให้เป็นข้อความอ่าน
เช่น '2,010,025.25' ==> 'สองล้านหนึ่งหมื่นยี่สิบห้าบาทยี่สิบห้าสตางค์'
การติดตั้ง
ติดตั้งผ่าน composer
composer require zenepay/baht-text
การใช้งาน
use Zenepay\BahtText\Baht; $totalAmount = '2,010,025.25'; echo Baht::toText($totalAmount); // 'สองล้านหนึ่งหมื่นยี่สิบห้าบาทยี่สิบห้าสตางค์'
รองรับค่า input ที่เป็นจำนวนเงินที่ถูกต้อง มีคอมม่าหรือไม่มีก็ได้ ได้ทั้ง ติดลบและบวก
ดูตัวอย่างในบิล
- Water Billing
- user login: demo@example.com
- password: demo1234
Credits
License
The MIT License (MIT)
统计信息
- 总下载量: 555
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-06-05