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

refactor: separate round off account for opening (backport #42588) #44136

Merged
merged 11 commits into from
Nov 14, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Nov 14, 2024

Issue:

Rounding Entries are unavoidable in high precision Sales / Purchase Invoices that post opening entries. As the default Round off account is of type Profit and Loss, such Invoices is currently not possible to be submitted.

Solution

A separate Round Off account just for opening entries could help address this issue. This account will be under Liability.

Abandoned tasks

Tasks:

  • patch to update existing companies
  • add round off for all templates in verified and unverified directory

Alternate approach

Abandoning above approach of updating templates and creating account automatically.

System will not auto-create any accounts. Instead,

  • Company master will have new account provision round_off_for_opening, which is not mandatory
  • New account_type - Round Off for Opening - is introduced
  • User has to manually create an account of above type and set it in company master

ToDo:

  • Test cases for Sales Invoice, with and without inclusive tax
  • Test case for Purchase Invoice

Internal Ref: 18968
fixes: #42376


This is an automatic backport of pull request #42588 done by Mergify.

(cherry picked from commit a5b2285)
(cherry picked from commit 88e6816)

# Conflicts:
#	erpnext/accounts/general_ledger.py
(cherry picked from commit 5021c7c)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
(cherry picked from commit 193ea9a)
(cherry picked from commit b7edc6d)

# Conflicts:
#	erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py
Copy link
Contributor Author

mergify bot commented Nov 14, 2024

Cherry-pick of 88e6816 has failed:

On branch mergify/bp/version-15-hotfix/pr-42588
Your branch is ahead of 'origin/version-15-hotfix' by 1 commit.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit 88e68168e3.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   erpnext/accounts/doctype/account/account.json
	modified:   erpnext/accounts/doctype/account/account.py
	modified:   erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
	modified:   erpnext/accounts/doctype/sales_invoice/sales_invoice.py
	modified:   erpnext/controllers/accounts_controller.py
	modified:   erpnext/setup/doctype/company/company.js

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   erpnext/accounts/general_ledger.py

Cherry-pick of 5021c7c has failed:

On branch mergify/bp/version-15-hotfix/pr-42588
Your branch is ahead of 'origin/version-15-hotfix' by 4 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit 5021c7ca2c.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py

no changes added to commit (use "git add" and/or "git commit -a")

Cherry-pick of b7edc6d has failed:

On branch mergify/bp/version-15-hotfix/pr-42588
Your branch is ahead of 'origin/version-15-hotfix' by 8 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit b7edc6dea9.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@ruthra-kumar ruthra-kumar merged commit 90b7ce2 into version-15-hotfix Nov 14, 2024
11 checks passed
@ruthra-kumar ruthra-kumar deleted the mergify/bp/version-15-hotfix/pr-42588 branch November 14, 2024 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant