Skip to content

Commit b58d7e9

Browse files
authored
Changed/some new enum values realed to arca afip (#50)
1 parent bb8a684 commit b58d7e9

File tree

5 files changed

+75
-14
lines changed

5 files changed

+75
-14
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [2.0.10] - 2025-01-18
10+
### Added
11+
- Some enums changed based on AFIP/ARCA.
12+
913
## [2.0.9] - 2022-08-27
1014
### Fixed
1115
- empty exception on Wsfe.php:515 [#48](https://github.com/multinexo/php-afip-ws/issues/48)

src/Objects/AssociatedDocumentObject.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
namespace Multinexo\Objects;
1212

13+
/**
14+
* @see https://github.com/AfipSDK/afip.php/issues/82#issuecomment-819823603
15+
*/
1316
class AssociatedDocumentObject
1417
{
1518
/** @var int */
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?php
2+
/**
3+
* Copyright (C) 1997-2020 Reyesoft <[email protected]>.
4+
*
5+
* This file is part of php-afip-ws. php-afip-ws can not be copied and/or
6+
* distributed without the express permission of Reyesoft
7+
*/
8+
9+
declare(strict_types=1);
10+
11+
namespace Multinexo\Objects\Documents;
12+
13+
/**
14+
* @see https://www.afip.gob.ar/canasta-alimentaria/documentos/tipos-de-comprobantes-de-ventas.pdf
15+
*/
16+
class TipoComprobanteEnum
17+
{
18+
public const FACTURA_A = 1;
19+
public const NOTA_DEBITO_A = 2;
20+
public const NOTA_CREDITO_A = 3;
21+
public const RECIBO_A = 4;
22+
public const NOTA_VENTA_AL_CONTADO_A = 5;
23+
public const FACTURA_B = 6;
24+
public const NOTA_DEBITO_B = 7;
25+
public const NOTA_CREDITO_B = 8;
26+
public const RECIBO_B = 9;
27+
public const NOTA_VENTA_AL_CONTADO_B = 10;
28+
public const FACTURA_C = 11;
29+
public const NOTA_DEBITO_C = 12;
30+
public const NOTA_CREDITO_C = 13;
31+
32+
/** @deprecated was changed by afip? */
33+
public const CIERRE_Z = 58;
34+
/** @deprecated was changed by afip? */
35+
public const REMITO_R = 69;
36+
/** @deprecated was changed by afip? */
37+
public const PRESUPUESTO = 81;
38+
/** @deprecated was changed by afip? */
39+
public const REMITO_STOCK = 82;
40+
/** @deprecated was changed by afip? */
41+
public const DOCUMENT_NO_FISCAL = 83;
42+
/** @deprecated was changed by afip? */
43+
public const FACTURA_DE_EXPORTACION = 17;
44+
}

src/Objects/DocumentObject.php renamed to src/Objects/FiscalDocumentDto.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010

1111
namespace Multinexo\Objects;
1212

13-
class DocumentObject
13+
abstract class FiscalDocumentDto
1414
{
1515
}

src/Objects/InvoiceObject.php

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,34 @@
1111
namespace Multinexo\Objects;
1212

1313
/**
14-
* @property int $puntoVenta
15-
* @property int $codigoComprobante
16-
* @property int $codigoConcepto
17-
* @property int $codigoDocumento
18-
* @property int $numeroDocumento
19-
* @property string $fechaEmision Format Y-m-d
20-
* @property float $importeTotal
21-
* @property float $importeNoGravado
22-
* @property int $importeExento
23-
* @property float $importeIVA
24-
* @property string|null $codigoTipoAutorizacion
25-
* ONLY READ PROPERTIES
14+
* ONLY READ PROPERTIES.
15+
*
2616
* @property \stdClass $FeDetReq
2717
* @property \stdClass $otroTributo
2818
* @SuppressWarnings(PHPMD.TooManyFields)
2919
*/
30-
class InvoiceObject extends DocumentObject
20+
class InvoiceObject extends FiscalDocumentDto
3121
{
22+
/** @var ?int */
23+
public $puntoVenta;
24+
/** @var ?int */
25+
public $codigoComprobante;
26+
/** @var ?int */
27+
public $codigoDocumento;
28+
/** @var ?int */
29+
public $numeroDocumento;
30+
/** @var ?string */
31+
public $fechaEmision; // Format Y-m-d
32+
/** @var ?float */
33+
public $importeTotal;
34+
/** @var ?float */
35+
public $importeNoGravado;
36+
/** @var ?float */
37+
public $importeExento;
38+
/** @var ?float */
39+
public $importeIVA;
40+
/** @var ?string */
41+
public $codigoTipoAutorizacion;
3242
/** @var int */
3343
public $cantidadRegistros = 1;
3444
/** @var int|null */

0 commit comments

Comments
 (0)