@@ 306-313 (lines=8) @@ | ||
303 | 'Algum dado do intermediário deve ser passado.' |
|
304 | ); |
|
305 | } |
|
306 | if (!empty($std->giin)) { |
|
307 | if (preg_match("/^([0-9A-NP-Z]{6}[.][0-9A-NP-Z]{5}[.](LE|SL|ME|BR|" |
|
308 | . "SF|SD|SS|SB|SP)[.][0-9]{3})$/", $std->giin)) { |
|
309 | throw ConsultException::wrongArgument( |
|
310 | 'Este GIIN passado não atende a estrutura estabelecida.' |
|
311 | ); |
|
312 | } |
|
313 | } |
|
314 | $method = 'ConsultarInformacoesIntermediario'; |
|
315 | $body = "<sped:$method><sped:cnpj>$std->cnpj</sped:cnpj>"; |
|
316 | if (!empty($ginn)) { |
|
@@ 428-435 (lines=8) @@ | ||
425 | 'Algum dado do patrocinado deve ser passado.' |
|
426 | ); |
|
427 | } |
|
428 | if (!empty($std->giin)) { |
|
429 | if (!preg_match("/^([0-9A-NP-Z]{6}[.][0-9A-NP-Z]{5}[.](LE|SL|ME|BR|SF" |
|
430 | . "|SD|SS|SB|SP)[.][0-9]{3})$/", $std->giin)) { |
|
431 | throw ConsultException::wrongArgument( |
|
432 | 'Este GIIN passado não atende a estrutura estabelecida.' |
|
433 | ); |
|
434 | } |
|
435 | } |
|
436 | $method = 'ConsultarInformacoesPatrocinado'; |
|
437 | $body = "<sped:$method><sped:cnpj>$std->cnpj</sped:cnpj>"; |
|
438 | if (!empty($std->giin)) { |