Skip to content

Commit

Permalink
Merge pull request #17 from giansalex/ICBPER
Browse files Browse the repository at this point in the history
Suporte para ICBPER
  • Loading branch information
giansalex authored Aug 4, 2019
2 parents 3818503 + 60428af commit e38fe19
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 4 deletions.
46 changes: 42 additions & 4 deletions src/Core/Model/Sale/BaseSale.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

namespace Greenter\Model\Sale;

use DateTimeInterface;
use Greenter\Model\Client\Client;
use Greenter\Model\Company\Company;
use Greenter\Model\DocumentInterface;
Expand Down Expand Up @@ -38,7 +39,7 @@ class BaseSale implements DocumentInterface
protected $correlativo;

/**
* @var \DateTimeInterface
* @var DateTimeInterface
*/
protected $fechaEmision;

Expand Down Expand Up @@ -107,6 +108,11 @@ class BaseSale implements DocumentInterface
*/
protected $mtoOtrosTributos;

/**
* @var float
*/
protected $icbper;

/**
* @var float
*/
Expand Down Expand Up @@ -209,19 +215,19 @@ public function setCorrelativo($correlativo)
}

/**
* @return \DateTimeInterface
* @return DateTimeInterface
*/
public function getFechaEmision()
{
return $this->fechaEmision;
}

/**
* @param \DateTimeInterface $fechaEmision
* @param DateTimeInterface $fechaEmision
*
* @return $this
*/
public function setFechaEmision(\DateTimeInterface $fechaEmision)
public function setFechaEmision(DateTimeInterface $fechaEmision)
{
$this->fechaEmision = $fechaEmision;

Expand Down Expand Up @@ -378,11 +384,13 @@ public function getMtoOperExportacion()

/**
* @param float $mtoOperExportacion
*
* @return $this
*/
public function setMtoOperExportacion($mtoOperExportacion)
{
$this->mtoOperExportacion = $mtoOperExportacion;

return $this;
}

Expand Down Expand Up @@ -446,6 +454,26 @@ public function setMtoOtrosTributos($mtoOtrosTributos)
return $this;
}

/**
* @return float
*/
public function getIcbper()
{
return $this->icbper;
}

/**
* @param float $icbper
*
* @return $this
*/
public function setIcbper($icbper)
{
$this->icbper = $icbper;

return $this;
}

/**
* @return float
*/
Expand Down Expand Up @@ -516,11 +544,13 @@ public function getGuias()

/**
* @param Document[] $guias
*
* @return $this
*/
public function setGuias($guias)
{
$this->guias = $guias;

return $this;
}

Expand Down Expand Up @@ -576,11 +606,13 @@ public function getMtoBaseIsc()
* Set Monto Base ISC.
*
* @param float $mtoBaseIsc
*
* @return $this
*/
public function setMtoBaseIsc($mtoBaseIsc)
{
$this->mtoBaseIsc = $mtoBaseIsc;

return $this;
}

Expand All @@ -596,11 +628,13 @@ public function getMtoBaseOth()
* Set Monto base otros tributos.
*
* @param float $mtoBaseOth
*
* @return $this
*/
public function setMtoBaseOth($mtoBaseOth)
{
$this->mtoBaseOth = $mtoBaseOth;

return $this;
}

Expand All @@ -614,11 +648,13 @@ public function getTotalImpuestos()

/**
* @param float $totalImpuestos
*
* @return $this
*/
public function setTotalImpuestos($totalImpuestos)
{
$this->totalImpuestos = $totalImpuestos;

return $this;
}

Expand All @@ -632,11 +668,13 @@ public function getUblVersion()

/**
* @param string $ublVersion
*
* @return $this
*/
public function setUblVersion($ublVersion)
{
$this->ublVersion = $ublVersion;

return $this;
}

Expand Down
73 changes: 73 additions & 0 deletions src/Core/Model/Sale/SaleDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ class SaleDetail
* @var float
*/
private $otroTributo;
/**
* @var float
*/
private $icbper;
/**
* @var float
*/
private $factorIcbper = 0.10;
/**
* @var float
*/
Expand Down Expand Up @@ -244,11 +252,13 @@ public function getCodProdGS1()

/**
* @param string $codProdGS1
*
* @return SaleDetail
*/
public function setCodProdGS1($codProdGS1)
{
$this->codProdGS1 = $codProdGS1;

return $this;
}

Expand Down Expand Up @@ -302,6 +312,7 @@ public function getDescuento()

/**
* @deprecated UBL 2.1
*
* @param float $descuento
*
* @return SaleDetail
Expand Down Expand Up @@ -403,11 +414,53 @@ public function getTotalImpuestos()

/**
* @param float $totalImpuestos
*
* @return SaleDetail
*/
public function setTotalImpuestos($totalImpuestos)
{
$this->totalImpuestos = $totalImpuestos;

return $this;
}

/**
* @return float
*/
public function getIcbper()
{
return $this->icbper;
}

/**
* @param float $icbper
*
* @return SaleDetail
*/
public function setIcbper($icbper)
{
$this->icbper = $icbper;

return $this;
}

/**
* @return float
*/
public function getFactorIcbper()
{
return $this->factorIcbper;
}

/**
* @param float $factorIcbper
*
* @return SaleDetail
*/
public function setFactorIcbper($factorIcbper)
{
$this->factorIcbper = $factorIcbper;

return $this;
}

Expand Down Expand Up @@ -481,11 +534,13 @@ public function getMtoBaseIgv()

/**
* @param float $mtoBaseIgv
*
* @return SaleDetail
*/
public function setMtoBaseIgv($mtoBaseIgv)
{
$this->mtoBaseIgv = $mtoBaseIgv;

return $this;
}

Expand All @@ -499,11 +554,13 @@ public function getPorcentajeIgv()

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

return $this;
}

Expand All @@ -517,11 +574,13 @@ public function getMtoBaseIsc()

/**
* @param float $mtoBaseIsc
*
* @return SaleDetail
*/
public function setMtoBaseIsc($mtoBaseIsc)
{
$this->mtoBaseIsc = $mtoBaseIsc;

return $this;
}

Expand All @@ -535,11 +594,13 @@ public function getPorcentajeIsc()

/**
* @param float $porcentajeIsc
*
* @return SaleDetail
*/
public function setPorcentajeIsc($porcentajeIsc)
{
$this->porcentajeIsc = $porcentajeIsc;

return $this;
}

Expand All @@ -553,11 +614,13 @@ public function getMtoBaseOth()

/**
* @param float $mtoBaseOth
*
* @return SaleDetail
*/
public function setMtoBaseOth($mtoBaseOth)
{
$this->mtoBaseOth = $mtoBaseOth;

return $this;
}

Expand All @@ -571,11 +634,13 @@ public function getPorcentajeOth()

/**
* @param float $porcentajeOth
*
* @return SaleDetail
*/
public function setPorcentajeOth($porcentajeOth)
{
$this->porcentajeOth = $porcentajeOth;

return $this;
}

Expand All @@ -589,11 +654,13 @@ public function getOtroTributo()

/**
* @param float $otroTributo
*
* @return SaleDetail
*/
public function setOtroTributo($otroTributo)
{
$this->otroTributo = $otroTributo;

return $this;
}

Expand All @@ -607,11 +674,13 @@ public function getCargos()

/**
* @param Charge[] $cargos
*
* @return SaleDetail
*/
public function setCargos($cargos)
{
$this->cargos = $cargos;

return $this;
}

Expand All @@ -625,11 +694,13 @@ public function getDescuentos()

/**
* @param Charge[] $descuentos
*
* @return SaleDetail
*/
public function setDescuentos($descuentos)
{
$this->descuentos = $descuentos;

return $this;
}

Expand All @@ -643,11 +714,13 @@ public function getAtributos()

/**
* @param DetailAttribute[] $atributos
*
* @return SaleDetail
*/
public function setAtributos($atributos)
{
$this->atributos = $atributos;

return $this;
}
}

0 comments on commit e38fe19

Please sign in to comment.