Skip to content

Commit

Permalink
Merge pull request #206 from thegreenter/guia-2022
Browse files Browse the repository at this point in the history
Guia de Remisión 2022 (XML)
  • Loading branch information
giansalex authored Dec 23, 2022
2 parents 96558ee + a73cd4a commit f5c2be4
Show file tree
Hide file tree
Showing 18 changed files with 1,225 additions and 11 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
Los cambios notables de cada lanzamiento serán documentados en este archivo.

## Unreleased
- #206 Agregar xml para nueva Guia de Remisión.

## 4.3.4 - 2022-11-21

- #200 Agregar campos faltantes a Nota de Debito
- #204 Soporte para symfony 6

## 4.3.3 - 2022-07-19
- #199 Corrección descuento código 05
- #197 Phpstan v1

## 4.3.1 - 2021-06-04
- #175 Inclusión de tag `<Signature>` en guía remisión.

## 4.3.1 - 2021-03-20
Expand Down
107 changes: 107 additions & 0 deletions packages/core/src/Core/Model/Despatch/AdditionalDoc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<?php

declare(strict_types=1);

namespace Greenter\Model\Despatch;

/**
* Class AdditionalDoc.
*/
class AdditionalDoc
{
/**
* Tipo de documento (Descripción)
*
* @var string
*/
private $tipoDesc;

/**
* @var string
*/
private $tipo;

/**
* @var string
*/
private $nro;

/**
* RUC Emisor
*
* @var string
*/
private $emisor;

/**
* @return string
*/
public function getTipoDesc(): ?string
{
return $this->tipoDesc;
}

/**
* @param string|null $tipoDesc
* @return AdditionalDoc
*/
public function setTipoDesc(?string $tipoDesc): AdditionalDoc
{
$this->tipoDesc = $tipoDesc;
return $this;
}

/**
* @return string
*/
public function getTipo(): ?string
{
return $this->tipo;
}

/**
* @param string|null $tipo
* @return AdditionalDoc
*/
public function setTipo(?string $tipo): AdditionalDoc
{
$this->tipo = $tipo;
return $this;
}

/**
* @return string
*/
public function getNro(): string
{
return $this->nro;
}

/**
* @param string|null $nro
* @return AdditionalDoc
*/
public function setNro(?string $nro): AdditionalDoc
{
$this->nro = $nro;
return $this;
}

/**
* @return string
*/
public function getEmisor(): ?string
{
return $this->emisor;
}

/**
* @param string|null $emisor
* @return AdditionalDoc
*/
public function setEmisor(?string $emisor): AdditionalDoc
{
$this->emisor = $emisor;
return $this;
}
}
78 changes: 77 additions & 1 deletion packages/core/src/Core/Model/Despatch/Despatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
*/
class Despatch implements DocumentInterface
{
/**
* @var string
*/
private $version;

/**
* @var string
*/
Expand Down Expand Up @@ -57,6 +62,12 @@ class Despatch implements DocumentInterface
* @var Client
*/
private $tercero;
/**
* Datos del Comprador.
*
* @var Client
*/
private $comprador;
/**
* @var Shipment
*/
Expand All @@ -69,11 +80,33 @@ class Despatch implements DocumentInterface
* @var Document
*/
private $relDoc;
/**
* @var AdditionalDoc[]
*/
private $addDocs;
/**
* @var DespatchDetail[]
*/
private $details;

/**
* @return string
*/
public function getVersion(): ?string
{
return $this->version;
}

/**
* @param string|null $version
* @return Despatch
*/
public function setVersion(?string $version): Despatch
{
$this->version = $version;
return $this;
}

/**
* @return string
*/
Expand Down Expand Up @@ -223,7 +256,7 @@ public function getTercero(): ?Client
}

/**
* @param Client $tercero
* @param Client|null $tercero
*
* @return Despatch
*/
Expand All @@ -234,6 +267,26 @@ public function setTercero(?Client $tercero): Despatch
return $this;
}

/**
* @return Client
*/
public function getComprador(): ?Client
{
return $this->comprador;
}

/**
* @param Client|null $comprador
*
* @return Despatch
*/
public function setComprador(?Client $comprador): Despatch
{
$this->comprador = $comprador;

return $this;
}

/**
* @return Shipment
*/
Expand Down Expand Up @@ -263,6 +316,8 @@ public function getDocBaja(): ?Document
}

/**
* @deprecated unused
*
* @param Document $docBaja
*
* @return Despatch
Expand All @@ -283,6 +338,8 @@ public function getRelDoc(): ?Document
}

/**
* @deprecated use setAddDocs
*
* @param Document $relDoc
*
* @return Despatch
Expand All @@ -294,6 +351,25 @@ public function setRelDoc(?Document $relDoc): Despatch
return $this;
}

/**
* @return AdditionalDoc[]
*/
public function getAddDocs(): ?array
{
return $this->addDocs;
}

/**
* @param AdditionalDoc[] $addDocs
* @return Despatch
*/
public function setAddDocs(?array $addDocs): Despatch
{
$this->addDocs = $addDocs;

return $this;
}

/**
* @return DespatchDetail[]
*/
Expand Down
25 changes: 25 additions & 0 deletions packages/core/src/Core/Model/Despatch/DespatchDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

namespace Greenter\Model\Despatch;

use Greenter\Model\Sale\DetailAttribute;

/**
* Class DespatchDetail.
*/
Expand Down Expand Up @@ -38,6 +40,11 @@ class DespatchDetail
*/
private $codProdSunat;

/**
* @var DetailAttribute[]
*/
private $atributos;

/**
* @return string
*/
Expand Down Expand Up @@ -137,4 +144,22 @@ public function setCodProdSunat(?string $codProdSunat): DespatchDetail

return $this;
}

/**
* @return DetailAttribute[]
*/
public function getAtributos(): ?array
{
return $this->atributos;
}

/**
* @param DetailAttribute[] $atributos
* @return DespatchDetail
*/
public function setAtributos(?array $atributos): DespatchDetail
{
$this->atributos = $atributos;
return $this;
}
}
48 changes: 48 additions & 0 deletions packages/core/src/Core/Model/Despatch/Direction.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ class Direction
*/
private $direccion;

/**
* Código de establecimiento de punto de llegada.
*
* @var string
*/
private $codLocal;
/**
* Número de RUC asociado al punto de llegada.
*
* @var string
*/
private $ruc;
/**
* Direction constructor.
*
Expand Down Expand Up @@ -78,4 +90,40 @@ public function setDireccion(?string $direccion): Direction

return $this;
}

/**
* @return string
*/
public function getCodLocal(): ?string
{
return $this->codLocal;
}

/**
* @param string|null $codLocal
* @return Direction
*/
public function setCodLocal(?string $codLocal): Direction
{
$this->codLocal = $codLocal;
return $this;
}

/**
* @return string
*/
public function getRuc(): ?string
{
return $this->ruc;
}

/**
* @param string|null $ruc
* @return Direction
*/
public function setRuc(?string $ruc): Direction
{
$this->ruc = $ruc;
return $this;
}
}
Loading

0 comments on commit f5c2be4

Please sign in to comment.