Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0015007Openbravo ERP04. Warehouse managementpublic2010-10-25 08:342010-12-09 16:07
networkb 
adrianromero 
urgentmajoralways
closedno change required 
20Community Appliance
2.50MP22 
2.50MP25 
Core
No
0015007: the accounting of shipments don't obtain the correct costs per organization
if you have several costs in same dates, with diferent organizations, the accounting of shipments obtains the cost of the last line created, independently of organization
1) Create a generic organization A as a child to a legal with accounting organization MAIN.
2) Create a warehouse A and storage bin A1 within organization A.
3) Create a generic organization B as a child to a legal with accounting organization MAIN.
4) Create a warehouse B and storage bin B1 within organization B.
5) Activate shipment table to accounting:
Financial Management || Accounting || Setup || Accounting Schema || Accounting Schema >> Account Schema Tables
 MaterialMgmtShipmentInOut -> Active ='Y'
6) create new product (A) with cost type average, and add to price list
7) create 2 new costs manually to product A:
Master Data Management || Product || Product >> Costing
 create two lines:
  7.1 org A- cost 10- permanent & fixed=Y- qty=1 -qty mov=1 -date from=01/12/2010 date To=31/12/9999
  7.2 org B- cost 20- permanent & fixed=Y- qty=1 -qty mov=1 -date from=01/12/2010 date To=31/12/9999

8) Generate good shipment:
 Sales Management || Transactions || Goods Shipment || Header
   Date trx and date account 15/12/2010 - organization b
 Sales Management || Transactions || Goods Shipment || Lines
   product A - wharehouse B - qty 1
 process and post

the cost to accounting is 10, and it should be 20
No tags attached.
related to design defect 0012346 closed gorkaion Generate Average Costs per Organization 
related to backport 00150702.50MP25 closed adrianromero Generate Average Costs per Organization 
diff avgcostsbyorg.diff (23,156) 2010-11-08 18:29
https://issues.openbravo.com/file_download.php?file_id=3305&type=bug
Issue History
2010-10-25 08:34networkbNew Issue
2010-10-25 08:34networkbAssigned To => adrianromero
2010-10-25 08:35networkbRelationship addedrelated to 0012346
2010-10-28 15:16networkbTarget Version2.50MP24 => 2.50MP25
2010-11-08 18:29adrianromeroRelationship addedrelated to 0015070
2010-11-08 18:29adrianromeroFile Added: avgcostsbyorg.diff
2010-11-08 18:29adrianromeroNote Added: 0032483
2010-11-10 16:51adrianromeroStatusnew => closed
2010-11-10 16:51adrianromeroResolutionopen => no change required
2010-12-09 16:07anonymoussf_bug_id0 => 3133529

Notes
(0032483)
adrianromero   
2010-11-08 18:29   
Openbravo ERP always calculate costs by client, not by organization. The attached diff adds a new cost option that allows to calculate costs by organization. This diff is part of the ongoing project http://wiki.openbravo.com/wiki/Projects/Org_based_avg_costing [^] but that will not be merged into the main branch until finished.

In the mean time, the attached diff does the job.