Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0031318
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 07. Sales managementmajoralways2015-11-02 11:022015-11-23 21:17
ReporteregoitzView Statuspublic 
Assigned Toaferraz 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision10a0ffa31546
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0031318: Processing landed cost is failing when there is a return material receipt voided

DescriptionWhen processing a landed cost the process fails when some of the products have been used on a voided shipment.
The messages shown is:

It is not possible to process a Cost Adjustment that includes lines of transactions whose cost is permanently adjusted.\nLines:

That happens becuase the cost of the voided shipment is checked as permanent
Steps To Reproduce1. create one receipt A.
2 create a shipment B
3.create the return from customer and the return material receipt of the shipment B.
4.- Void the Return material receipt.
5. calculate costs
6. Add landed cost to the receipt A,
Try to process it. You will receive an error:
"It is not possible to process a Cost Adjustment that includes lines of transactions whose cost is permanently adjusted.\nLines: "
Proposed SolutionThe problem is in the searchReturnShipments method of the CostingAlgorithmAdjustmentImp.java

This query is taking into account the transactions related but it should not take into account, those that are voided
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0081632)
aferraz (manager)
2015-11-09 18:10

Not able to reproduce it
(0081823)
VictorVillar (developer)
2015-11-13 13:31

Updated the steps to reproduce
(0081902)
aferraz (manager)
2015-11-16 19:05
edited on: 2015-11-19 10:12

Test plan:

Test scenario 1

- Create one product for F&B US named "A 31318 positivo" for instace. Go to Price tab and select "Be Soft Drinker Price List". Enter a Unit/List price = 100.00

- Check that F&B Us Org has a costing rule assigned with below setup:
Average Algorithm
Warehouse Dimension = No
Backdated Transactions Fixed = No

- Create one receipt for the product of 10 unit on today's date. Run costing background process and check that in the Costing tab of the product, an average cost = 100.00 is shown.

- Create a shipment of the product, 5 units. Complete the shipment

- Create a return from customer for that 5 units as well as the corresponding return material receipt of the shipment

- Void the Return material receipt

- Run Costing Background process

- Check that current stock of the product is 0 and the cost is 100

- Add a landed cost of 5.00 to the receipt of the product. Process it. No error is shown. The process completes successfully and a Cost Adjustment of 5.00 is created for both the receipt (10 units adjusted by 5.00 landed cost amount) and the shipment (5 units adjusted by 2.50 landed cost amount).

- Run costing background process. Check it ends successfully.

- Check that the cost of the product is 1000.00 (10 unit x 100.00)+5=1005/10=100.5

(0081914)
psanjuan (manager)
2015-11-17 10:00
edited on: 2015-11-19 10:12

Issue verified.

Test plan above also verified.

Scenario 2

Also working in the case of getting into zero stock, that is for instance booking a goods receipt of 5 units, then a goods shipment of 5 units, and after that booking the return from customer and return material shipment of 5 units.
Once the above is done a landed cost is booked. This landed cost can be successfully booked. The cost of the product will once again be adjusted to the correct value, after booking a receipt that turns the stock of the product into a positive value.

Test scenario

- Create one product for F&B US named "A 31318 zero" for instace. Go to Price tab and select "Be Soft Drinker Price List". Enter a Unit/List price = 100.00

- Check that F&B Us Org has a costing rule assigned with below setup:
Average Algorithm
Warehouse Dimension = No
Backdated Transactions Fixed = No

- Create one receipt for the product of 5 units on today's date. Run costing background process and check that in the Costing tab of the product, an average cost = 100.00 is shown.

- Create a shipment of the product, 5 units. Complete the shipment

- Create a return from customer for that 5 units as well as the corresponding return material receipt of the shipment

- Void the Return material receipt

- Run Costing Background process

- Check that current stock of the product is 0 and the cost is 100

- Add a landed cost of 10.00 to the receipt of the product. Process it. No error is shown. The process completes successfully and a Cost Adjustment of 10.00 is created for both the receipt (5 units adjusted by 10.00 landed cost amount) and the shipment (5 units adjusted by 10.00 landed cost amount).

- Run costing background process. Check it ends successfully.

- Book a goods receipt for 5 units of the product. Complete the receipt.

- Run costing background process.

- Check that the cost of the product is once again 100.00

Scenario 3

Also working in the case of getting into negative stock, that is for instance booking a goods receipt of 5 units, then a goods shipment of 10 units, and after that booking the return from customer and return material shipment of 1 unit.
Once the above is done a landed cost is booked. This landed cost can be successfully booked. The cost of the product will once again be adjusted to the correct value, after booking a receipt that turns the stock of the product into a positive value.

Test scenario

- Create one product for F&B US named "A 31318 negative" for instace. Go to Price tab and select "Be Soft Drinker Price List". Enter a Unit/List price = 100.00

- Check that F&B Us Org has a costing rule assigned with below setup:
Average Algorithm
Warehouse Dimension = No
Backdated Transactions Fixed = No

- Create one receipt for the product of 5 units on today's date. Run costing background process and check that in the Costing tab of the product, an average cost = 100.00 is shown.

- Create a shipment of the product, 10 units. Complete the shipment

- Create a return from customer for that 1 unit as well as the corresponding return material receipt of the shipment

- Void the Return material receipt

- Run Costing Background process

- Check that current stock of the product is 0 and the cost is 100

- Add a landed cost of 10.00 to the receipt of the product. Process it. No error is shown. The process completes successfully and a Cost Adjustment is created for both the receipt (5 units adjusted by 10.00 landed cost amount) and the shipment (10 units adjusted by 20.00 landed cost amount).

- Run costing background process. Check it ends successfully.

- Book a goods receipt for 10 units of the product. Complete the receipt.

- Run costing background process.

- Check that the cost of the product is once again 100.00

(0081982)
hgbot (developer)
2015-11-19 11:57

Repository: erp/devel/pi
Changeset: 10a0ffa315464547683c2e1701826209933eb066
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Nov 16 18:49:39 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/10a0ffa315464547683c2e1701826209933eb066 [^]

Fixes issue 31318: Landed cost fails when there is ReturnMaterialReceipt voided

Voided shipments should be excluded when searching transactions which depend on another adjusted transaction.

---
M src/org/openbravo/costing/CostingAlgorithmAdjustmentImp.java
---
(0081983)
dmiguelez (developer)
2015-11-19 11:58

Code Review + Testing Ok
(0082256)
hudsonbot (developer)
2015-11-23 21:17

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/7b56bebaaa88 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2015-11-02 11:02 egoitz New Issue
2015-11-02 11:02 egoitz Assigned To => Triage Finance
2015-11-02 11:02 egoitz Modules => Core
2015-11-02 11:02 egoitz Resolution time => 1447974000
2015-11-02 11:02 egoitz Triggers an Emergency Pack => No
2015-11-02 11:05 egoitz Steps to Reproduce Updated View Revisions
2015-11-09 13:47 aferraz Assigned To Triage Finance => aferraz
2015-11-09 13:47 aferraz Status new => scheduled
2015-11-09 18:10 aferraz Assigned To aferraz => egoitz
2015-11-09 18:10 aferraz Status scheduled => feedback
2015-11-09 18:10 aferraz Note Added: 0081632
2015-11-13 13:31 VictorVillar Note Added: 0081823
2015-11-13 13:31 VictorVillar Assigned To egoitz => Triage Finance
2015-11-13 13:31 VictorVillar Status feedback => new
2015-11-13 13:35 VictorVillar Steps to Reproduce Updated View Revisions
2015-11-13 13:35 VictorVillar Proposed Solution updated
2015-11-13 14:13 VictorVillar Summary Processing landed cost is failing when there is a shipment voided => Processing landed cost is failing when there is a return material receipt voided
2015-11-16 13:35 aferraz Assigned To Triage Finance => aferraz
2015-11-16 13:35 aferraz Status new => scheduled
2015-11-16 19:05 aferraz Note Added: 0081902
2015-11-16 20:40 heccam Issue Monitored: heccam
2015-11-17 10:00 psanjuan Note Added: 0081914
2015-11-17 11:36 psanjuan Note Edited: 0081902 View Revisions
2015-11-17 11:38 psanjuan Note Edited: 0081902 View Revisions
2015-11-17 12:11 psanjuan Note Edited: 0081902 View Revisions
2015-11-17 12:19 psanjuan Note Edited: 0081902 View Revisions
2015-11-17 12:22 psanjuan Note Edited: 0081902 View Revisions
2015-11-17 14:56 psanjuan Note Edited: 0081902 View Revisions
2015-11-19 08:54 psanjuan Note Edited: 0081902 View Revisions
2015-11-19 09:10 psanjuan Note Edited: 0081902 View Revisions
2015-11-19 09:11 psanjuan Note Edited: 0081902 View Revisions
2015-11-19 09:30 psanjuan Note Edited: 0081902 View Revisions
2015-11-19 09:31 psanjuan Note Edited: 0081914 View Revisions
2015-11-19 09:43 psanjuan Note Edited: 0081914 View Revisions
2015-11-19 09:43 psanjuan Note Edited: 0081914 View Revisions
2015-11-19 09:51 psanjuan Note Edited: 0081914 View Revisions
2015-11-19 09:53 psanjuan Note Edited: 0081914 View Revisions
2015-11-19 10:12 psanjuan Note Edited: 0081914 View Revisions
2015-11-19 10:12 psanjuan Note Edited: 0081902 View Revisions
2015-11-19 10:12 psanjuan Note Edited: 0081914 View Revisions
2015-11-19 11:57 hgbot Checkin
2015-11-19 11:57 hgbot Note Added: 0081982
2015-11-19 11:57 hgbot Status scheduled => resolved
2015-11-19 11:57 hgbot Resolution open => fixed
2015-11-19 11:57 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/10a0ffa315464547683c2e1701826209933eb066 [^]
2015-11-19 11:58 dmiguelez Review Assigned To => dmiguelez
2015-11-19 11:58 dmiguelez Note Added: 0081983
2015-11-19 11:58 dmiguelez Status resolved => closed
2015-11-23 21:17 hudsonbot Checkin
2015-11-23 21:17 hudsonbot Note Added: 0082256


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker