feat: implementando reforma tributária#42
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements support for IBS (Imposto sobre Bens e Serviços) and CBS (Contribuição sobre Bens e Serviços) tax calculations according to Brazil's Tax Reform (LC 214/2025). The implementation includes calculation logic, interfaces, test coverage, and adds support for .NET 8.0 target framework.
- Adds IBS and CBS tax calculation classes following the Tax Reform LC 214/2025 specifications
- Implements shared base calculation logic that deducts PIS, COFINS, ICMS, and ISSQN from the calculation base
- Extends the test suite with comprehensive test cases covering various scenarios (basic calculations, discounts, freight, insurance, etc.)
- Adds .NET 8.0 as a target framework for both the main library and test projects
- Updates CI/CD workflow to test on both .NET 6.0 and .NET 8.0
Reviewed Changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/MotorTributarioNet/MotorTributarioNet.csproj | Adds net8.0 as a target framework alongside existing frameworks |
| src/TestesUnitarios/TestesUnitarios.csproj | Adds net8.0 as a target framework for test projects |
| src/TestesUnitarios/Entidade/Produto.cs | Adds three new properties for IBS and CBS percentages to the test entity |
| src/MotorTributarioNet/Impostos/ITributavel.cs | Adds interface properties for IBS UF, IBS Municipal, and CBS percentages |
| src/MotorTributarioNet/Impostos/IResultadoCalculoIbs.cs | Defines the interface for IBS calculation results |
| src/MotorTributarioNet/Impostos/IResultadoCalculoCbs.cs | Defines the interface for CBS calculation results |
| src/MotorTributarioNet/Impostos/Implementacoes/ResultadoCalculoIbs.cs | Implements IBS calculation result with base calculation and value properties |
| src/MotorTributarioNet/Impostos/Implementacoes/ResultadoCalculoCbs.cs | Implements CBS calculation result with base calculation and value properties |
| src/MotorTributarioNet/Impostos/Tributacoes/TributacaoIbs.cs | Implements IBS tax calculation logic combining UF and Municipal components |
| src/MotorTributarioNet/Impostos/Tributacoes/TributacaoCbs.cs | Implements CBS tax calculation logic |
| src/MotorTributarioNet/Impostos/CalulosDeBC/CalculaBaseCalculoIbsCbs.cs | Implements shared base calculation for IBS/CBS, deducting PIS, COFINS, ICMS, and ISSQN |
| src/MotorTributarioNet/Facade/FacadeCalculadoraTributacao.cs | Adds CalculaIbs() and CalculaCbs() methods to the tax calculation facade |
| src/TestesUnitarios/CalculoIbsTest.cs | Comprehensive test suite for IBS calculations covering 8 different scenarios |
| src/TestesUnitarios/CalculoCbsTest.cs | Comprehensive test suite for CBS calculations covering 9 different scenarios |
| .github/workflows/executar-testes.yml | Updates CI workflow to setup and test on both .NET 6.0 and .NET 8.0 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/MotorTributarioNet/Impostos/CalulosDeBC/CalculaBaseCalculoIbsCbs.cs
Outdated
Show resolved
Hide resolved
src/MotorTributarioNet/Impostos/CalulosDeBC/CalculaBaseCalculoIbsCbs.cs
Outdated
Show resolved
Hide resolved
src/MotorTributarioNet/Impostos/CalulosDeBC/CalculaBaseCalculoIbsCbs.cs
Outdated
Show resolved
Hide resolved
src/MotorTributarioNet/Impostos/CalulosDeBC/CalculaBaseCalculoIbsCbs.cs
Outdated
Show resolved
Hide resolved
|
@robertorp I've opened a new pull request, #43, to work on those changes. Once the pull request is ready, I'll request review from you. |
…base Co-authored-by: robertorp <10251705+robertorp@users.noreply.github.com>
|
@robertorp I've opened a new pull request, #44, to work on those changes. Once the pull request is ready, I'll request review from you. |
Refactor ISSQN calculation to use TributacaoIssqn class for consistency
…eforma Tributária LC 214/2025
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 19 out of 20 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/MotorTributarioNet/Impostos/CalulosDeBC/CalculaBaseCalculoIbsCbs.cs
Outdated
Show resolved
Hide resolved
|
@robertorp I've opened a new pull request, #45, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: robertorp <10251705+robertorp@users.noreply.github.com>
Co-authored-by: robertorp <10251705+robertorp@users.noreply.github.com>
Remove all try-catch blocks from CalculaBaseCalculoIbsCbs
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 19 out of 20 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.