File tree Expand file tree Collapse file tree 5 files changed +14
-6
lines changed
src/Adis/StatusBusinessSubjects Expand file tree Collapse file tree 5 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -13,14 +13,22 @@ public function transform(stdClass $data): Subject
1313
1414 $ exists = $ data ->$ attributes ->typSubjektu !== 'NENALEZEN ' ;
1515 $ isVatPayer = $ data ->$ attributes ->typSubjektu === 'PLATCE_DPH ' ;
16+ $ address = null ;
17+ if (isset ($ data ->adresa )) {
18+ $ address = $ data ->adresa ;
19+ if (isset ($ address ->castObce )) {
20+ $ address ->castObce = rtrim ($ address ->castObce );
21+ }
22+ }
23+
1624 return new Subject (
1725 $ exists ,
1826 $ data ->$ attributes ->typSubjektu ,
1927 $ data ->$ attributes ->dic ,
2028 $ exists && $ isVatPayer ? $ data ->$ attributes ->nespolehlivyPlatce !== 'ANO ' : null ,
2129 $ isVatPayer ,
2230 $ data ->$ attributes ->cisloFu ?? '' ,
23- $ data -> adresa ?? null
31+ $ address
2432 );
2533 }
2634}
Original file line number Diff line number Diff line change 77 "taxOfficeNumber" : " 13" ,
88 "address" : {
99 "uliceCislo" : " Jankovcova 1522\/ 53" ,
10- "castObce" : " HOLE\u0160 OVICE (PRAHA 7) " ,
10+ "castObce" : " HOLE\u0160 OVICE (PRAHA 7)" ,
1111 "mesto" : " PRAHA 7" ,
1212 "psc" : " 17000" ,
1313 "stat" : " \u010c esk\u00e1 republika"
Original file line number Diff line number Diff line change 77 "taxOfficeNumber" : " 451" ,
88 "address" : {
99 "uliceCislo" : " Var\u0161 avsk\u00e1 715\/ 36" ,
10- "castObce" : " VINOHRADY (PRAHA 2) " ,
10+ "castObce" : " VINOHRADY (PRAHA 2)" ,
1111 "mesto" : " PRAHA 2" ,
1212 "psc" : " 12000" ,
1313 "stat" : " \u010c esk\u00e1 republika"
Original file line number Diff line number Diff line change 77 "taxOfficeNumber" : " 452" ,
88 "address" : {
99 "uliceCislo" : " Dubov\u00e1 765" ,
10- "castObce" : " DOLN\u00cd BOUSOV " ,
10+ "castObce" : " DOLN\u00cd BOUSOV" ,
1111 "mesto" : " DOLN\u00cd BOUSOV" ,
1212 "psc" : " 29404" ,
1313 "stat" : " \u010c esk\u00e1 republika"
Original file line number Diff line number Diff line change 77 "taxOfficeNumber" : " 452" ,
88 "address" : {
99 "uliceCislo" : " Na Dlaskov\u011b 94" ,
10- "castObce" : " BRTNICE " ,
10+ "castObce" : " BRTNICE" ,
1111 "mesto" : " VELK\u00c9 POPOVICE" ,
1212 "psc" : " 25169" ,
1313 "stat" : " \u010c esk\u00e1 republika"
1414 }
15- }
15+ }
You can’t perform that action at this time.
0 commit comments