This package helps to translate baht amount to text. This should be useful for Invoice, Receipts in Thai baht
You can install the package via composer:
composer require zenepay/baht-text
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); // 'สองล้านหนึ่งหมื่นยี่สิบห้าบาทยี่สิบห้าสตางค์'
-10000.23 // true 1,000.23 // true -1,000.23 // true 1,0000,234.00 //false ู฿1,999,123.33 //false
- Water Billing
- user login: demo@example.com
- password: demo1234
The MIT License (MIT)
เช่น '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
The MIT License (MIT)