koeketienedesign/vat-checker
Composer 安装命令:
composer require koeketienedesign/vat-checker
包简介
Validates and returns company info of VAT Number in Europe
README 文档
README
Validates and returns company info of VAT Number in Europe
Requirements
This plugin requires Craft CMS 3.0.0-beta.23 or later.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project -
Then tell Composer to load the plugin:
composer require koeketienedesign/vat-checker -
In the Control Panel, go to Settings → Plugins and click the “Install” button for VAT Checker.
VAT Checker Overview
Custom field to use in craft to get a valid European VAT number. You can use this also in twig if you want to hardcode a value. You can also receive the company info from the VAT in the twig filter.
Using VAT Checker
Custom field
Create a new field by selecting VAT Field on the dropdown. No need to add extra info
Twig filter
You can use the |vat filter to validate a VAT number. If you want company info add info as param to the function
{{ entry.vatField|vat }}
{# Output: 1|0 --> depending on if it's valid or not #}
{{ entry.vatField|vat('info') }}
{# Output: "
object(stdClass)[1591]
public 'valid' => boolean true
public 'countryCode' => string 'BE' (length=2)
public 'vatNumber' => string '0688696733' (length=10)
public 'name' => string 'BVBA KOEKETIENE DESIGN' (length=22)
public 'address' =>
object(stdClass)[1598]
public 'street' => string 'Kanunnikenstraat(mar)' (length=21)
public 'number' => string '8' (length=1)
public 'zip_code' => string '8510' (length=4)
public 'city' => string 'Kortrijk' (length=8)
public 'country' => string 'België' (length=7)
public 'countryCode' => string 'BE' (length=2)
public 'strAddress' => string 'Kanunnikenstraat(Mar) 8
8510 Kortrijk' (length=37)
" #}
VAT Checker Roadmap
None at this moment. All suggestions are welcome
Brought to you by Stefanie Gevaert
统计信息
- 总下载量: 33
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-09-15
