Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029735Openbravo ERP04. Warehouse managementpublic2015-04-28 16:392015-05-04 12:13
VictorVillar 
aferraz 
urgentmajoralways
closedfixed 
5
pi 
3.0PR15Q23.0PR15Q2 
umartirena
Core
No
0029735: Wrong accounting of the cost adjusment lines under some circumstancies (Goods Movement)
Wrong accounting of the cost adjusment lines under some circumstancies (Goods Movement)
As group Admin role,
  Go to Product window:
    create a new one
    Name: test
  Add a purchase Price list: Tarifa bebidas
  unit/list price: 5

Costing Rule assigned to the organization should be "Average".

Go to Purchase Order:
   Create a new one for this product: qty: 10
Complete it.
Go to Goods receipt window,
  Create the lines from the Purchase Order created before.
  Storage Bin: RN- 2-0-0
Complete it.

Go to Goods movement,
  create a new one with this product.
  From: RN-2-0-0
  to: RN-0-0-0
Complete it

Go to Product window:
  create a new one
  Type: service
  name: transport
 Accounting tab:
Asset Account : 62400 Transportes
Product Expense : 62400 Transportes


Go to Landed Cost Type document:
 select the Distribution by Amount algorithm
 select the product: Transport


Create a landed cost document --> Cost 20 assigned to the Goods Receipt created before. Process it

Launch the Costing Background process and realise that the transactions have been calculted.

Go to Cost Adjustment document and Post it.
The entries posted are the ones related to the Goods Movement transaction which needs also to be adjusted.

Realise that the journal entry is:

35000 Productos terminados A Debit: 40.00
61000 Variación de existencias de mercaderías Credit: 40.00

That is wrong, as the net effect of the adjustment accounting should be 0.

Therefore correct posting should be:

(1) In the case of NOT allowing Negative Posting.

The journal entry for the Movement From transaction must be:

61000 Variación de existencias de mercaderías Debit: 20.00
35000 Productos terminados A Credit: 20.00

The journal entry for the 'Movement To' transaction must be:

35000 Productos terminados A Debit: 20.00
61000 Variación de existencias de mercaderías Credit: 20.00

(2) In the case of allowing Negative Posting.

The journal entry for the Movement From transaction must be:

35000 Productos terminados A Debit: -20.00
61000 Variación de existencias de mercaderías Credit: -20.00

The journal entry for the 'Movement To' transaction must be:

35000 Productos terminados A Debit: 20.00
61000 Variación de existencias de mercaderías Credit: 20.00
Approved
blocks defect 00297203.0PR15Q3 closed aferraz Wrong accounting of the cost adjusment lines under some circumstancies (Goods Movement) 
Issue History
2015-04-29 14:25aferrazTypedefect => backport
2015-04-29 14:25aferrazTarget Version3.0PR15Q3 => 3.0PR15Q2.1
2015-04-30 14:08dmitry_mezentsevTag Attached: Approved
2015-05-04 10:18umartirenaTarget Version3.0PR15Q2.1 => 3.0PR15Q2
2015-05-04 12:12hgbotCheckin
2015-05-04 12:12hgbotNote Added: 0076929
2015-05-04 12:12hgbotStatusscheduled => resolved
2015-05-04 12:12hgbotResolutionopen => fixed
2015-05-04 12:12hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR15Q2/rev/d593b9e93b662cc5de64c26cf5bfb38c98805bd2 [^]
2015-05-04 12:12hgbotCheckin
2015-05-04 12:12hgbotNote Added: 0076930
2015-05-04 12:13umartirenaReview Assigned To => umartirena
2015-05-04 12:13umartirenaNote Added: 0076931
2015-05-04 12:13umartirenaStatusresolved => closed
2015-05-04 12:13umartirenaFixed in Version => 3.0PR15Q2

Notes
(0076929)
hgbot   
2015-05-04 12:12   
Repository: erp/backports/3.0PR15Q2
Changeset: d593b9e93b662cc5de64c26cf5bfb38c98805bd2
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Apr 29 13:56:15 2015 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q2/rev/d593b9e93b662cc5de64c26cf5bfb38c98805bd2 [^]

Fixes issue 29735: Wrong accounting in Cost Adjusment

Wrong accounting of the cost adjusment lines in case of Goods Movement From.
In this case, accounting should consider negative amounts, in order to have a net effect of the goods movement adjustment accounting as 0.

---
M src/org/openbravo/erpCommon/ad_forms/DocCostAdjustment.java
---
(0076930)
hgbot   
2015-05-04 12:12   
Repository: erp/backports/3.0PR15Q2
Changeset: f30b59323b06148189262f5eaa4cf8b79901ec39
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Apr 29 16:35:18 2015 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q2/rev/f30b59323b06148189262f5eaa4cf8b79901ec39 [^]

Related to issue 29735: Modify TestCosting tests

Modify GM11, GM12, GM13 and GM5 tests, where cost adjustments from goods movements are created, to update accounting amounts

---
M src-test/src/org/openbravo/test/costing/TestCosting.java
---
(0076931)
umartirena   
2015-05-04 12:13   
Code Review + Testing OK