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

fix: incorrect outstanding on non-pos invoice with write_off_account #43316

Conversation

ruthra-kumar
Copy link
Member

@ruthra-kumar ruthra-kumar commented Sep 21, 2024

Issue

write_off_account is auto set based on the POS Profile when user marks the Invoice as POS - 'Is Pos' checbox.

When write_off_account is set, invoice's Outstanding Amount is not updated. But, if you set and unset 'Is Pos' checkbox, write_off_account is still set, due to which the Outstanding Amount field is not updated even though it is a normal invoice.

This is more pronounced in Sales Return (Credit Note), as the outstanding amount is not even updated in draft status due to which it always shows '0', even if 'Update Outstanding for Self' is enabled.

Fix

If Invoice is not POS, write_off_account will be cleared.

Internal Ref: 20369

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Sep 21, 2024
@ruthra-kumar ruthra-kumar marked this pull request as ready for review September 23, 2024 05:23
@ruthra-kumar ruthra-kumar merged commit fc9b1ef into frappe:develop Sep 23, 2024
16 checks passed
ruthra-kumar added a commit that referenced this pull request Sep 23, 2024
…-43316

fix: incorrect outstanding on non-pos invoice with write_off_account (backport #43316)
ruthra-kumar added a commit that referenced this pull request Sep 23, 2024
…-43316

fix: incorrect outstanding on non-pos invoice with write_off_account (backport #43316)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-14-hotfix backport to version 14 backport version-15-hotfix needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant