Skip to content

Commit

Permalink
Merge pull request #112 from gersonfs/master
Browse files Browse the repository at this point in the history
Desativando regras de validação que foram adiadas
  • Loading branch information
cleitonperin committed Apr 7, 2020
2 parents d728abb + c34402d commit 44f17b9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/Common/Standardize.php
Expand Up @@ -147,5 +147,4 @@ public function toArray($xml = null)
}
return json_decode($this->json, true);
}

}
4 changes: 2 additions & 2 deletions src/Complements.php
Expand Up @@ -206,7 +206,7 @@ public static function cancelRegister($mdfe, $cancelamento)
->nodeValue = 'Cancelamento de MDF-e homologado';
$procXML = Strings::clearProtocoledXML($dommdfe->saveXML());
break;
} else if (in_array($cStat, ['135', '136', '155'])
} elseif (in_array($cStat, ['135', '136', '155'])
&& $tpEvento == '110112'
&& $chaveEvento == $chaveMdfe
) {
Expand All @@ -227,4 +227,4 @@ public static function closeRegister($mdfe, $encerramento)
{
return self::cancelRegister($mdfe, $encerramento);
}
}
}
10 changes: 5 additions & 5 deletions src/Make.php
Expand Up @@ -318,7 +318,7 @@ public function monta()
if (($tpEmit == 1 || $tpEmit == 3) && empty($this->prodPred)) {
$this->errors[] = "Tag prodPred é obrigatória para modal rodoviário!";
}
if (empty($this->infLotacao) and ($this->contaDoc($this->infCTe) + $this->contaDoc($this->infNFe) + $this->contaDoc($this->infMDFeTransp)) == 1) {
if (($tpEmit == 1 || $tpEmit == 3) && empty($this->infLotacao) && ($this->contaDoc($this->infCTe) + $this->contaDoc($this->infNFe) + $this->contaDoc($this->infMDFeTransp)) == 1) {
$this->errors[] = "Tag infLotacao é obrigatória quando só existir um Documento informado!";
}
if ($this->infANTT) {
Expand Down Expand Up @@ -997,7 +997,7 @@ public function taginfContratante(stdClass $std)
true,
$identificador . "Número do CPF do contratante do serviço"
);
} else if ($std->CNPJ) {
} elseif ($std->CNPJ) {
$this->dom->addChild(
$infContratante,
"CNPJ",
Expand Down Expand Up @@ -2928,7 +2928,7 @@ public function taginfPag(stdClass $std)
true,
$identificador . "Número do CPF do responsável pelo pgto"
);
} else if (!empty($std->CNPJ)) {
} elseif (!empty($std->CNPJ)) {
$this->dom->addChild(
$infPag,
"CNPJ",
Expand All @@ -2946,7 +2946,7 @@ public function taginfPag(stdClass $std)
);
}
foreach ($std->Comp as $value) {
$this->dom->appChild($infPag, $this->CompPag($value), 'Falta tag "Comp"');
$this->dom->appChild($infPag, $this->compPag($value), 'Falta tag "Comp"');
}
$this->dom->addChild(
$infPag,
Expand Down Expand Up @@ -2977,7 +2977,7 @@ public function taginfPag(stdClass $std)
* @param stdClass
*
*/
private function CompPag(stdClass $std)
private function compPag(stdClass $std)
{
$possible = [
'tpComp',
Expand Down

0 comments on commit 44f17b9

Please sign in to comment.