Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][FIX] l10n_br_account/l10n_br_fiscal: amount total,amount_price_gross when has tax withholding and IPI #3016

Conversation

marcelsavegnago
Copy link
Sponsor Member

@marcelsavegnago marcelsavegnago commented Apr 16, 2024

Correção/Ajustes dos calculos do valor total e do preço bruto preço bruto quando tem imposto retido. inclusive isso ja resolve o total de um pedido de compra com imposto retido subtrindo este o mesmo do montante.

Situação Atual:

Pedido de Compra:

image

Fatura (Operação Fiscal - NÃO Dedutível)

image

Linhas do Lançamento Contábil da Fatura (Operação Fiscal - NÃO Dedutível)

image

Fatura (Operação Fiscal - Imposto Dedutível)

image

Linhas do Lançamento Contábil da Fatura (Operação Fiscal - Imposto Dedutível)

image

Com os Ajustes desta PR:

Pedido de Compra:

image

Fatura (Operação Fiscal - NÃO Dedutível)

image

Linhas do Lançamento Contábil da Fatura (Operação Fiscal - NÃO Dedutível)

image

Fatura (Operação Fiscal - Imposto Dedutível)

image

Linhas do Lançamento Contábil da Fatura (Operação Fiscal - Imposto Dedutível)

image

@OCA-git-bot
Copy link
Contributor

Hi @rvalyi, @renatonlima,
some modules you are maintaining are being modified, check this out!

@marcelsavegnago marcelsavegnago force-pushed the 14.0-l10n_br_account-fix-amount-when-tax-withholding branch from c9e00aa to 903225b Compare April 16, 2024 17:33
@marcelsavegnago marcelsavegnago changed the title [14.0][FIX] l10n_br_account/l10n_br_fiscal: amount total when has tax withholding [14.0][FIX] l10n_br_account/l10n_br_fiscal: amount total,amount_price_gross when has tax withholding and IPI Apr 17, 2024
@marcelsavegnago marcelsavegnago force-pushed the 14.0-l10n_br_account-fix-amount-when-tax-withholding branch from c42575a to d1dcab1 Compare April 17, 2024 12:13
@marcelsavegnago marcelsavegnago marked this pull request as ready for review April 17, 2024 12:27
@marcelsavegnago marcelsavegnago force-pushed the 14.0-l10n_br_account-fix-amount-when-tax-withholding branch 9 times, most recently from 3162e58 to f776859 Compare April 17, 2024 18:41
@marcelsavegnago marcelsavegnago marked this pull request as draft April 17, 2024 19:12
@marcelsavegnago marcelsavegnago force-pushed the 14.0-l10n_br_account-fix-amount-when-tax-withholding branch 2 times, most recently from 38cf21f to fc99b1a Compare April 17, 2024 19:42
@marcelsavegnago marcelsavegnago marked this pull request as ready for review April 17, 2024 22:04
@marcelsavegnago
Copy link
Sponsor Member Author

PR verdinha com o runboat rodando agora. Por ora, deixei varios commits nesta PR para facilitar os testes mas podemos distribuir em outras PRs apesar da dependencia entre eles.

@marcelsavegnago
Copy link
Sponsor Member Author

marcelsavegnago commented Apr 19, 2024

@renatonlima, @rvalyi, @mbcosta, @mileo, @douglascstd, @antoniospneto, adicionei alguns prints na descrição do Pull Request para ilustrar melhor a questão. Inicialmente, notei que, no caso de operações fiscais não dedutíveis, o valor total a pagar da fatura estava incorreto. No entanto, decidi expandir a análise, observando que nem nos pedidos de compra nem nos de venda o imposto retido está sendo deduzido do total. Estou aberto a dúvidas, críticas ou sugestões que possam aprimorar nosso trabalho.

@marcelsavegnago
Copy link
Sponsor Member Author

Já movi alguns commits daqui para outras PRs:

#3019
#3020
#3021

@marcelsavegnago marcelsavegnago force-pushed the 14.0-l10n_br_account-fix-amount-when-tax-withholding branch from fc99b1a to a9cfe67 Compare April 19, 2024 14:15
@marcelsavegnago marcelsavegnago force-pushed the 14.0-l10n_br_account-fix-amount-when-tax-withholding branch from a9cfe67 to 537c26b Compare May 8, 2024 17:02
@marcelsavegnago marcelsavegnago force-pushed the 14.0-l10n_br_account-fix-amount-when-tax-withholding branch from 537c26b to bc8f55d Compare May 17, 2024 12:29
@marcelsavegnago marcelsavegnago force-pushed the 14.0-l10n_br_account-fix-amount-when-tax-withholding branch 2 times, most recently from 603ee41 to 8397f47 Compare May 20, 2024 15:49
@marcelsavegnago marcelsavegnago force-pushed the 14.0-l10n_br_account-fix-amount-when-tax-withholding branch from 8397f47 to 98ff5cb Compare May 20, 2024 16:04
@marcelsavegnago
Copy link
Sponsor Member Author

@rvalyi agora o teste é para ficar verde, mas veja que fix um commit no fiscal para não trazer definições de impostos quando a mesma estiver expirada. Acreditei que buscando apenas as aprovadas já atenderia mas pelo jeito não e isto causou erro em vários testes que não me aprofundei mas entendo que são casos que devem estar considerando definições de impostos ainda em racuscunho ou revisadas e não apenas as aprovadas.

2d2b7b2

cc @renatonlima

@marcelsavegnago
Copy link
Sponsor Member Author

Vou dar uma reorganiada no commit do test porque acabei mudando as coisas de lugar e vai dificultar a revisão.

@marcelsavegnago marcelsavegnago force-pushed the 14.0-l10n_br_account-fix-amount-when-tax-withholding branch 3 times, most recently from 7a92813 to 2aeb7ef Compare May 20, 2024 16:20
@marcelsavegnago marcelsavegnago force-pushed the 14.0-l10n_br_account-fix-amount-when-tax-withholding branch from 2aeb7ef to bd002c6 Compare May 20, 2024 16:21
@marcelsavegnago
Copy link
Sponsor Member Author

Vou dar uma reorganiada no commit do test porque acabei mudando as coisas de lugar e vai dificultar a revisão.

DONE

Copy link
Member

@rvalyi rvalyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM de um ponto de vista tecnico.

@renatonlima @douglascstd @felipemotter rola algum review funcional de vcs?

@marcelsavegnago
Copy link
Sponsor Member Author

@WesleyOliveira98 se tiver um tempo e puder fazer uma revisão funcional.. eu agradeço

Copy link
Contributor

@douglascstd douglascstd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[FUNCTIONAL REVIEW] APPROVED

Para o funcionamento dos impostos retidos era adotado o uso do imposto dedutível, onde apresentava corretamente os valores líquidos a pagar.
Com esta PR, não é mais necessário habilitar o dedutível para operar com impostos retidos.

Operação sem lançamento de imposto dedutível.
image

Alteração para aplicação do lançamento do imposto dedutível
image

Operação sem lançamento de imposto dedutível.
image

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@rvalyi
Copy link
Member

rvalyi commented May 20, 2024

[FUNCTIONAL REVIEW] APPROVED

Para o funcionamento dos impostos retidos era adotado o uso do imposto dedutível, onde apresentava corretamente os valores líquidos a pagar.
Com esta PR, não é mais necessário habilitar o dedutível para operar com impostos retidos.

Operação sem lançamento de imposto dedutível.
image

Alteração para aplicação do lançamento do imposto dedutível
image

Operação sem lançamento de imposto dedutível.
image

show @douglascstd valeu pelos reviews funcionais sempre de qualidade!

@rvalyi
Copy link
Member

rvalyi commented May 20, 2024

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 14.0-ocabot-merge-pr-3016-by-rvalyi-bump-minor, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 3ba241e into OCA:14.0 May 20, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at d3d8d69. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants