Coder Social home page Coder Social logo

anaf-php's Introduction

ANAF PHP

GitHub Workflow Status (main) Total Downloads Latest Version License


ANAF PHP is a charged PHP API client that allows you to interact with the ANAF Web Services.

Get Started

Requires PHP 8.1+

First, install ANAF via the Composer package manager:

composer require andalisolutions/anaf-php

Then, interact with ANAF's API:

$company = Anaf::for('TAX IDEINTIFICATION NUMBER');

TODO

  • Obtaining public information in the financial statements/annual accounting reports related to economic agents. (Docs)
  • Verification of 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)
  • Verification of taxpayers who are registered in the Register of farmers who apply the special regime (Docs)
  • Verification of 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

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;
$companyInfo->vatRegistration->startDate;
$companyInfo->vatRegistration->stopDate;
$companyInfo->vatRegistration->stopEffectiveDate;
$companyInfo->vatRegistration->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->generalData->toArray(); // ['tax_identification_number' => '', 'company_name' => '', 'address' => '',...]
...

ANAF PHP is an open-sourced software licensed under the MIT license.

anaf-php's People

Contributors

ciungulete avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.