Skip to content

Purchase Invoice Does Not Include Accepted Quantity from Returned Items When "Bill for Rejected Quantity" is Enabled #47671

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

Closed
chrisdent opened this issue May 21, 2025 · 1 comment
Labels

Comments

@chrisdent
Copy link

Information about bug

When the "Bill for Rejected Quantity" option is enabled in Purchase Settings, and a Purchase Receipt includes a returned item (via a Return Purchase Receipt), the system does not include the accepted quantity of that item when generating a Purchase Invoice from the original Purchase Receipt.

This behavior is incorrect, as the supplier should still be invoiced for the accepted quantity, even if part of the item was returned.

Expected Behavior
When "Bill for Rejected Quantity" is enabled, and a Purchase Receipt has a returned item:

Creating a Purchase Invoice from the original Purchase Receipt should include the accepted quantity of the returned item.

The invoice should reflect what was actually accepted, not exclude the item entirely.

Actual Behavior
The returned item is completely excluded from the Purchase Invoice, even though it had a non-zero accepted quantity.

Steps to Reproduce
Enable "Bill for Rejected Quantity" in Purchase Settings.

Create a Purchase Receipt with multiple items.

Create a Return Purchase Receipt for one of the items with a partial return.

Create a Purchase Invoice from the original Purchase Receipt.

The item that had a partial return is not included, even if it has an accepted qty > 0.

Suggested Fix
Adjust the Purchase Invoice generation logic to include items with accepted quantity > 0, even if they were returned partially.

The filter likely needs to skip items only if accepted quantity = 0.

Module

buying

Version

ERPNext: v15.40.0 (version-15)
Frappe Framework: v15.47.0 (version-15)

Installation method

None

Relevant log output / Stack trace / Full Error Message.

@chrisdent chrisdent added the bug label May 21, 2025
@DipenFrappe
Copy link
Collaborator

Working fine, check with the latest version.

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

No branches or pull requests

2 participants