sj_royd/mf_vat_payers 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sj_royd/mf_vat_payers

Composer 安装命令:

composer require sj_royd/mf_vat_payers

包简介

Registry of VAT payers

README 文档

README

List of entities registered as VAT payers, unregistered, as well as deleted and restored to the VAT register.

The next step will be handling a flat file in which information about NIP-bank account pairs is to be provided. The Ministry has not yet provided the location of such a file.

More on https://www.gov.pl/web/kas/wykaz-podatnikow-vat

Usage

Search methods

The ministry imposed a limit of 10 questions per day on single IP.

nip method

Searching for a single entity by tax identification number

<?php

use SJRoyd\MF\VATPayers\Params\NIP;
use SJRoyd\MF\VATPayers\Search;
    
try {
    $s = new Search();
    $r = $s->nip(new NIP('0000000000'));
    // $r is a EntityItem instance  
} catch (Exception $e){
    // $e is a Exception instance
}

nips method

Searching for entities by tax identification numbers

<?php

use SJRoyd\MF\VATPayers\Params\NIP;
use SJRoyd\MF\VATPayers\Search;

try {
    $s = new Search();
    $r = $s->nips(new NIP(['0000000000', '1111111111'])); // max 30 numbers
    // $r is a EntityList instance  
} catch (Exception $e){
    // $e is a Exception instance
}

regon method

Searching for a single entity by REGON number

<?php

use SJRoyd\MF\VATPayers\Params\REGON;
use SJRoyd\MF\VATPayers\Search;

try {
    $s = new Search();
    $r = $s->regon(new REGON('000000000')); // 9 or 14 digits REGON
    // $r is a EntityItem instance  
} catch (Exception $e){
    // $e is a Exception instance
}

regons method

Searching for entities by REGON numbers

<?php

use SJRoyd\MF\VATPayers\Params\REGON;
use SJRoyd\MF\VATPayers\Search;

try {
    $s = new Search();
    $r = $s->regons(new REGON(['000000000', '11111111111111'])); // 9 or 14 digits REGONs, max 30 numbers
    // $r is a EntityList instance  
} catch (Exception $e){
    // $e is a Exception instance
}

bankAccount method

Searching for entities by bank account number

<?php

use SJRoyd\MF\VATPayers\Params\NRB;
use SJRoyd\MF\VATPayers\Search;

try {
    $s = new Search();
    $r = $s->bankAccount(new NRB('00 0000 0000 0000 0000 0000 0000')); // 26 digits polish bank account number
    // $r is a EntityList instance  
} catch (Exception $e){
    // $e is a Exception instance
}

bankAccounts method

Searching for entities by bank account numbers

<?php

use SJRoyd\MF\VATPayers\Params\NRB;
use SJRoyd\MF\VATPayers\Search;

try {
    $s = new Search();
    $r = $s->bankAccounts(new NRB(['00 0000 0000 0000 0000 0000 0000', '12345678901234567890123456'])); // max 30 numbers
    // $r is a EntityList instance  
} catch (Exception $e){
    // $e is a Exception instance
}

Check methods

The ministry imposed a limit of 1 question per day on IP.

nip method

Single entity check by NIP and bank account number

<?php

use SJRoyd\MF\VATPayers\Params\NIP;
use SJRoyd\MF\VATPayers\Params\NRB;
use SJRoyd\MF\VATPayers\Check;

try {
    $c = new Check();
    $r = $c->nip(new NIP('0000000000'), new NRB('00 0000 0000 0000 0000 0000 0000'));
    // $r is a EntityCheck instance  
} catch (Exception $e){
    // $e is a Exception instance
}

regon method

Single entity check by REGON and bank account number

<?php

use SJRoyd\MF\VATPayers\Params\REGON;
use SJRoyd\MF\VATPayers\Params\NRB;
use SJRoyd\MF\VATPayers\Check;
use SJRoyd\MF\VATPayers\Exception;

try {
    $c = new Check();
    $r = $c->regon(new REGON('000000000'), new NRB('00 0000 0000 0000 0000 0000 0000'));
    // $r is a EntityCheck instance 
} catch (Exception $e){
    // $e is a Exception instance
}

Responses

EntityList

Contains methods:

  • getSubjects(): array[Entity] - A list of Entity instances
  • getRequestId(): string - Eequest id, ex. 9mll9-85feng0

EntityItem

Contains methods:

  • getSubject(): Entity - An Entity instance
  • getRequestId(): string - Eequest id, ex. 9mll9-85feng0

EntityCheck

Contains methods:

  • getAccountAssigned(): boolean - Is the account assigned to the active entity
  • getRequestId(): string - Eequest id, ex. 9mll9-85feng0

Entities

Entity

Contains methods:

  • getName(): string - Company (name) or name and surname
  • getNip(): string - (optional) NIP identification number
  • getStatusVat(): string - (optional) VAT payer status; Enum: Czynny, Zwolniony, Niezarejestrowany
  • getRegon(): string - (optional) REGON identification number
  • getPesel(): string - (optional) PESEL identification number
  • getKrs(): string - (optional) KRS number if issued
  • getResidenceAddress(): string - (optional) HQ adress
  • getWorkingAddress(): string - (optional) Permanent establishment address or residence address in the absence of a permanent address
  • getRepresentatives(): array[EntityPerson] - (optional) Names and surnames of the members of the body authorized to represent the entity and their NIP and/or PESEL numbers
  • getAuthorizedClerks(): array[EntityPerson] - (optional) First and last names of proxies and their NIP and/or PESEL numbers
  • getPartners(): array[EntityPerson] - (optional) First and last names or company (name) of the partner and his NIP and/or PESEL numbers
  • getRegistrationLegalDate(): DateTime - (optional) Date of registration as a VAT payer
  • getRegistrationDenialDate(): DateTime - (optional) Date of refusal to register as a VAT payer
  • getRegistrationDenialBasis(): string - (optional) Legal basis for refusal of registration
  • getRestorationDate(): DateTime - (optional) Date of restoration as a VAT payer
  • getRestorationBasis(): string - (optional) Legal basis for the restoration as a VAT payer
  • getRemovalDate(): DateTime - (optional) Date of deletion of refusal to register as a VAT payer
  • getRemovalBasis(): string - (optional) Legal basis for the restoration as a VAT payer
  • getAccountNumbers(): array[string] - (optional) A list of bank accounts numbers
  • getHasVirtualAccounts(): boolean - (optional) The entity has virtual account masks
  • isVatActive(): boolean - Is the taxpayer active?
  • isVatExempt(): boolean - Is the taxpayer exempt?
  • isVatUnregistered(): boolean - Is the taxpayer unregistered?

EntityPerson

Contains methods:

  • getCompanyName() - (optional)
  • getFirstName() - (optional)
  • getLastName() - (optional)
  • getNip() - (optional)
  • getPesel() - (optional)

Exception

Exception instance

An instance extends PHP Exception and inherits all of the parent methods.

Methods:

  • getMessage(): string - error message
  • getCode(): string - example: WL-101

sj_royd/mf_vat_payers 适用场景与选型建议

sj_royd/mf_vat_payers 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 15 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 11 月 26 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「vat」 「mf」 「lista」 「payers」 「biała」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 sj_royd/mf_vat_payers 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 sj_royd/mf_vat_payers 我们能提供哪些服务?
定制开发 / 二次开发

基于 sj_royd/mf_vat_payers 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 15
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-11-26