Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0031318 | Openbravo ERP | 07. Sales management | public | 2015-11-02 11:02 | 2015-11-23 21:17 |
|
Reporter | egoitz | |
Assigned To | aferraz | |
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | | |
Merge Request Status | |
Review Assigned To | dmiguelez |
OBNetwork customer | OBPS |
Web browser | |
Modules | Core |
Support ticket | 38887 |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0031318: Processing landed cost is failing when there is a return material receipt voided |
Description | When 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 Reproduce | 1. 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 Solution | The 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 |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | |
|
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 | OBNetwork customer | => Yes |
2015-11-02 11:02 | egoitz | Modules | => Core |
2015-11-02 11:02 | egoitz | Support ticket | => 38887 |
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 | bug_revision_view_page.php?rev_id=9971#r9971 |
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 | bug_revision_view_page.php?rev_id=10237#r10237 |
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 | bug_revision_view_page.php?bugnote_id=0081902#r10259 |
2015-11-17 11:38 | psanjuan | Note Edited: 0081902 | bug_revision_view_page.php?bugnote_id=0081902#r10260 |
2015-11-17 12:11 | psanjuan | Note Edited: 0081902 | bug_revision_view_page.php?bugnote_id=0081902#r10261 |
2015-11-17 12:19 | psanjuan | Note Edited: 0081902 | bug_revision_view_page.php?bugnote_id=0081902#r10262 |
2015-11-17 12:22 | psanjuan | Note Edited: 0081902 | bug_revision_view_page.php?bugnote_id=0081902#r10263 |
2015-11-17 14:56 | psanjuan | Note Edited: 0081902 | bug_revision_view_page.php?bugnote_id=0081902#r10264 |
2015-11-19 08:54 | psanjuan | Note Edited: 0081902 | bug_revision_view_page.php?bugnote_id=0081902#r10276 |
2015-11-19 09:10 | psanjuan | Note Edited: 0081902 | bug_revision_view_page.php?bugnote_id=0081902#r10277 |
2015-11-19 09:11 | psanjuan | Note Edited: 0081902 | bug_revision_view_page.php?bugnote_id=0081902#r10278 |
2015-11-19 09:30 | psanjuan | Note Edited: 0081902 | bug_revision_view_page.php?bugnote_id=0081902#r10279 |
2015-11-19 09:31 | psanjuan | Note Edited: 0081914 | bug_revision_view_page.php?bugnote_id=0081914#r10281 |
2015-11-19 09:43 | psanjuan | Note Edited: 0081914 | bug_revision_view_page.php?bugnote_id=0081914#r10282 |
2015-11-19 09:43 | psanjuan | Note Edited: 0081914 | bug_revision_view_page.php?bugnote_id=0081914#r10283 |
2015-11-19 09:51 | psanjuan | Note Edited: 0081914 | bug_revision_view_page.php?bugnote_id=0081914#r10284 |
2015-11-19 09:53 | psanjuan | Note Edited: 0081914 | bug_revision_view_page.php?bugnote_id=0081914#r10285 |
2015-11-19 10:12 | psanjuan | Note Edited: 0081914 | bug_revision_view_page.php?bugnote_id=0081914#r10288 |
2015-11-19 10:12 | psanjuan | Note Edited: 0081902 | bug_revision_view_page.php?bugnote_id=0081902#r10289 |
2015-11-19 10:12 | psanjuan | Note Edited: 0081914 | bug_revision_view_page.php?bugnote_id=0081914#r10290 |
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 | |
Notes |
|
|
|
|
|
Updated the steps to reproduce |
|
|
(0081902)
|
aferraz
|
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
|
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
|
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
---
|
|
|
|
|
|
|
|