Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0010751Openbravo ERP04. Warehouse managementpublic2009-09-24 17:442009-10-13 08:36
networkb 
gorkaion 
highminoralways
closedfixed 
5
2.40MP6 
2.40MP112.40MP10 
Core
No
0010751: Generate average cost does not calculate properly end date
End dates are not properly calculated when generate average cost is executed.

In our scenario a permanent cost is introduced. Then a purchase order + good receipt is created. After executing it, end dates are the same.

Also it happens if more purchase orders + good receipts are created.

Please, see attached file
Go to Master Data Management > Product. Create a new one and select Average as Cost type.
Go to Costing tab and generate a new record. Select Permanent, and Manual.
Enter as Starting date, quantity and price.
Go to Procurement management > Transactions > Purchase Order. Create a new one with this product. Process it.
Go to Procurement management > Transactions > Good Receipt. Create a new one with same partner. Use "Create lines from" button to enter its lines. Select the previous Order to select it line.
Complete it.
Go to Warehouse Management > Transactions > Generate average cost. Execute it.
Go back to Costing tab, in Product window. See end dates. They are wrong.
No tags attached.
blocks defect 00107492.40MP11 closed gorkaion Generate average cost does not calculate properly end date 
Issue History
2009-09-24 18:04psarobeTypedefect => backport
2009-09-24 18:04psarobefix_in_branch => 2.40
2009-09-24 18:04psarobeAssigned Torafaroda => gorkaion
2009-09-25 07:05rafarodaPriorityimmediate => high
2009-09-25 10:46hgbotCheckin
2009-09-25 10:46hgbotNote Added: 0020359
2009-09-25 10:46hgbotStatusscheduled => resolved
2009-09-25 10:46hgbotResolutionopen => fixed
2009-09-25 10:46hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.40/rev/6ae5e961fe01ee7eb9759777d3f26f6c86c05c50 [^]
2009-09-29 12:02hgbotCheckin
2009-09-29 12:02hgbotNote Added: 0020446
2009-09-29 12:02hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/stable/2.40/rev/6ae5e961fe01ee7eb9759777d3f26f6c86c05c50 [^] => http://code.openbravo.com/erp/stable/2.40_pageddatagrid/rev/6ae5e961fe01ee7eb9759777d3f26f6c86c05c50 [^]
2009-10-13 08:36sureshbabuStatusresolved => closed
2009-10-13 08:36sureshbabuNote Added: 0020954
2009-10-13 08:36sureshbabuFixed in Version => 2.40MP10

Notes
(0020359)
hgbot   
2009-09-25 10:46   
Repository: erp/stable/2.40
Changeset: 6ae5e961fe01ee7eb9759777d3f26f6c86c05c50
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Fri Sep 25 10:45:49 2009 +0200
URL: http://code.openbravo.com/erp/stable/2.40/rev/6ae5e961fe01ee7eb9759777d3f26f6c86c05c50 [^]

Fixed issue 10751. Changed the initial dateTo calculation.

---
M src-db/database/model/functions/GENERATE_AVERAGE_COSTS.xml
---
(0020446)
hgbot   
2009-09-29 12:02   
Repository: erp/stable/2.40_pageddatagrid
Changeset: 6ae5e961fe01ee7eb9759777d3f26f6c86c05c50
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Fri Sep 25 10:45:49 2009 +0200
URL: http://code.openbravo.com/erp/stable/2.40_pageddatagrid/rev/6ae5e961fe01ee7eb9759777d3f26f6c86c05c50 [^]

Fixed issue 10751. Changed the initial dateTo calculation.

---
M src-db/database/model/functions/GENERATE_AVERAGE_COSTS.xml
---
(0020954)
sureshbabu   
2009-10-13 08:36   
'31-12-9999' -appears in the ending date field.(tested working fine)