-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add exceptions, Parse address, Update API version from 3 to 4, Add IB…
…AN for Split TVA, Change errors logics
- Loading branch information
Alex Stoica
committed
Jun 1, 2019
1 parent
dc55d7a
commit 831419d
Showing
8 changed files
with
220 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,70 @@ | ||
<?php | ||
include("vendor/autoload.php"); | ||
|
||
// Gather data about more CUI's | ||
$anaf = new \Itrack\Anaf\Client(); | ||
$anaf->addCui(123456, "2017-12-31"); | ||
$anaf->addCui(654321, "2017-11-24"); | ||
print_r($anaf->getResults()); | ||
|
||
$anaf->addCui(123456, "2019-05-31"); | ||
$anaf->addCui("RO16826034"); | ||
|
||
print_r($anaf->getResults()); | ||
|
||
// Gather data about more CUI's using an array | ||
$anaf = new \Itrack\Anaf\Client(); | ||
|
||
$cuis = [ | ||
"RO123456", | ||
"123456", | ||
123456 | ||
]; | ||
$anaf->addCui($cuis); | ||
|
||
print_r($anaf->getResults()); | ||
|
||
// Gather data about one CUI | ||
$anaf = new \Itrack\Anaf\Client(); | ||
|
||
$anaf->addCui("14080700"); | ||
|
||
print_r($anaf->getOneResult()); | ||
|
||
/* | ||
Output example: | ||
stdClass Object | ||
( | ||
[cui] => 14080700 | ||
[data] => 2019-06-01 | ||
[denumire] => REALITATEA MEDIA SA | ||
[adresa] => stdClass Object | ||
( | ||
[raw] => MUNICIPIUL BUCUREŞTI, SECTOR 1, ŞOS. BUCUREŞTI-PLOIEŞTI, NR.172-176, BL.CORP A, ET.3, AP.CAMERA 5 | ||
[judet] => Municipiul Bucureşti | ||
[localitate] => Sector 1 | ||
[strada] => Şos. Bucureşti-Ploieşti | ||
[numar] => 172-176 | ||
[altele] => Bl.corp A, Et.3, Ap.camera 5 | ||
) | ||
[scpTVA] => 1 | ||
[data_inceput_ScpTVA] => 2001-08-01 | ||
[data_sfarsit_ScpTVA] => | ||
[data_anul_imp_ScpTVA] => | ||
[mesaj_ScpTVA] => platitor IN SCOPURI de TVA la data cautata | ||
[dataInceputTvaInc] => | ||
[dataSfarsitTvaInc] => | ||
[dataActualizareTvaInc] => | ||
[dataPublicareTvaInc] => | ||
[tipActTvaInc] => | ||
[statusTvaIncasare] => | ||
[dataInactivare] => | ||
[dataReactivare] => | ||
[dataPublicare] => | ||
[dataRadiere] => | ||
[statusInactivi] => | ||
[dataInceputSplitTVA] => 2018-03-01 | ||
[dataAnulareSplitTVA] => | ||
[statusSplitTVA] => 1 | ||
[iban] => RO53TREZ701505001XXXXTVA | ||
) | ||
*/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
namespace Itrack\Anaf\Exceptions; | ||
|
||
class LimitExceeded extends \Exception {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
namespace Itrack\Anaf\Exceptions; | ||
|
||
class RequestFailed extends \Exception {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
namespace Itrack\Anaf\Exceptions; | ||
|
||
class ResponseFailed extends \Exception {} |