Skip to content

Commit

Permalink
Merge pull request #110 from dbemfica/master
Browse files Browse the repository at this point in the history
Grupo produto predominante deve ser informado para modal rodoviário
  • Loading branch information
cleitonperin committed Mar 24, 2020
2 parents 276051d + 6412d8a commit d728abb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Make.php
Expand Up @@ -314,7 +314,8 @@ public function monta()
$this->dom->appChild($this->emit, $this->enderEmit, 'Falta tag "enderEmit"');
$this->dom->appChild($this->infMDFe, $this->emit, 'Falta tag "emit"');
if ($this->rodo) {
if (empty($this->prodPred)) {
$tpEmit = $this->ide->getElementsByTagName('tpEmit')->item(0)->nodeValue;
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) {
Expand Down Expand Up @@ -3177,4 +3178,4 @@ private function equilizeParameters(stdClass $std, $possible)
{
return Strings::equilizeParameters($std, $possible, $this->replaceAccentedChars);
}
}
}

0 comments on commit d728abb

Please sign in to comment.