Fixed: Preserve adjustments in quick order returns (OFBIZ-12432) - #1994
Open
mohammad-k8 wants to merge 1 commit into
Open
mohammad-k8 wants to merge 1 commit into
mohammad-k8 wants to merge 1 commit into
Conversation
quickReturnFromOrder did not pass orderAdjustmentId when copying order-level adjustments, so createReturnAdjustment produced zero-valued manual adjustments instead of preserving promotions, shipping charges, and taxes. The converted Groovy service also misspelled countNewReturnItems and read availableReturnTotal from the wrong service result, causing return reconciliation to use an incorrect value. ReturnItems.ftl updated returnTotal only inside macro-local scope, so the return page displayed the raw item total without its item-level and return-level adjustments. Pass the source adjustment IDs, use the correct service parameter and result, and accumulate adjustment amounts in the caller scope. Add a completed-order regression covering item and order promotions, shipping, tax, balance-adjustment suppression, and equal 17.00 return and invoice totals.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixed:
(OFBIZ-12432)
Explanation:
quickReturnFromOrder did not pass orderAdjustmentId when copying order-level adjustments, so createReturnAdjustment produced zero-valued manual adjustments instead of preserving promotions, shipping charges, and taxes. The converted Groovy service also misspelled countNewReturnItems and read availableReturnTotal from the wrong service result, causing return reconciliation to use an incorrect value.
ReturnItems.ftl updated returnTotal only inside macro-local scope, so the return page displayed the raw item total without its item-level and return-level adjustments.
Pass the source adjustment IDs, use the correct service parameter and result, and accumulate adjustment amounts in the caller scope. Add a completed-order regression covering item and order promotions, shipping, tax, balance-adjustment suppression, and equal 17.00 return and invoice totals.
Thanks: @nameet-jain for reporting.