Esempio n. 1
0
 public function render($versao, $remetenteCNPJCPF, $codcidade, $transacao, $prestadorIM, $lote, $chavesNFSe = [], $chavesRPS = [])
 {
     $method = 'ReqConsultaNFSeRPS';
     $content = $this->requestFirstPart($method);
     $content .= Header::render($versao, $remetenteCNPJCPF, null, $transacao, $codcidade);
     $content .= "<Lote Id=\"lote:{$lote}\">";
     foreach ($chavesNFSe as $nota) {
         $content .= "<NotaConsulta>";
         $content .= "<Nota Id=\"nota:" . $nota['numero'] . "\">";
         $content .= "<InscricaoMunicipalPrestador>{$prestadorIM}</InscricaoMunicipalPrestador>";
         $content .= "<NumeroNota>" . $nota['numero'] . "</NumeroNota>";
         $content .= "<CodigoVerificacao>" . $nota['codigo'] . "</CodigoVerificacao>";
         $content .= "</Nota>";
         $content .= "</NotaConsulta>";
     }
     foreach ($chavesRPS as $rps) {
         $content .= "<RPSConsulta>";
         $content .= "<RPS Id=\"rps:" . $rps['numero'] . "\">";
         $content .= "<InscricaoMunicipalPrestador>{$prestadorIM}</InscricaoMunicipalPrestador>";
         $content .= "<NumeroRPS>" . $rps['numero'] . "</NumeroRPS>";
         $content .= "<SeriePrestacao>" . $rps['serie'] . "</SeriePrestacao>";
         $content .= "</RPS>";
         $content .= "</RPSConsulta>";
     }
     $content .= "</Lote>";
     $content .= "</ns1:{$method}>";
     $content = $this->signer($content, 'Lote', 'Id', [false, false, null, null]);
     $body = $this->clear($content);
     $this->validar($versao, $body, 'Dsfnet', $method, '');
     return $body;
 }
 public function render($versao, $remetenteCNPJCPF, $codcid, $prestadorIM, $serieRPS)
 {
     $method = "ConsultaSeqRps";
     $content = $this->requestFirstPart($method);
     $content .= Header::render($versao, $remetenteCNPJCPF, null, null, null, $codcid, null, $prestadorIM, $serieRPS);
     $content .= "</ns1:{$method}>";
     $this->validar($versao, $content, 'Dsfnet', $method, '');
     return $content;
 }
Esempio n. 3
0
 public function render($versao, $remetenteCNPJCPF, $codcidade, $numeroLote)
 {
     $method = "ReqConsultaLote";
     $content = $this->requestFirstPart($method);
     $content .= Header::render($versao, $remetenteCNPJCPF, null, null, $codcidade, null, null, null, null, $numeroLote);
     $content .= "</ns1:{$method}>";
     $body = $this->clear($content);
     $this->validar($versao, $body, 'Dsfnet', $method, '');
     return $body;
 }
Esempio n. 4
0
 public function render($versao, $remetenteCNPJCPF, $codcidade, $prestadorIM, $dtInicio, $dtFim, $notaInicial)
 {
     $method = "ReqConsultaNotas";
     $content = $this->requestFirstPart($method);
     $content .= Header::render($versao, $remetenteCNPJCPF, null, null, $codcidade, null, null, $prestadorIM, null, null, $dtInicio, $dtFim, $notaInicial);
     $content .= "</ns1:{$method}>";
     $content = $this->signer($content, $method, 'Consulta:notas', [false, false, null, null]);
     $body = $this->clear($content);
     $this->validar($versao, $body, 'Dsfnet', $method, '');
     return $body;
 }
Esempio n. 5
0
 public function render($versao, $remetenteCNPJCPF, $remetenteRazao, $transacao, $codcidade, $rpss, $numeroLote)
 {
     $method = 'ReqEnvioLoteRPS';
     $this->totalizeRps($rpss);
     $content = $this->requestFirstPart($method);
     $content .= Header::render($versao, $remetenteCNPJCPF, $remetenteRazao, $transacao, $codcidade, null, null, null, null, null, $this->dtIni, $this->dtFim, null, $this->qtdRPS, $this->valorTotalServicos, $this->valorTotalDeducoes, 'WS', $this->versaoComponente);
     $content .= "<Lote Id=\"lote:{$numeroLote}\">";
     foreach ($rpss as $rps) {
         $content .= RenderRPS::toXml($rps, $this->certificate);
     }
     $content .= "</Lote>";
     $content .= "</ns1:{$method}>";
     $content = $this->signer($content, 'Lote', 'Id', [false, false, null, null]);
     $body = $this->clear($content);
     $this->validar($versao, $body, 'Dsfnet', $method, '');
     return $body;
 }
Esempio n. 6
0
 public function render($versao, $remetenteCNPJCPF, $transacao, $codcidade, $prestadorIM, $tokenEnvio, $lote, $numero, $codigoverificacao, $motivocancelamento)
 {
     $method = "ReqCancelamentoNFSe";
     $content = $this->requestFirstPart($method);
     $content .= Header::render($versao, $remetenteCNPJCPF, null, $transacao, $codcidade, null, $tokenEnvio);
     $content .= "<Lote Id=\"lote:{$lote}\">";
     $content .= "<Nota Id=\"nota:{$numero}\">";
     $content .= "<InscricaoMunicipalPrestador>{$prestadorIM}</InscricaoMunicipalPrestador>";
     $content .= "<NumeroNota>{$numero}</NumeroNota>";
     $content .= "<CodigoVerificacao>{$codigoverificacao}</CodigoVerificacao>";
     $content .= "<MotivoCancelamento>{$motivocancelamento}</MotivoCancelamento>";
     $content .= "</Nota>";
     $content .= "</Lote>";
     $content .= "</ns1:{$method}>";
     $content = $this->signer($content, 'Lote', 'Id', [false, false, null, null]);
     $body = $this->clear($content);
     $this->validar($versao, $body, 'Dsfnet', $method, '');
     return $body;
 }