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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0027879
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementmajoralways2014-10-15 16:212014-10-28 10:38
ReporterpsanjuanView Statuspublic 
Assigned Toumartirena 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisioncf6c89b67300
ProjectionnoneETAnoneTarget Version
OSLinux 32 bitDatabaseOracleJava version1.6
OS VersionUbuntu 8.04.1Database version11.1.0.6.0Ant version1.7.0
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0027879: Inventory Amount seems to be creating wrong calculated backdated transactions

DescriptionInventory Amount seems to be creating wrong calculated backdated transactions
Steps To ReproduceSelect QA Testing client.
Make sure you have a costing rule pointing to an Average costing rule.
Costing rule needs also to have enabled "Fixed Backdated Transactions" check.

Go to Product window and create a new product named Costing F2.
Go to lines tab, select "Purchase" price list and enter a unit/list price of 1230.

Go to purchase order and create a new one for Spain org and the product just created. Go to lines tab and enter 185 units. Book the order.

Go to goods receipt and create a new one dated on a later date than the order. Create receipt lines from the order. Complete.

Go to Process Request window and execute costing background process.

Go to back to the receipt and post it. Realize that value posted to the ledger is 227550 (185*1230)

Go to Goods Shipment window and create a new one for Spain org and the product. Goods shipment date needs to be after receipt date.
 
Ship an amount of 85 units. Complete.

Go to Process Request window and execute costing background process.

Go to back to the shipment and post it. Realize that value posted to the ledger is 104550 (85*1230)

Go to Inventory Amount Update window and create a new one dated before the shipment and after the receipt.

Go to lines and enter same reference date as the one enter in the header. Select the product (Costing F2) and realize that Openbravo shows below values:

- Current inventory amount = 227550
- On hand qty = 185

Enter 1200 in the field "Unit Cost", therefore Inventory Amount field is automatically populated with a value of 222000

Process Inventory Amount Update.

Go to Process Request window and execute costing background process.

Back to Inventory Amount Update window realize that a closing and an opening inventory have been created in "Inventories" tab. Navigate to closing one and post it.

Posting would look like:
Debit: Inventory Loss 227550
Credit: Product Asset 227550

Navigate to Opening one and post it. Posting would look like:
Debit: Product Asset 222000
Credit: Inventory Loss 222000

Navigate to Cost Adjustment window and realize that two backdated transactions cost adjustments have been created.

First one adjust closing inventory (I+ -185) by removing total current inventory value. Adjustment Amount is -227550.

(I think the adjustment amount of this transaction should be 0,00 because otherwise we get into a double posting:

Closing inventory posting = Backdated transaction posting
Debit: Inventory Loss 227550
Credit: Product Asset 227550)

Second one adjust:
- opening inventory (I+ 185) for an 0 adjustment, as opening inventory has already increased inventory by new inventory amount value 222000
- and the shipment (C -85), however this adjustment is not correct.

Adjusted amount is 102000. This is not correct.

Navigate to product window, search by the product and go to Costing tab. Realize that new cost shown is not 1200 but the sum of 1200+1230)2430

 
Proposed SolutionAdjusted amount should be the difference between 85*1200 and 85*1230 = 2550

New costing should be 1200

TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0071171)
hgbot (developer)
2014-10-24 14:05

Repository: erp/devel/pi
Changeset: cf6c89b67300b9aa326ee675fac42153b1e347c2
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Fri Oct 24 14:05:00 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/cf6c89b67300b9aa326ee675fac42153b1e347c2 [^]

Fixed 27879.Properly calculate adj amount on backdated inventory amt update.

3 changes have been applied to fix the issue:
- Consider the possibility of having average costing not related to
  transactions.
- Properly calculate the adjustment amount of closing inventories. The transaction
  that is being adjusted is already calculated and included in the
  currentBalanceAmount so no need to compare against it.
- It was checking the fix backdated transactions flag using the fix backdated
  transactions process button property instead of the flag's property.

---
M src/org/openbravo/costing/AverageCostAdjustment.java
M src/org/openbravo/costing/CostingAlgorithmAdjustmentImp.java
M src/org/openbravo/costing/InventoryAmountUpdateProcess.java
---
(0071212)
psanjuan (manager)
2014-10-28 10:38

Verified it is now working properly

- Issue History
Date Modified Username Field Change
2014-10-15 16:21 psanjuan New Issue
2014-10-15 16:21 psanjuan Assigned To => dmiguelez
2014-10-15 16:21 psanjuan Modules => Core
2014-10-15 16:21 psanjuan Triggers an Emergency Pack => No
2014-10-15 16:27 psanjuan Steps to Reproduce Updated View Revisions
2014-10-15 16:35 psanjuan Steps to Reproduce Updated View Revisions
2014-10-15 16:35 psanjuan Proposed Solution updated
2014-10-15 16:50 psanjuan Steps to Reproduce Updated View Revisions
2014-10-24 08:57 psanjuan Assigned To dmiguelez => umartirena
2014-10-24 14:05 hgbot Checkin
2014-10-24 14:05 hgbot Note Added: 0071171
2014-10-24 14:05 hgbot Status new => resolved
2014-10-24 14:05 hgbot Resolution open => fixed
2014-10-24 14:05 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/cf6c89b67300b9aa326ee675fac42153b1e347c2 [^]
2014-10-28 10:38 psanjuan Note Added: 0071212
2014-10-28 10:38 psanjuan Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker