Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029720Openbravo ERP04. Warehouse managementpublic2015-04-28 16:392015-05-07 22:17
VictorVillar 
aferraz 
urgentmajoralways
closedfixed 
5
pi 
3.0PR15Q3pi 
umartirena
Core
No
0029720: 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
No tags attached.
depends on backport 00297353.0PR15Q2 closed aferraz Wrong accounting of the cost adjusment lines under some circumstancies (Goods Movement) 
depends on backport 00297363.0PR15Q1.4 closed aferraz Wrong accounting of the cost adjusment lines under some circumstancies (Goods Movement) 
Issue History
2015-04-28 16:39VictorVillarNew Issue
2015-04-28 16:39VictorVillarAssigned To => Triage Finance
2015-04-28 16:39VictorVillarModules => Core
2015-04-28 16:39VictorVillarResolution time => 1433282400
2015-04-28 16:39VictorVillarTriggers an Emergency Pack => No
2015-04-28 16:39VictorVillarIssue Monitored: networkb
2015-04-28 16:40VictorVillarAssigned ToTriage Finance => psanjuan
2015-04-28 16:59VictorVillarTarget Version => 3.0PR15Q3
2015-04-28 17:20VictorVillarSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8363#r8363
2015-04-28 17:26aferrazAssigned Topsanjuan => aferraz
2015-04-29 01:37eintelauIssue Monitored: eintelau
2015-04-29 08:41psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8366#r8366
2015-04-29 08:41psanjuanProposed Solution updated
2015-04-29 09:35psanjuanSummaryWrong accounting of the cost adjusment lines under some circumstancies => Wrong accounting of the cost adjusment lines under some circumstancies (Goods Movement)
2015-04-29 09:35psanjuanDescription Updatedbug_revision_view_page.php?rev_id=8368#r8368
2015-04-29 11:06psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8369#r8369
2015-04-29 12:55psanjuanProposed Solution updated
2015-04-29 14:25aferrazStatusnew => scheduled
2015-04-30 12:09hgbotCheckin
2015-04-30 12:09hgbotNote Added: 0076908
2015-04-30 12:09hgbotStatusscheduled => resolved
2015-04-30 12:09hgbotResolutionopen => fixed
2015-04-30 12:09hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5665f6599a48fb0c83729b309d29c13221324f3e [^]
2015-04-30 12:09hgbotCheckin
2015-04-30 12:09hgbotNote Added: 0076909
2015-04-30 13:14umartirenaReview Assigned To => umartirena
2015-04-30 13:14umartirenaNote Added: 0076913
2015-04-30 13:14umartirenaStatusresolved => closed
2015-04-30 13:14umartirenaFixed in Version => pi
2015-05-07 22:17hudsonbotCheckin
2015-05-07 22:17hudsonbotNote Added: 0077190
2015-05-07 22:17hudsonbotCheckin
2015-05-07 22:17hudsonbotNote Added: 0077191

Notes
(0076908)
hgbot   
2015-04-30 12:09   
Repository: erp/devel/pi
Changeset: 5665f6599a48fb0c83729b309d29c13221324f3e
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Apr 29 13:56:15 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/5665f6599a48fb0c83729b309d29c13221324f3e [^]

Fixes issue 29720: 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
---
(0076909)
hgbot   
2015-04-30 12:09   
Repository: erp/devel/pi
Changeset: bb4b37bb475e97ef7c8f422ca8b78651475f05e6
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Apr 29 16:35:18 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/bb4b37bb475e97ef7c8f422ca8b78651475f05e6 [^]

Related to issue 29720: 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
---
(0076913)
umartirena   
2015-04-30 13:14   
Code Review + Testing OK.

Backport to Q2.1 needs to be closed, waiting to the repo be ready.
(0077190)
hudsonbot   
2015-05-07 22:17   
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/a1817f84bd8b [^]
Maturity status: Test
(0077191)
hudsonbot   
2015-05-07 22:17   
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/a1817f84bd8b [^]
Maturity status: Test