vlm/anaf-php
Composer 安装命令:
composer require vlm/anaf-php
包简介
Description
README 文档
README
ANAF PHP is a charged PHP API client that allows you to interact with the ANAF Web Services.
Get Started
Requires PHP 7.3+
First, install ANAF via the Composer package manager:
composer require andalisolutions/anaf-php
Then, interact with ANAF's API:
$company = Anaf::for('TAX IDENTIFICATION NUMBER');
TODO
- Obtaining public information in the financial statements/annual accounting reports related to economic agents. (Docs)
- Get info about taxpayers who are registered according to art. 316 of the Fiscal Code, according to the Register of taxable persons who apply the VAT system upon receipt, according to the Register of inactive/reactive taxpayers, according to the Register of persons who apply the broken down payment of VAT and respectively the RO e-Invoice Register. (Docs)
- Get info about taxpayers who are registered in the Register of farmers who apply the special regime (Docs)
- Get info about taxpayers who are registered in the Register of religious entities/units (Docs)
- Accessing the functionalities offered by the SPV (Docs)
- The national system regarding the electronic invoice RO e-Factura (Docs)
- The integrated electronic system RO e-Transport (Docs)
Usage
Balance Sheet Resource
Get public information in the financial statements/annual accounting reports related to economic agents
$balanceSheet = $company->balanceSheet()->forYear('2021'); $balanceSheet->year; $balanceSheet->tax_identification_number; $balanceSheet->company_name; $balanceSheet->activity_code; $balanceSheet->activity_name; $balanceSheet->indicators; // array $balanceSheet->indicators['AVERAGE_NUMBER_OF_EMPLOYEES']->value; $balanceSheet->indicators['NET_LOSS']->value; $balanceSheet->indicators['NET_PROFIT']->value; $balanceSheet->indicators['GROSS_LOSS']->value; $balanceSheet->indicators['GROSS_PROFIT']->value; $balanceSheet->indicators['TOTAL_EXPENSES']->value; $balanceSheet->indicators['TOTAL_INCOME']->value; $balanceSheet->indicators['NET_TURNOVER']->value; $balanceSheet->indicators['HERITAGE_OF_THE_KINGDOM']->value; $balanceSheet->indicators['PAID_SUBSCRIBED_CAPITAL']->value; $balanceSheet->indicators['CAPITAL_TOTAL']->value; $balanceSheet->indicators['PROVISIONS']->value; $balanceSheet->indicators['ADVANCE_INCOME']->value; $balanceSheet->indicators['LIABILITIES']->value; $balanceSheet->indicators['PREPAYMENTS']->value; $balanceSheet->indicators['HOME_AND_BANK_ACCOUNTS']->value; $balanceSheet->indicators['DEBT']->value; $balanceSheet->indicators['INVENTORIES']->value; $balanceSheet->indicators['CURRENT_ASSETS']->value; $balanceSheet->indicators['FIXED_ASSETS']->value; $balanceSheet->toArray(); // ['year' => '', 'tax_identification_number' => '', 'company_name' => '' ...]
For balance sheets, the indicators may vary depending on the type of company, as specified by ANAF. I recommend you to use var_dump to observe the type of indicators. The vast majority of companies have the indicators from the example above
Info Resource
Checking taxpayers who are registered according to art. 316 of the Fiscal Code in Romania, according to the Register of taxable persons who apply the VAT system upon receipt, according to the Register of inactive/reactive taxpayers, according to the Register of persons who apply the broken down payment of VAT and respectively the RO e-Invoice Register.
$companyInfo = $company->info()->get(); $companyInfo->generalData; /* Accessible information in general data */ $companyInfo->generalData->companyName; $companyInfo->generalData->address; $companyInfo->generalData->registrationNumber; $companyInfo->generalData->phone; $companyInfo->generalData->fax; $companyInfo->generalData->postalCode; $companyInfo->generalData->document; $companyInfo->generalData->registrationStatus; $companyInfo->generalData->registrationDate; $companyInfo->generalData->activityCode; $companyInfo->generalData->bankAccount; $companyInfo->generalData->roInvoiceStatus; $companyInfo->generalData->authorityName; $companyInfo->vatRegistration; /* Accessible information in vat registration */ $companyInfo->vatRegistration->status; //vatPeriods is an array from ANAF v8 $companyInfo->vatRegistration->vatPeriods[0]->startDate $companyInfo->vatRegistration->vatPeriods[0]->stopDate; $companyInfo->vatRegistration->vatPeriods[0]->stopEffectiveDate; $companyInfo->vatRegistration->vatPeriods[0]->message; $companyInfo->vatAtCheckout; /* Accessible information in vat at checkout */ $companyInfo->vatAtCheckout->startDate; $companyInfo->vatAtCheckout->stopDate; $companyInfo->vatAtCheckout->updateDate; $companyInfo->vatAtCheckout->publishDate; $companyInfo->vatAtCheckout->updatedType; $companyInfo->vatAtCheckout->status; $companyInfo->inactiveState; /* Accessible information in inactive state */ $companyInfo->inactiveState->inactivationDate; $companyInfo->inactiveState->reactivationDate; $companyInfo->inactiveState->publishDate; $companyInfo->inactiveState->deletionDate; $companyInfo->inactiveState->status; $companyInfo->splitVat; /* Accessible information in split tva */ $companyInfo->splitVat->startDate; $companyInfo->splitVat->stopDate; $companyInfo->splitVat->status; $companyInfo->hqAddress; /* Accessible information in hq address */ $companyInfo->hqAddress->street; $companyInfo->hqAddress->no; $companyInfo->hqAddress->city; $companyInfo->hqAddress->cityCode; $companyInfo->hqAddress->county; $companyInfo->hqAddress->countyCode; $companyInfo->hqAddress->countyShort; $companyInfo->hqAddress->country; $companyInfo->hqAddress->details; $companyInfo->hqAddress->postalCode; $companyInfo->fiscalAddress; /* Accessible information in fiscal address */ $companyInfo->fiscalAddress->street; $companyInfo->fiscalAddress->no; $companyInfo->fiscalAddress->city; $companyInfo->fiscalAddress->cityCode; $companyInfo->fiscalAddress->county; $companyInfo->fiscalAddress->countyCode; $companyInfo->fiscalAddress->countyShort; $companyInfo->fiscalAddress->country; $companyInfo->fiscalAddress->details; $companyInfo->fiscalAddress->postalCode; // You can use all resources as array $companyInfo->toArray(); // ["general_data" => ["tax_identification_number" => '', "company_name" => ''...]..] // or $companyInfo->generalData->toArray(); // ['tax_identification_number' => '', 'company_name' => ''...]
Ngo Resource
Checking NGO taxpayers who are registered in the Register of religious entities/units
$entity = Anaf::for('TAX IDENTIFICATION NUMBER'); $entityInfo = $entity->ngo()->get(); $entityInfo->taxIdentificationNumber; $entityInfo->searchDate; $entityInfo->entityName; $entityInfo->address; $entityInfo->phone; $entityInfo->postalCode; $entityInfo->document; $entityInfo->registrationStatus; $entityInfo->startDate; $entityInfo->endDate; $entityInfo->status; // You can use all resources as array $entityInfo->toArray(); // ["tax_identification_number" => '', "entity_name" => ''...]
ANAF PHP is an open-sourced software licensed under the MIT license.
vlm/anaf-php 适用场景与选型建议
vlm/anaf-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 14 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 04 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「sdk」 「anaf」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 vlm/anaf-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 vlm/anaf-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 vlm/anaf-php 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
API ANAF pentru verificarea contribuabililor care sunt inregistrati conform art. 316 din Codul Fiscal
Anaf OAuth 2.0 support for the PHP League's OAuth 2.0 Client
PHP API Client for ANAF API and Ro eFactura
Laravel package for interacting with ANAF web services
Alfabank REST API integration
Laravel wrapper for e-Factura SDK with token storage, job scheduling, and easy model integration
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 26
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-04-26
