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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0037033
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementmajoralways2017-10-09 13:232018-01-08 18:19
ReportermaiteView Statuspublic 
Assigned Tononofrancisco 
PriorityurgentResolutionfixedFixed in Version3.0PR18Q1
StatusclosedFix in branchFixed in SCM revisiona5064f422fe0
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

0037033: "Price Difference Correction" adjustment calculated when it should not

DescriptionAlthough no differences between order's price and invoice's price have been registered, process creates "Price Difference Correction" adjustment (because user could invoice same order twice)
Steps To Reproduce1. Register Purchase Order for "F&B España - Región Norte" and business partner "Bebidas Alegres, S.L."
2. Add line for "Cerveza Ale 0,5L" and qty=2. Process Order
3. Register Goods Receipt using "Create lines from" and selecting previous order line. Process receipt
4. Register Purchase Invoice using "Create lines from" and selecting previous order line. Leave it in Draft status
5. Register Purchase Invoice using "Create lines from" and selecting previous order line. Process invoice
6. Process invoice created in step 4)
7. Create new Preference "Enable automatic Price Difference Corrections" with value Y
8. Verify that next execution of "Costing Background process" finishes successfully
9. Access "Cerveza Ale 0,5L" product and realize that "Price Difference Correction" adjustment has been calculated when no difference between order's price and invoice's price has been registered
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0099858)
nonofrancisco (developer)
2017-10-10 19:41
edited on: 2017-10-11 15:11

Test Plan

1. Register Purchase Order for "F&B España - Región Norte" and business partner "Bebidas Alegres, S.L."
2. Add line for "Cerveza Ale 0,5L" and qty=2. Process Order
3. Register Goods Receipt using "Create lines from" and selecting previous order line. Process receipt
4. Register Purchase Invoice using "Create lines from" and selecting previous order line. Leave it in Draft status
5. Register Purchase Invoice using "Create lines from" and selecting previous order line. Process invoice
6. Process invoice created in step 4)
7. Create new Preference "Enable automatic Price Difference Corrections" with value Y
8. Verify that next execution of "Costing Background process" finishes successfully
9. Access "Cerveza Ale 0,5L" product and verify no cost adjustment has been calculated for the transaction

(0100006)
dmiguelez (developer)
2017-10-23 18:29
edited on: 2017-10-24 09:27

Test Plan

Go to Product Window and create a new Product
  - Organization: *
  - Search Key: TestCost
  - Name: TestCost
  - Other parameters with default values
Move to Price Tab and create a new record
  - Price List Version: Be Soft Drinker Price List
  - Unit Price: 10.00
  - List Price: 10.00
Create another record in the same Tab
  - Price List Version: General Sales
  - Unit Price: 10.00
  - List Price: 10.00

Go to Preference Window and create a new record:
  - Organization: *
  - Property: Enable automatic Price Difference Corrections
  - Vavlue: Y
  - Visibility fields: All empty

Test 1 (No Cost Adjustment):

1. Go to Purchase Order Window and create a new Purchase Order
  - Organization: F&B US
  - Business Partner: Be Soft Drinker
  - Other parameters with default values
Move to Lines Tab and create a new record
  - Product: TestCost
  - Ordered Quantity: 1
  - Other parameters with default values
Click on Book button to complete the Purchase Order

2. Go to Goods Receipt Window and create a new Goods Receipt
  - Organization: F&B US
  - Business Partner: Be Soft Drinker
  - Other parameters with default values
Click on Create Lines From button and select the Order previously created (select also any Bin available)
Click on Complete button to complete the Goods Receipt

3. Go to Purchase Invoice Window and create a new Purchase Invoice
  - Organization: F&B US
  - Business Partner: Be Soft Drinker
  - Other parameters with default values
Click on Create Lines From button and select the Order previously created
Do not complte the Invoice yet

Create another Purchase Invoice
  - Organization: F&B US
  - Business Partner: Be Soft Drinker
  - Other parameters with default values
Click on Create Lines From button and select the Order previously created

Complete the two Invoices previously created

4. Execute the Costing Background Process (from Process Request Window)

5. Move to Product Window || Transactions Tab
Check that the last transaction created has:
  - Trx Original Cost: 10.00
  - Total Cost: 10.00
  - Unit Cost: 10.00


Test 2 (Cost adjustment to increase cost):

1. Go to Purchase Order Window and create a new Purchase Order
  - Organization: F&B US
  - Business Partner: Be Soft Drinker
  - Other parameters with default values
Move to Lines Tab and create a new record
  - Product: TestCost
  - Ordered Quantity: 1
  - Other parameters with default values
Click on Book button to complete the Purchase Order

2. Go to Goods Receipt Window and create a new Goods Receipt
  - Organization: F&B US
  - Business Partner: Be Soft Drinker
  - Other parameters with default values
Click on Create Lines From button and select the Order previously created (select also any Bin available)
Click on Complete button to complete the Goods Receipt

3. Go to Purchase Invoice Window and create a new Purchase Invoice
  - Organization: F&B US
  - Business Partner: Be Soft Drinker
  - Other parameters with default values
Click on Create Lines From button and select the Order previously created
Do not complte the Invoice yet

Create another Purchase Invoice
  - Organization: F&B US
  - Business Partner: Be Soft Drinker
  - Other parameters with default values
Click on Create Lines From button and select the Order previously created
Select the line created and change the Net Unit Price to 20

Complete the two Invoices previously created

4. Execute the Costing Background Process (from Process Request Window)

5. Move to Product Window || Transactions Tab
Check that the last transaction created has:
  - Trx Original Cost: 10.00
  - Total Cost: 15.00
  - Unit Cost: 15.00

Test 3 (Cost adjustment to decrease cost):

1. Go to Purchase Order Window and create a new Purchase Order
  - Organization: F&B US
  - Business Partner: Be Soft Drinker
  - Other parameters with default values
Move to Lines Tab and create a new record
  - Product: TestCost
  - Ordered Quantity: 1
  - Other parameters with default values
Click on Book button to complete the Purchase Order

2. Go to Goods Receipt Window and create a new Goods Receipt
  - Organization: F&B US
  - Business Partner: Be Soft Drinker
  - Other parameters with default values
Click on Create Lines From button and select the Order previously created (select also any Bin available)
Click on Complete button to complete the Goods Receipt

3. Go to Purchase Invoice Window and create a new Purchase Invoice
  - Organization: F&B US
  - Business Partner: Be Soft Drinker
  - Other parameters with default values
Click on Create Lines From button and select the Order previously created
Do not complte the Invoice yet

Create another Purchase Invoice
  - Organization: F&B US
  - Business Partner: Be Soft Drinker
  - Other parameters with default values
Click on Create Lines From button and select the Order previously created
Select the line created and change the Net Unit Price to 5

Complete the two Invoices previously created

4. Execute the Costing Background Process (from Process Request Window)

5. Move to Product Window || Transactions Tab
Check that the last transaction created has:
  - Trx Original Cost: 10.00
  - Total Cost: 7.50
  - Unit Cost: 7.50

Test 4 (Cost adjustment to increase cost with receipt partially invoiced):

1. Go to Purchase Order Window and create a new Purchase Order
  - Organization: F&B US
  - Business Partner: Be Soft Drinker
  - Other parameters with default values
Move to Lines Tab and create a new record
  - Product: TestCost
  - Ordered Quantity: 2
  - Other parameters with default values
Click on Book button to complete the Purchase Order

2. Go to Goods Receipt Window and create a new Goods Receipt
  - Organization: F&B US
  - Business Partner: Be Soft Drinker
  - Other parameters with default values
Click on Create Lines From button and select the Order previously created (select also any Bin available)
Click on Complete button to complete the Goods Receipt

3. Go to Purchase Invoice Window and create a new Purchase Invoice
  - Organization: F&B US
  - Business Partner: Be Soft Drinker
  - Other parameters with default values
Click on Create Lines From button and select the Order previously created
Select the created line and change:
  - Invoiced Quantity: 1
  - Net Unit Price: 11
Complete the Purchase Invoice

4. Execute the Costing Background Process (from Process Request Window)

5. Move to Product Window || Transactions Tab
Check that the last transaction created has:
  - Trx Original Cost: 20.00
  - Total Cost: 21.00
  - Unit Cost: 21.00

Test 5 (Cost adjustment to decrease cost with receipt partially invoiced):

1. Go to Purchase Order Window and create a new Purchase Order
  - Organization: F&B US
  - Business Partner: Be Soft Drinker
  - Other parameters with default values
Move to Lines Tab and create a new record
  - Product: TestCost
  - Ordered Quantity: 2
  - Other parameters with default values
Click on Book button to complete the Purchase Order

2. Go to Goods Receipt Window and create a new Goods Receipt
  - Organization: F&B US
  - Business Partner: Be Soft Drinker
  - Other parameters with default values
Click on Create Lines From button and select the Order previously created (select also any Bin available)
Click on Complete button to complete the Goods Receipt

3. Go to Purchase Invoice Window and create a new Purchase Invoice
  - Organization: F&B US
  - Business Partner: Be Soft Drinker
  - Other parameters with default values
Click on Create Lines From button and select the Order previously created
Select the created line and change:
  - Invoiced Quantity: 1
  - Net Unit Price: 9
Complete the Purchase Invoice

4. Execute the Costing Background Process (from Process Request Window)

5. Move to Product Window || Transactions Tab
Check that the last transaction created has:
  - Trx Original Cost: 20.00
  - Total Cost: 19.00
  - Unit Cost: 19.00

(0100011)
hgbot (developer)
2017-10-24 09:29

Repository: erp/devel/pi
Changeset: a5064f422fe0001ff4f12b5e7c054a2965a0667e
Author: Nono Carballo <nonofce <at> gmail.com>
Date: Mon Oct 23 17:40:09 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a5064f422fe0001ff4f12b5e7c054a2965a0667e [^]

Fixes issue 37033: "Price Difference Correction" adjustment calculated when it
should not

Cost adjustment is created just if expected unitary cost excedes transaction
unitary cost.

---
M src/org/openbravo/costing/PriceDifferenceProcess.java
---
(0100012)
hgbot (developer)
2017-10-24 09:29

Repository: erp/devel/pi
Changeset: 68b79a76a32d36bc1743cb8d8773b69be1c0aa8a
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Oct 24 09:12:56 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/68b79a76a32d36bc1743cb8d8773b69be1c0aa8a [^]

Related to Issue 37033. Code Review changes

* Take into account correct quantity when calculating the expected unit cost
* Use correct quantity to calculate Transaction Cost Difference

---
M src/org/openbravo/costing/PriceDifferenceProcess.java
---
(0100013)
dmiguelez (developer)
2017-10-24 09:29

Code Review + Testing Ok
(0100376)
hgbot (developer)
2017-11-09 11:11

Repository: erp/devel/pi
Changeset: f4ae897ed38c53ca6a8b4c3707fce8489fa43408
Author: Nono Carballo <nonofce <at> gmail.com>
Date: Wed Nov 08 11:51:54 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/f4ae897ed38c53ca6a8b4c3707fce8489fa43408 [^]

Related to Issue 37033. Added automated test cases

---
M src-test/src/org/openbravo/test/costing/TestCosting.java
A src-test/src/org/openbravo/test/costing/TestCostingUtils.java
---
(0101341)
hudsonbot (developer)
2018-01-03 12:38

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/c81e0d3cbab5 [^]
Maturity status: Test
(0101342)
hudsonbot (developer)
2018-01-03 12:38

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/c81e0d3cbab5 [^]
Maturity status: Test
(0101390)
hudsonbot (developer)
2018-01-03 12:38

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/c81e0d3cbab5 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2017-10-09 13:23 maite New Issue
2017-10-09 13:23 maite Assigned To => Triage Finance
2017-10-09 13:23 maite Modules => Core
2017-10-09 13:23 maite Resolution time => 1509318000
2017-10-09 13:23 maite Triggers an Emergency Pack => No
2017-10-09 13:24 maite Issue Monitored: networkb
2017-10-09 13:57 Practics Issue Monitored: Practics
2017-10-09 19:51 nonofrancisco Assigned To Triage Finance => nonofrancisco
2017-10-09 19:56 nonofrancisco Status new => scheduled
2017-10-10 19:41 nonofrancisco Note Added: 0099858
2017-10-10 19:41 nonofrancisco Note Edited: 0099858 View Revisions
2017-10-11 15:11 nonofrancisco Note Edited: 0099858 View Revisions
2017-10-23 18:29 dmiguelez Note Added: 0100006
2017-10-23 18:38 dmiguelez Note Edited: 0100006 View Revisions
2017-10-24 09:27 dmiguelez Note Edited: 0100006 View Revisions
2017-10-24 09:29 hgbot Checkin
2017-10-24 09:29 hgbot Note Added: 0100011
2017-10-24 09:29 hgbot Status scheduled => resolved
2017-10-24 09:29 hgbot Resolution open => fixed
2017-10-24 09:29 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a5064f422fe0001ff4f12b5e7c054a2965a0667e [^]
2017-10-24 09:29 hgbot Checkin
2017-10-24 09:29 hgbot Note Added: 0100012
2017-10-24 09:29 dmiguelez Review Assigned To => dmiguelez
2017-10-24 09:29 dmiguelez Note Added: 0100013
2017-10-24 09:29 dmiguelez Status resolved => closed
2017-11-09 11:11 hgbot Checkin
2017-11-09 11:11 hgbot Note Added: 0100376
2018-01-03 12:38 hudsonbot Checkin
2018-01-03 12:38 hudsonbot Note Added: 0101341
2018-01-03 12:38 hudsonbot Checkin
2018-01-03 12:38 hudsonbot Note Added: 0101342
2018-01-03 12:38 hudsonbot Checkin
2018-01-03 12:38 hudsonbot Note Added: 0101390
2018-01-08 18:19 dmiguelez Fixed in Version => 3.0PR18Q1


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker