paral_proj / fiscal-code
此包的最新版本(dev-master)没有可用的许可信息。
税务代码计算器
dev-master
2018-02-09 16:24 UTC
Requires
- php: >=5.3.0
- phpunit/phpunit: ~6.5
This package is not auto-updated.
Last update: 2024-09-24 22:22:54 UTC
README
v 1.0.0
本模块通过信息计算个人的税务代码。
如何使用
要使用它,您可以实例化它或静态调用。FiscalCalculator 是一个类,用于通过用户数据计算税务代码。CheckerFiscalCode 用于验证用户使用其数据进行的税务代码断言。
示例
计算个人税务代码
$fiscalCode = FiscalCalculator::calculate( $user["name"], $user["surname"], new \DateTime($user["birthday"]), $user["sex"], $user["common"], $user["country"] );
要计算单个税务代码,您可以使用“minor”方法
- getConsonant [For get the consonant or vowel in a name or surname @see the signature]
- getGlobalCommon [For get the common code of an user]
- getFromBirthDay [For get the day of the birth correctly formatted]
- checkLastLetterFiscalCode [For validate a fiscal code (without last char) - This calc last char]
etc...
@see class FiscalCalculator