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
25 changes: 25 additions & 0 deletions packages/core/src/Core/Model/Summary/SummaryDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ class SummaryDetail
*/
private $total;

/**
* @var ?float
*/
private ?float $porcentajeIgv = null;

/**
* @var float
*/
Expand Down Expand Up @@ -279,6 +284,26 @@ public function setTotal(?float $total): SummaryDetail
return $this;
}

/**
* @return float
*/
public function getPorcentajeIgv(): ?float
{
return $this->porcentajeIgv;
}

/**
* @param float $porcentajeIgv
*
* @return SummaryDetail
*/
public function setPorcentajeIgv(?float $porcentajeIgv): SummaryDetail
{
$this->porcentajeIgv = $porcentajeIgv;

return $this;
}

/**
* @return float
*/
Expand Down
5 changes: 4 additions & 1 deletion packages/data/src/Data/Generator/SummaryStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public function create(): ?DocumentInterface
->setMtoOperExoneradas(50)
->setMtoOperExportacion(10)
->setMtoOtrosCargos(21)
->setPorcentajeIgv(18.0)
->setMtoIGV(3.6);

$detiail2 = new SummaryDetail();
Expand All @@ -62,6 +63,7 @@ public function create(): ?DocumentInterface
->setMtoOperInafectas(120)
->setMtoOperGratuitas(10)
->setMtoIGV(7.2)
->setPorcentajeIgv(18.0)
->setMtoISC(2.8);

$detiail3 = new SummaryDetail();
Expand All @@ -81,7 +83,8 @@ public function create(): ?DocumentInterface
->setMtoOperInafectas(24.4)
->setMtoOperExoneradas(50)
->setMtoOtrosCargos(21)
->setMtoIGV(3.6);
->setMtoIGV(3.6)
->setPorcentajeIgv(18.0);

$detiail4 = new SummaryDetail();
$detiail4->setTipoDoc('03')
Expand Down
4 changes: 3 additions & 1 deletion packages/lite/tests/Greenter/Factory/FeFactoryBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,8 @@ protected function getSummary()
->setMtoOperGravadas(20)
->setMtoOperInafectas(12)
->setMtoOperExoneradas(15)
->setMtoIGV(3.6);
->setMtoIGV(3.6)
->setPorcentajeIgv(18.0);

$detiail2 = new SummaryDetail();
$detiail2->setTipoDoc('03')
Expand All @@ -371,6 +372,7 @@ protected function getSummary()
->setMtoOperInafectas(20)
->setMtoOtrosCargos(10)
->setMtoIGV(42.12)
->setPorcentajeIgv(18.0)
->setMtoISC(34);

$sum = new Summary();
Expand Down
3 changes: 3 additions & 0 deletions packages/xml/src/Xml/Templates/summary.xml.twig
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@
<cac:TaxSubtotal>
<cbc:TaxAmount currencyID="{{ doc.moneda }}">{{ igv }}</cbc:TaxAmount>
<cac:TaxCategory>
{% if det.porcentajeIgv is not null %}
<cbc:Percent>{{ det.porcentajeIgv|n_format }}</cbc:Percent>
{% endif %}
<cac:TaxScheme>
<cbc:ID>1000</cbc:ID>
<cbc:Name>IGV</cbc:Name>
Expand Down