Skip to content

Commit

Permalink
Merge pull request #162 from Evernovak/patch-9
Browse files Browse the repository at this point in the history
Update EvtRetPF.php
  • Loading branch information
robmachado authored Feb 29, 2024
2 parents 9328fa1 + 0e0479a commit 54b52ab
Showing 1 changed file with 38 additions and 30 deletions.
68 changes: 38 additions & 30 deletions src/Factories/EvtRetPF.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,22 +298,26 @@ protected function toNode()
self::format($ded->vlrpatrocfunp),
false
);
foreach ($ded->benefpen as $pen) {
$benefPen = $this->dom->createElement('benefPen');
$this->dom->addChild(
$benefPen,
"cpfDep",
$pen->cpfdep,
true
);
$this->dom->addChild(
$benefPen,
"vlrDepen",
self::format($pen->vlrdepen),
true
);
$detDed->appendChild($benefPen);

if (!empty($ded->benefpen)) {
foreach ($ded->benefpen as $pen) {
$benefPen = $this->dom->createElement('benefPen');
$this->dom->addChild(
$benefPen,
"cpfDep",
$pen->cpfdep,
true
);
$this->dom->addChild(
$benefPen,
"vlrDepen",
self::format($pen->vlrdepen),
true
);
$detDed->appendChild($benefPen);
}
}

$infoPgto->appendChild($detDed);
}
}
Expand Down Expand Up @@ -414,22 +418,26 @@ protected function toNode()
self::format($susp->vlrdedsusp ?? null),
false
);
foreach ($susp->benefpen as $bpen) {
$benefPen = $this->dom->createElement('benefPen');
$this->dom->addChild(
$benefPen,
"cpfDep",
$bpen->cpfdep,
true
);
$this->dom->addChild(
$benefPen,
"vlrDepenSusp",
self::format($bpen->vlrdepensusp),
true
);
$dedSusp->appendChild($benefPen);

if (!empty($susp->benefpen)) {
foreach ($susp->benefpen as $bpen) {
$benefPen = $this->dom->createElement('benefPen');
$this->dom->addChild(
$benefPen,
"cpfDep",
$bpen->cpfdep,
true
);
$this->dom->addChild(
$benefPen,
"vlrDepenSusp",
self::format($bpen->vlrdepensusp),
true
);
$dedSusp->appendChild($benefPen);
}
}

$infoProcRet->appendChild($dedSusp);
}
$infoPgto->appendChild($infoProcRet);
Expand Down

0 comments on commit 54b52ab

Please sign in to comment.