@@ 85-108 (lines=24) @@ | ||
82 | isset($info->categoriadeclarante) ? $info->categoriadeclarante : null, |
|
83 | false |
|
84 | ); |
|
85 | if (!empty($info->nif)) { |
|
86 | foreach ($info->nif as $n) { |
|
87 | $NIF = $this->dom->createElement("NIF"); |
|
88 | $this->dom->addChild( |
|
89 | $NIF, |
|
90 | "NumeroNIF", |
|
91 | $n->numeronif, |
|
92 | true |
|
93 | ); |
|
94 | $this->dom->addChild( |
|
95 | $NIF, |
|
96 | "PaisEmissao", |
|
97 | $n->paisemissao, |
|
98 | true |
|
99 | ); |
|
100 | $this->dom->addChild( |
|
101 | $NIF, |
|
102 | "tpNIF", |
|
103 | isset($n->tpnif) ? $n->tpnif : null, |
|
104 | false |
|
105 | ); |
|
106 | $infoCadastro->appendChild($NIF); |
|
107 | } |
|
108 | } |
|
109 | $this->dom->addChild( |
|
110 | $infoCadastro, |
|
111 | "nome", |
@@ 97-122 (lines=26) @@ | ||
94 | $ip->cnpj, |
|
95 | true |
|
96 | ); |
|
97 | if (!empty($ip->nif)) { |
|
98 | foreach ($ip->nif as $n) { |
|
99 | $NIF = $this->dom->createElement("NIF"); |
|
100 | $this->dom->addChild( |
|
101 | $NIF, |
|
102 | "NumeroNIF", |
|
103 | $n->numeronif, |
|
104 | true |
|
105 | ); |
|
106 | $this->dom->addChild( |
|
107 | $NIF, |
|
108 | "PaisEmissao", |
|
109 | $n->paisemissao, |
|
110 | true |
|
111 | ); |
|
112 | $this->dom->addChild( |
|
113 | $NIF, |
|
114 | "tpNIF", |
|
115 | !empty($n->tpnif) ? $n->tpnif : null, |
|
116 | false |
|
117 | ); |
|
118 | ||
119 | ||
120 | $infoPatrocinado->appendChild($NIF); |
|
121 | } |
|
122 | } |
|
123 | $this->dom->addChild( |
|
124 | $infoPatrocinado, |
|
125 | "nomePatrocinado", |