Commit c3562b5
authored
feat: add federal taxation fields to DpsData and XmlBuilder (#13)
* feat(dto): add federal piscofins irrf csll cp properties to DpsData
Add 10 optional string properties for federal taxation:
- federalPiscofinsSituacaoTributaria (CST)
- federalPiscofinsTipoRetencao
- federalPiscofinsBaseCalculo
- federalPiscofinsAliquotaPis / federalPiscofinsValorPis
- federalPiscofinsAliquotaCofins / federalPiscofinsValorCofins
- federalValorIrrf, federalValorCsll, federalValorCp
All default to empty string to preserve backward compatibility.
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
* feat(xml): serialize tribFed block when federal taxation data is present
Add buildTribFederal() and hasFederalTaxationData() private methods to
XmlBuilder. The tribFed XML element is appended to totTrib when any of
the federal properties on DpsData are non-empty, following the NFS-e
Nacional schema (tiDPS v1.00).
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
* test(xml): cover tribFed serialization in XmlBuilderTest
Add testBuildDpsIncludesFederalTaxationBlockWhenConfigured verifying
that tribFed XML element with all expected child nodes is emitted when
federal DpsData fields are populated.
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
---------
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>1 parent dc7e74e commit c3562b5
File tree
3 files changed
+128
-0
lines changed- src
- Dto
- Xml
- tests/Unit/Xml
3 files changed
+128
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
77 | 107 | | |
78 | 108 | | |
79 | 109 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
104 | 108 | | |
105 | 109 | | |
106 | 110 | | |
| |||
133 | 137 | | |
134 | 138 | | |
135 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
136 | 184 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
198 | 228 | | |
199 | 229 | | |
200 | 230 | | |
| |||
261 | 291 | | |
262 | 292 | | |
263 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
264 | 304 | | |
265 | 305 | | |
266 | 306 | | |
| |||
279 | 319 | | |
280 | 320 | | |
281 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
282 | 332 | | |
283 | 333 | | |
284 | 334 | | |
0 commit comments