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.
Problem:
If you raise a GST invoice with the same item multiple times in the invoice with different UOMs, the report only shows data of 1 uom and skips the rest.
Also, if you add the same item twice in the invoice with different HSN Code(eg: Service items with same name and different HSN code), the report only shows data of either one.
Cause:
HSN wise Summary report grouped data in the SQL query by the following 4 parameters:
And in the
_execute
function, we grouped it by:And then added only 1 matching data to the report.
This caused issue as only 1 entry from the 1st group was considered by the report.
Solution:
This PR changed the grouping to:
SQL:
_execute
function:Also re-wrote the test case to accommodate this scenario.