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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.0.10] - 2025-01-18
### Added
- Some enums changed based on AFIP/ARCA.

## [2.0.9] - 2022-08-27
### Fixed
- empty exception on Wsfe.php:515 [#48](https://github.com/multinexo/php-afip-ws/issues/48)
Expand Down
3 changes: 3 additions & 0 deletions src/Objects/AssociatedDocumentObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

namespace Multinexo\Objects;

/**
* @see https://github.com/AfipSDK/afip.php/issues/82#issuecomment-819823603
*/
class AssociatedDocumentObject
{
/** @var int */
Expand Down
44 changes: 44 additions & 0 deletions src/Objects/Documents/TipoComprobanteEnum.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php
/**
* Copyright (C) 1997-2020 Reyesoft <[email protected]>.
*
* This file is part of php-afip-ws. php-afip-ws can not be copied and/or
* distributed without the express permission of Reyesoft
*/

declare(strict_types=1);

namespace Multinexo\Objects\Documents;

/**
* @see https://www.afip.gob.ar/canasta-alimentaria/documentos/tipos-de-comprobantes-de-ventas.pdf
*/
class TipoComprobanteEnum
{
public const FACTURA_A = 1;
public const NOTA_DEBITO_A = 2;
public const NOTA_CREDITO_A = 3;
public const RECIBO_A = 4;
public const NOTA_VENTA_AL_CONTADO_A = 5;
public const FACTURA_B = 6;
public const NOTA_DEBITO_B = 7;
public const NOTA_CREDITO_B = 8;
public const RECIBO_B = 9;
public const NOTA_VENTA_AL_CONTADO_B = 10;
public const FACTURA_C = 11;
public const NOTA_DEBITO_C = 12;
public const NOTA_CREDITO_C = 13;

/** @deprecated was changed by afip? */
public const CIERRE_Z = 58;
/** @deprecated was changed by afip? */
public const REMITO_R = 69;
/** @deprecated was changed by afip? */
public const PRESUPUESTO = 81;
/** @deprecated was changed by afip? */
public const REMITO_STOCK = 82;
/** @deprecated was changed by afip? */
public const DOCUMENT_NO_FISCAL = 83;
/** @deprecated was changed by afip? */
public const FACTURA_DE_EXPORTACION = 17;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@

namespace Multinexo\Objects;

class DocumentObject
abstract class FiscalDocumentDto
{
}
36 changes: 23 additions & 13 deletions src/Objects/InvoiceObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,34 @@
namespace Multinexo\Objects;

/**
* @property int $puntoVenta
* @property int $codigoComprobante
* @property int $codigoConcepto
* @property int $codigoDocumento
* @property int $numeroDocumento
* @property string $fechaEmision Format Y-m-d
* @property float $importeTotal
* @property float $importeNoGravado
* @property int $importeExento
* @property float $importeIVA
* @property string|null $codigoTipoAutorizacion
* ONLY READ PROPERTIES
* ONLY READ PROPERTIES.
*
* @property \stdClass $FeDetReq
* @property \stdClass $otroTributo
* @SuppressWarnings(PHPMD.TooManyFields)
*/
class InvoiceObject extends DocumentObject
class InvoiceObject extends FiscalDocumentDto
{
/** @var ?int */
public $puntoVenta;
/** @var ?int */
public $codigoComprobante;
/** @var ?int */
public $codigoDocumento;
/** @var ?int */
public $numeroDocumento;
/** @var ?string */
public $fechaEmision; // Format Y-m-d
/** @var ?float */
public $importeTotal;
/** @var ?float */
public $importeNoGravado;
/** @var ?float */
public $importeExento;
/** @var ?float */
public $importeIVA;
/** @var ?string */
public $codigoTipoAutorizacion;
/** @var int */
public $cantidadRegistros = 1;
/** @var int|null */
Expand Down
Loading