-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDpsData.php
More file actions
79 lines (56 loc) · 2.45 KB
/
DpsData.php
File metadata and controls
79 lines (56 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
// SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
// SPDX-License-Identifier: AGPL-3.0-or-later
declare(strict_types=1);
namespace LibreCodeCoop\NfsePHP\Dto;
/**
* Documento Padrão de Serviço — the payload submitted to the SEFIN gateway.
*
* All monetary values are in BRL, represented as strings to avoid floating-point issues.
*/
final readonly class DpsData
{
public function __construct(
/** CNPJ do prestador de serviço (only digits, 14 chars). */
public string $cnpjPrestador,
/** Código IBGE do município do prestador (7 digits). */
public string $municipioIbge,
/** Item da lista de serviços — LC 116/2003. */
public string $itemListaServico,
/** Valor total do serviço em reais (e.g. "1500.00"). */
public string $valorServico,
/** Alíquota do ISS em percentual (e.g. "5.00"). */
public string $aliquota,
/** Descrição do serviço prestado. */
public string $discriminacao,
/** Tipo de ambiente (1-Produção | 2-Homologação). */
public int $tipoAmbiente = 2,
/** Application version string written into the DPS. */
public string $versaoAplicativo = 'akaunting-nfse',
/** Série do DPS (1-5 digits). */
public string $serie = '00001',
/** Número sequencial do DPS. */
public string $numeroDps = '1',
/** Competence date in YYYY-MM-DD format. Defaults to emission date when null. */
public ?string $dataCompetencia = null,
/** Tipo de emissão do DPS. */
public int $tipoEmissao = 1,
/** Código de tributação nacional do serviço (6 digits). */
public string $codigoTributacaoNacional = '000000',
/** CNPJ ou CPF do tomador (only digits, 11 or 14 chars). Empty string for foreign. */
public string $documentoTomador = '',
/** Nome / Razão Social do tomador. */
public string $nomeTomador = '',
/** Whether the provider opts into Simples Nacional. */
public int $opcaoSimplesNacional = 1,
/** Regime especial de tributação. */
public int $regimeEspecialTributacao = 0,
/** Tipo de retenção do ISSQN. */
public int $tipoRetencaoIss = 1,
/** Indicador de tributação total. */
public int $indicadorTributacao = 0,
/** Whether ISS is retained at source. */
public bool $issRetido = false,
) {
}
}