Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0034802 | Openbravo ERP | 04. Warehouse management | public | 2016-12-21 17:21 | 2017-03-15 20:18 |
|
Reporter | maite | |
Assigned To | rqueralta | |
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR17Q2 | |
Merge Request Status | |
Review Assigned To | markmm82 |
OBNetwork customer | OBPS |
Web browser | |
Modules | Core |
Support ticket | 44715 |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0034802: Unhomogeneous behavior in Cost Adjustments: price difference/backdated/negative stock adjustments are created for generic orgs |
Description | Costs are calculated at "Legal" organization level so Cost Adjustments should be created at "Legal" organization level also because to adjust an specific "generic" organization transaction can implies to adjust another "generic" organization transaction (both belonging to same "legal"). So "Cost Adjustment" document should always be created for "legal" organization and each line will belong to specific "generic" organization |
Steps To Reproduce | 1. Create new Product for "España" organization. Define Price for "Bebidas Alegres"= 5 and "Tarifa de ventas"= 7
2. Register Purchase Order for "España norte" organization and "Bebidas alegres" business partner. Add line for previous product and qty=10. Process
3. Register Goods Receipt for "España norte" organization and "Bebidas alegres" business partner. Run "create lines from" process, select previous order and process
4. Run Costing Background process and verify that cost for this transaction is calculated to 50
5. Register Goods Shipment for "España norte" organization and "Alimentos y Supermercados" business partner. Add line for previous product and qty=2. Process shipment
6. Run Costing Background process and verify that cost is calculated to 10
7. Register Purchase Invoice for "España norte" organization and "Bebidas alegres" business partner. Run "create lines from" process, select previous receipt. Edit invoice line to set price=7 and complete
8. Run "Process Price Difference Adjustment" process for "España norte" organization, today's date and previous product
9. Access Cost Adjustment window and verify that record has been created for "España norte" organization instead of "España" organization
|
Proposed Solution | Cost Adjustment document should be as follows:
* "Legal" organization should be set in the header
* Organization field should be shown in Cost Adjustment Lines. And it should be set with transaction's organization ("generic" in previous example)
When posting Cost Adjustment document, line's organization should be considered so previous line will post to "generic" organization |
Additional Information | |
Tags | No tags attached. |
Relationships | causes | defect | 0035015 | | closed | collazoandy4 | Organization's natural tree error in cost adjustment line's structure |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2016-12-21 17:21 | maite | New Issue | |
2016-12-21 17:21 | maite | Assigned To | => Triage Finance |
2016-12-21 17:21 | maite | OBNetwork customer | => Yes |
2016-12-21 17:21 | maite | Modules | => Core |
2016-12-21 17:21 | maite | Triggers an Emergency Pack | => No |
2016-12-21 17:31 | maite | Proposed Solution updated | |
2016-12-21 17:32 | maite | Support ticket | => 44715 |
2016-12-21 17:32 | maite | Resolution time | => 1483484400 |
2016-12-21 17:32 | maite | Issue Monitored: networkb | |
2016-12-21 20:57 | markmm82 | Assigned To | Triage Finance => rqueralta |
2016-12-23 14:14 | rqueralta | Note Added: 0092975 | |
2016-12-23 20:55 | rqueralta | Status | new => scheduled |
2016-12-26 21:26 | rqueralta | Note Added: 0093000 | |
2017-01-02 12:08 | psanjuan | Note Added: 0093087 | |
2017-01-02 13:16 | psanjuan | Note Added: 0093100 | |
2017-01-02 13:26 | psanjuan | Note Edited: 0092975 | bug_revision_view_page.php?bugnote_id=0092975#r14144 |
2017-01-02 13:28 | psanjuan | Note Added: 0093105 | |
2017-01-02 13:38 | psanjuan | Note Edited: 0093105 | bug_revision_view_page.php?bugnote_id=0093105#r14146 |
2017-01-02 13:41 | psanjuan | Note Added: 0093108 | |
2017-01-02 13:44 | psanjuan | Note Edited: 0093108 | bug_revision_view_page.php?bugnote_id=0093108#r14148 |
2017-01-02 13:48 | psanjuan | Note Edited: 0093108 | bug_revision_view_page.php?bugnote_id=0093108#r14149 |
2017-01-02 14:03 | psanjuan | Note Added: 0093109 | |
2017-01-02 14:14 | psanjuan | Note Edited: 0093109 | bug_revision_view_page.php?bugnote_id=0093109#r14151 |
2017-01-02 14:19 | psanjuan | Note Edited: 0093109 | bug_revision_view_page.php?bugnote_id=0093109#r14152 |
2017-01-02 14:26 | psanjuan | Note Added: 0093110 | |
2017-01-02 14:33 | psanjuan | Note Edited: 0093110 | bug_revision_view_page.php?bugnote_id=0093110#r14154 |
2017-01-02 14:35 | psanjuan | Note Added: 0093111 | |
2017-01-02 14:37 | psanjuan | Note Added: 0093112 | |
2017-01-02 14:44 | psanjuan | Note Edited: 0093111 | bug_revision_view_page.php?bugnote_id=0093111#r14156 |
2017-01-02 14:53 | psanjuan | Note Edited: 0093111 | bug_revision_view_page.php?bugnote_id=0093111#r14157 |
2017-01-02 14:54 | psanjuan | Note Edited: 0093111 | bug_revision_view_page.php?bugnote_id=0093111#r14158 |
2017-01-02 14:55 | psanjuan | Note Edited: 0093111 | bug_revision_view_page.php?bugnote_id=0093111#r14159 |
2017-01-02 14:57 | psanjuan | Note Edited: 0093112 | bug_revision_view_page.php?bugnote_id=0093112#r14161 |
2017-01-02 14:58 | psanjuan | Note Edited: 0093112 | bug_revision_view_page.php?bugnote_id=0093112#r14162 |
2017-01-02 14:58 | psanjuan | Note Edited: 0093112 | bug_revision_view_page.php?bugnote_id=0093112#r14163 |
2017-01-02 15:03 | psanjuan | Note Edited: 0093112 | bug_revision_view_page.php?bugnote_id=0093112#r14164 |
2017-01-02 15:07 | psanjuan | Note Edited: 0093112 | bug_revision_view_page.php?bugnote_id=0093112#r14165 |
2017-01-02 15:09 | psanjuan | Note Edited: 0093112 | bug_revision_view_page.php?bugnote_id=0093112#r14166 |
2017-01-02 15:12 | psanjuan | Note Edited: 0093112 | bug_revision_view_page.php?bugnote_id=0093112#r14167 |
2017-01-02 15:13 | psanjuan | Note Added: 0093113 | |
2017-01-04 15:17 | hgbot | Checkin | |
2017-01-04 15:17 | hgbot | Note Added: 0093184 | |
2017-01-04 15:17 | hgbot | Status | scheduled => resolved |
2017-01-04 15:17 | hgbot | Resolution | open => fixed |
2017-01-04 15:17 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/e55d9bf9a2b7fad6c133630ded4c4c4ca8074909 [^] |
2017-01-04 15:21 | markmm82 | Review Assigned To | => markmm82 |
2017-01-04 15:21 | markmm82 | Note Added: 0093185 | |
2017-01-04 15:21 | markmm82 | Status | resolved => closed |
2017-01-04 15:21 | markmm82 | Fixed in Version | => 3.0PR17Q1 |
2017-01-09 20:17 | markmm82 | Fixed in Version | 3.0PR17Q1 => 3.0PR17Q2 |
2017-01-19 18:28 | maite | Relationship added | causes 0035015 |
2017-03-15 20:18 | hudsonbot | Checkin | |
2017-03-15 20:18 | hudsonbot | Note Added: 0095062 | |
Notes |
|
(0092975)
|
rqueralta
|
2016-12-23 14:14
(edited on: 2017-01-02 13:26) |
|
Test plan:
As F&B International Group Admin
- Go to Product window
Create new Product for "España" organization. Define Price for "Bebidas Alegres"= 5 and "Tarifa de ventas"= 7
- Go to Purchase Order window
Register Purchase Order for "España norte" organization and "Bebidas alegres" business partner.
Add line for previous product and qty=10. Process it
- Go to Goods Receipt window
Register Goods Receipt for "España norte" organization and "Bebidas alegres" business partner.
Run "create lines from" process, select previous order and process it
- Go to Process Request window
Run Costing Background process and verify that cost for this transaction is calculated to 50
- Go to Goods Shipment
Register Goods Shipment for "España norte" organization and "Alimentos y Supermercados" business partner.
Add line for previous product and qty=2. Process shipment
- Go to Process Request window
Run Costing Background process and verify that cost is calculated to 10
- Go to Purchase Invoice window
Register Purchase Invoice for "España norte" organization and "Bebidas alegres" business partner.
Run "create lines from" process, select previous receipt.
Edit invoice line to set price=7 and complete
- Run "Process Price Difference Adjustment" process for "España norte" organization, today's date and previous product
- Go to Cost Adjustment window
Verify that record has been created for "F&B España, S.A" organization
Verify in Lines tab that record has been created for "F&B España - Región Norte" organization
|
|
|
|
Script to fix erroneous data:
UPDATE m_costadjustment set ad_org_id = (select ad_get_org_le_bu(ad_org_id,'LE')) |
|
|
|
Verify also:
LandedCost, FixBackdated, ManualCostAdjustment, LCMatching y CostingServer, |
|
|
|
|
|
(0093105)
|
psanjuan
|
2017-01-02 13:28
(edited on: 2017-01-02 13:38) |
|
Test Case 1 - Process Price Difference Adjustment process
As F&B International Group Admin
- Go to Product window
- Create new Product for "España" organization. Define Price for "Bebidas Alegres"= 5 and "Tarifa de ventas"= 7
- Go to Purchase Order window
- Register Purchase Order for "España norte" organization and "Bebidas alegres" business partner.
- Add line for previous product and qty=10. Process it
- Go to Goods Receipt window and register Goods Receipt for "España norte" organization and "Bebidas alegres" business partner.
- Run "create lines from" process, select previous order and process it
- Go to Process Request window
- Run Costing Background process and verify that cost for this transaction is calculated to 50.00
- Go to Goods Shipment and register Goods Shipment for "España norte" organization and "Alimentos y Supermercados" business partner.
- Add line for previous product and qty=2. Process shipment
- Go to Process Request window
- Run Costing Background process and verify that cost is calculated to 10
- Go to Purchase Invoice window and register Purchase Invoice for "España norte" organization and "Bebidas alegres" business partner.
- Run "create lines from" process, select previous receipt.
- Edit invoice line to set price=7 and complete
- Run "Process Price Difference Adjustment" process for "España norte" organization, today's date and previous product
- Go to Cost Adjustment window
- Verify that cost adjustment has been created for "F&B España, S.A" organization
- Verify in Lines tab that two records have been created for "F&B España - Región Norte" organization:
* Source one V+ for an adjutsment amount = 20.00 (70-50)
* No Source one C- for an adjustment amount = 4.00 (14-10)
- Post cost adjustment.
- Verify cost adjustment transaction is post to both F&B España Euro and F&B International Group US general ledger configurations.
|
|
|
(0093108)
|
psanjuan
|
2017-01-02 13:41
(edited on: 2017-01-02 13:48) |
|
Test Case 2 - Price Correction Background process (created at F&B International Group level).
As F&B International Group Admin
- Go to Process Request window and create a new record with below setup:
Client = F&B International Group
Organization = *
Timing = Run inmediatly
Process = Price Correction Background.
- Go to Product window
- Create new Product for "España" organization. Define Price for "Bebidas Alegres"= 5 and "Tarifa de ventas"= 7
- Go to Purchase Order window
- Register Purchase Order for "España norte" organization and "Bebidas alegres" business partner.
- Add line for previous product and qty=10. Process it
- Go to Goods Receipt window and register Goods Receipt for "España norte" organization and "Bebidas alegres" business partner.
- Run "create lines from" process, select previous order and process it
- Go to Process Request window
- Run Costing Background process and verify that cost for this transaction is calculated to 50.00
- Go to Goods Shipment and register Goods Shipment for "España norte" organization and "Alimentos y Supermercados" business partner.
- Add line for previous product and qty=2. Process shipment
- Go to Process Request window
- Run Costing Background process and verify that cost is calculated to 10
- Go to Purchase Invoice window and register Purchase Invoice for "España norte" organization and "Bebidas alegres" business partner.
- Run "create lines from" process, select previous receipt.
- Edit invoice line to set price=7 and complete
- Go to process request window and run price correction process.
- Go to Cost Adjustment window
- Verify that cost adjustment has been created for "F&B España, S.A" organization
- Verify in Lines tab that two records have been created for "F&B España - Región Norte" organization:
* Source one V+ for an adjutsment amount = 20.00 (70-50)
* No Source one C- for an adjustment amount = 4.00 (14-10)
- Post cost adjustment.
- Verify cost adjustment transaction is post to both F&B España Euro and F&B International Group US general ledger configurations.
Repeat same test as above (test case 2) but setup of price correction background process at F&B España level.
|
|
|
(0093109)
|
psanjuan
|
2017-01-02 14:03
(edited on: 2017-01-02 14:19) |
|
Test Case 3 - Landed Cost
As F&B International Group Admin
- Go to G/L Item account and create a new one with below setup:
Organization: F&B España
Name : shipping cost
In Accounting tab select the account 62400 for F&B España general ledger and account 5850 for F&B International Group general ledger.
- Go to Landed Cost Type window and create a new one with below setup:
Organization: F&B España
Name : shipping cost
Account : Shipping cost (G/L Item)
Landed Cost Distribution Algorithm: Distribution by Amount.
- Go to Product window
- Create new Product for "España" organization. Define Price for "Bebidas Alegres"= 5 and "Tarifa de ventas"= 7
- Go to Purchase Order window
- Register Purchase Order for "España norte" organization and "Bebidas alegres" business partner.
- Add line for previous product and qty=10. Process it
- Go to Goods Receipt window and register Goods Receipt for "España norte" organization and "Bebidas alegres" business partner.
- Run "create lines from" process, select previous order and process it
- Go to Process Request window
- Run Costing Background process and verify that cost for this transaction is calculated to 50.00
- Go to Goods Shipment and register Goods Shipment for "España norte" organization and "Alimentos y Supermercados" business partner.
- Add line for previous product and qty=2. Process shipment
- Go to Process Request window
- Run Costing Background process and verify that cost is calculated to 10
- Go to Purchase Invoice window and register Purchase Invoice for "España norte" organization and "Bebidas alegres" business partner.
- Run "create lines from" process, select previous receipt. Complete the invoice.
- Go to landed cost window and create a new one for "F&B España - Region Norte" with below data:
Cost tab: Landed Cost Type = Shipping Cost
Amount = 30
Receipt tab = select the goods receipt just created.
- Process landed cost
- Go to Cost Adjustment window
- Verify that a cost adjustment has been created for "F&B España, S.A" organization
- Verify in Lines tab that two records have been created for "F&B España - Región Norte" organization:
* Source one V+ for an adjutsment amount = 30.00
* No Source one C- for an adjustment amount = 6.00 (3*2)
- Go to product window and verify that average cost has changed from 5 to 8 (50+30/10)
- Go to transaction tab and verify that vendor receipt has changed from 50 to 80 and customer shipment from 10 to 16
|
|
|
(0093110)
|
psanjuan
|
2017-01-02 14:26
(edited on: 2017-01-02 14:33) |
|
Test Case 4 - Manual Cost Adjustment.
As F&B International Group Admin
- Go to Product window
- Create new Product for "España" organization. Define Price for "Bebidas Alegres"= 5 and "Tarifa de ventas"= 7
- Go to Purchase Order window
- Register Purchase Order for "España norte" organization and "Bebidas alegres" business partner.
- Add line for previous product and qty=10. Process it
- Go to Goods Receipt window and register Goods Receipt for "España norte" organization and "Bebidas alegres" business partner.
- Run "create lines from" process, select previous order and process it
- Go to Process Request window
- Run Costing Background process and verify that cost for this transaction is calculated to 50.00
- Go to Goods Shipment and register Goods Shipment for "España norte" organization and "Alimentos y Supermercados" business partner.
- Add line for previous product and qty=2. Process shipment
- Go to Process Request window
- Run Costing Background process and verify that cost is calculated to 10
- In Transaction tab, select vendor receipt transaction and click on "Manual Cost Adjustment" process button, enter below information:
- Total Cost Amount = 80.00, Accounting date = today's date. Press Done.
- Verify that new cost is now 8 and transaction cost has changed to 80 (vendor receipt) and 16 (customer shipment).
- Go to Cost Adjustment window
- Verify that a cost adjustment has been created for "F&B España, S.A" organization, source process = Manual Cost Correction.
- Verify in Lines tab that two records have been created for "F&B España - Región Norte" organization:
* Source one V+ for an adjutsment amount = 30.00
* No Source one C- for an adjustment amount = 6.00 (2*3.00)
- Post cost adjustment.
- Verify cost adjustment transaction is post to both F&B España Euro and F&B International Group US general ledger configurations.
|
|
|
(0093111)
|
psanjuan
|
2017-01-02 14:35
(edited on: 2017-01-02 14:55) |
|
Test Case 5 - Fix backdated transaction.
- Go to Costing Rule window and select F&B España one.
- Click on "Fix Backdated Transactions" process button.
- Enter Fix Backdated From date = 01-01-2016. Press Done.
- Go to product window and create a new product for F&B España. Go to price tab and enter a unit/list price = 5 for Tarifa Bebidas Alegres and a unit/list price = 7 for Tarifa Ventas.
- Go to purchase order and create a new one for F&B España - Region Norte, dated on today's date = 02-01-2017
- In lines tab select the product, enter 10 units. Book the order.
- Go to Goods Receipt window and create a new one for F&B España - Region Norte, dated on todays' date = 02-01-2017. Select the order and complete the receipt.
- Run Costing Background and verify that the cost of the product is 5 and vendor transaction value is 50.00
- Go to Goods shipment window and create a new one for F&B España - Region Norte, Alimentos y Supermercados business partner, dated on today's date 02-01-2017
- In lines tab select the product. Enter a movement quantity = 2. Complete the shipment.
- Run Costing Background and verify that the cost of the product remains as 5 and customer transaction value is 10.00
- Go to purchase order and create a new one for F&B España - Region Norte, dated on 01-01-2017
- In lines tab select the product, enter 10 units. Change purchase price to 2.00. Book the order.
- Go to Goods Receipt window and create a new one for F&B España - Region Norte, dated on 01-01-2017. Select the order and complete the receipt.
- Run Costing Background
- Go to product window and verify that the cost of the product has been split into two lines first one for a cost =2 and second one for a cost = 3.5 (50+20/20)
- Go to transaction tab and verify that customer shipment transaction has been adjusted from 10 (2*5) to 7 (2*3.5)
- Go to Cost Adjustment window and verify that a new one has been created caused by source process "Backdated Transaction".
- Verify that it has been created for F&B España, while adjustemnt lines are created for F&B España - Región Norte organization.
- Post adjustment and verify it is posted for both F&B España and F&B International group general ledger configuration.
|
|
|
(0093112)
|
psanjuan
|
2017-01-02 14:37
(edited on: 2017-01-02 15:12) |
|
Test Case 6 - Negative Stock Correction
- Go to Client window and "Allow Negative Stock" for F&B International Group Client.
- Go to Preference window and create a new one with below setup:
Organization = F&B España
Property = Enable Negative Stock Corrections
Value = Y
Visible at user = Openbravo.
- Log out and Log in.
- Go to product window and create a new product for F&B España. Go to price tab and enter a unit/list price = 5 for Tarifa Bebidas Alegres and a unit/list price = 7 for Tarifa Ventas.
- Go to purchase order and create a new one for F&B España - Region Norte, dated on today's date = 02-01-2017
- In lines tab select the product, enter 10 units. Book the order.
- Go to Goods Receipt window and create a new one for F&B España - Region Norte, dated on todays' date = 02-01-2017. Select the order and complete the receipt.
- Run Costing Background and verify that the cost of the product is 5 and vendor transaction value is 50.00
- Go to Goods shipment window and create a new one for F&B España - Region Norte, Alimentos y Supermercados business partner, dated on today's date 02-01-2017
- In lines tab select the product. Enter a movement quantity = 10. Complete the shipment.
- Run Costing Background and verify that the cost of the product remains as 5 and customer transaction value is 50.00
- Go to Goods shipment window and create a new one for F&B España - Region Norte, Alimentos y Supermercados business partner, dated on today's date 02-01-2017
- In lines tab select the product. Enter a movement quantity = 5, and select an storage bin. Complete the shipment.
- Run Costing Background and verify that the cost of the product remains as 5 and customer transaction value is 25.00
- Go to purchase order and create a new one for F&B España - Region Norte, dated on today's date = 03-01-2017
- In lines tab select the product, enter 10 units. Change price to 6. Book the order.
- Go to Goods Receipt window and create a new one for F&B España - Region Norte, dated on todays' date = 03-01-2017. Select the order and complete the receipt.
- Run Costing Backgroun process.
- Go to product window and verify that there is a new cost = 6.
- Go to Cost adjustment window and verify that a new one has been created for F&B España, Source Process = Negative stock correction, with a line for the second vendor receipt, and an amount = -5.00.
|
|
|
|
Test plan above verified.
Issue can be code reviewed and closed. |
|
|
(0093184)
|
hgbot
|
2017-01-04 15:17
|
|
Repository: erp/devel/pi
Changeset: e55d9bf9a2b7fad6c133630ded4c4c4ca8074909
Author: Rafael Queralta Pozo <rqueralta <at> nauta.cu>
Date: Fri Dec 23 10:39:36 2016 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/e55d9bf9a2b7fad6c133630ded4c4c4ca8074909 [^]
Fixes issue 34802: Unhomogeneous behavior in Cost Adjustments
Now when Cost Adjustment is created:
- In header, Organization field is filled with the "Legal" organization of the
transaction's organization
- Organization field is shown in Cost Adjustment Lines and filled with
transaction's organization
---
M src-db/database/sourcedata/AD_FIELD.xml
M src/org/openbravo/costing/CostAdjustmentUtils.java
---
|
|
|
|
|
|
|
|