Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Make.php
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ protected function addTagDet()
$this->addTag($imposto, $this->aPIS[$item], 'Falta a tag det/imposto!');
}
//PISST => imposto
if (!empty($this->aPISST[$item]) && empty($this->aPIS[$item])) {
if (!empty($this->aPISST[$item])) {
//ou o PIS normal ou PISST não pode haver os dois no mesmo item
$this->addTag($imposto, $this->aPISST[$item], 'Falta a tag det/imposto!');
}
Expand Down
4 changes: 2 additions & 2 deletions src/MakeDev.php
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ protected function addTagDet()
$this->addTag($imposto, $this->aPIS[$item], 'Falta a tag det/imposto!');
}
//PISST => imposto
if (!empty($this->aPISST[$item]) && empty($this->aPIS[$item])) {
if (!empty($this->aPISST[$item])) {
//ou o PIS normal ou PISST não pode haver os dois no mesmo item
$this->addTag($imposto, $this->aPISST[$item], 'Falta a tag det/imposto!');
}
Expand All @@ -754,7 +754,7 @@ protected function addTagDet()
$this->addTag($imposto, $this->aCOFINS[$item], 'Falta a tag det/imposto!');
}
//COFINSST => imposto
if (!empty($this->aCOFINSST[$item]) && empty($this->aCOFINS[$item])) {
if (!empty($this->aCOFINSST[$item])) {
//ou o COFINS normal ou CONFINSST não pode haver os dois no mesmo item
$this->addTag($imposto, $this->aCOFINSST[$item], 'Falta a tag det/imposto!');
}
Expand Down
2 changes: 1 addition & 1 deletion src/Traits/TraitTagDet.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public function tagprod(stdClass $std): DOMElement
true,
"$identificador Descrição do produto ou serviço"
);
if (!in_array(strlen($std->NCM), [2,8])) {
if (!in_array(strlen($std->NCM ?? ''), [2,8])) {
$this->errors[] = "Item: $std->item NCM $std->NCM deve ter 2 ou 8 dígitos";
}
$this->dom->addChild(
Expand Down
Loading