Ajusta tipos de célula e adiciona cálculos na planilha#44
Closed
albertomandlate wants to merge 2 commits intomainfrom
Closed
Ajusta tipos de célula e adiciona cálculos na planilha#44albertomandlate wants to merge 2 commits intomainfrom
albertomandlate wants to merge 2 commits intomainfrom
Conversation
Modifica o tipo de célula para várias colunas, assegurando que os dados sejam tratados corretamente como numéricos ou strings. Substitui linhas removidas por novas definições de tipo de célula. Adiciona cálculos para valores relacionados a impostos e totais, melhorando a precisão e clareza dos dados na planilha gerada.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR explicitly sets Excel cell types for various columns and integrates numeric calculations for tax, totals, and exchange rates to improve data accuracy in the generated spreadsheet.
- Explicitly assigns
CellType.NumericorCellType.Stringwhen creating key cells. - Converts and populates numeric values for tax payable, net total, settlement amount, gross total, and payments.
- Introduces a new cell (23) intended for tax percentage, plus formatted currency code and exchange rate cells.
Comments suppressed due to low confidence (1)
src/SAF-T.Mozambique/Generators/MozambiqueSaftGenerator.cs:344
- [nitpick] The new cell for tax percentage (cell 23) and its associated calculation aren’t covered by existing tests; consider adding unit or integration tests to verify its value and numeric formatting.
row.CreateCell(23).SetCellType(CellType.Numeric);
| row.CreateCell(27).SetCellValue(Convert.ToDouble(factura.DocumentTotals?.GrossTotal ?? 0m)); | ||
| row.CreateCell(28).SetCellValue(auditFile.Header?.CurrencyCode ?? string.Empty); | ||
| row.CreateCell(29).SetCellValue(taxaCambio); | ||
| row.CreateCell(23).SetCellType(CellType.Numeric); |
There was a problem hiding this comment.
Cell 23 is set to numeric type but no value is assigned. You likely intended to call SetCellValue here using the computed 'impostos' variable.
Muito bem observado Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
Author
|
Necessita de mais algumas modificações relaccionadas ao tipo de campo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Modifica o tipo de célula para várias colunas, assegurando que os dados sejam tratados corretamente como numéricos ou strings. Substitui linhas removidas por novas definições de tipo de célula. Adiciona cálculos para valores relacionados a impostos e totais, melhorando a precisão e clareza dos dados na planilha gerada.