Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029728Openbravo ERP04. Warehouse managementpublic2015-04-29 09:152015-08-20 23:16
psanjuan 
aferraz 
urgentmajoralways
closedfixed 
20Ubuntu 8.04.1
 
 
vmromanos
Core
No
0029728: Purchase price differences need to be post to a PPV account for products valued at "Standard" cost
Purchase price differences need to be post to a PPV account for products valued at "Standard" cost
Work within an Organization that has an "Standard" Costing rule.

Create a product named "Product Price Correction Standard".
Add a purchase price list and enter a purchase price of 100.00 Unit Price=List Price.
Go to Costing tab and enter a new record.
Starting date: 01/01/2015
ending date 31/12/9999
Cost type: Standard
Cost = 100
Manual = Yes

Create a purchase order for this product of 5 units. Book the order.

Go to Goods Receipt window and create a new receipt for the previous order.
Complete it. Run Costing Background. Post it.

Posting looks like:

500 (3500) Product Asset - Debit
500 (4009) Non-Invoiced Receipts - Credit

Go to Goods Shipment window and ship 1 unit of this product. Complete it. Run Costing Background. Post it.

Posting looks like:
100 (9990) Cost of Goods Sold - Debit
100 (3500) Product Asset - Credit

Go to product window, transaction tab and realize that Goods Receipt transaction cost is 500.00. Goods Shipment transaction cost is 100.00.
This is correct.

Go to purchase invoice window and create a new invoice for a vendor by selecting either the order or the receipt previously created.

Navigate to Lines tab and change the price to 150.00. Complete and post the invoice.

Run Costing Background. Run Price Correction.

Navigate to "Matched Invoice" window and realize that a transaction related to this product is created. Post it.

Matched Invoice posting looks like:

500.00 (4090) Non-Invoiced Receipts - Debit
250.00 (9904) Invoice Price Variance - Debit
750.00 (6000) Product Expense - Credit

A purchase price difference cost adjustment is created for the goods receipt of 25 (5 units x 5€/unit). This purchase price difference now is handle as a cost adjustment which can be posted affecting inventory value/accounting of the product which it is not correct, as the "Standard Cost" of the product remains as 100.00 which is correct.

Purchase Price difference adjustment current posting looks like:

250.00 (35000) Product Asset - Debit
205.00 (99904) Invoice Price Difference - Credit.

This is not correct, product asset account should not be used.

Value Stock Report is also not correct because it shows below info:
Product : Product Price Correction Standard
Quantity: 4
Average Cost : 106.25 (525-100/4) - this is not correct. It should be 100.00
Valuation: 425 (106.25*4) - this is not correct. It should be 400.00
See issue 29731



In the case of products valued at "Standard" cost:

(1) Matched Invoice posting can also point to the "Invoice Price Variance" (please check as it seems there is another account do not shown in the UI, named "Product Price Variance" or something similar), therefore Matched Invoice posting would look like shown below:

500.00 (4090) Non-Invoiced Receipts - Debit
250.00 (XXXX) Invoice Price Variance - Debit
750.00 (6000) Product Expense - Credit

(2) Purchase price differences must not trigger any cost adjustment, therefore the amount of the Invoice Price Variance account is not moved to the product asset account. Besides that both the "Total Cost" and the "Unit Cost" of the transaction remains the same as the "Trx Original Cost" (Standard Cost * nº units).
No tags attached.
related to defect 0029723 closed aferraz Landed Cost differences must not trigger a cost adjustment and need to be post to a "LCV" for products valued at Standard Cost. 
blocks defect 0029729 closed aferraz Differences between actual cost and standard cost (variances) should not trigger Cost Adjustments. 
Issue History
2015-04-29 09:15psanjuanNew Issue
2015-04-29 09:15psanjuanAssigned To => Triage Finance
2015-04-29 09:15psanjuanModules => Core
2015-04-29 09:15psanjuanTriggers an Emergency Pack => No
2015-04-29 11:51psanjuanRelationship addedrelated to 0029723
2015-04-29 12:02psanjuanRelationship addedcaused by 0029729
2015-04-29 12:43psanjuanSummary[Cost Adjutments] - Purchase price differences must be post to a "PPV" instead of an "Asset" account for Standard Cost. => [Cost Adjutments] - Purchase price differences must be post to a "PPV" acount instead of an "Asset" account for Standard Cost.
2015-04-29 12:43psanjuanDescription Updatedbug_revision_view_page.php?rev_id=8381#r8381
2015-04-29 12:43psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8383#r8383
2015-04-29 12:43psanjuanProposed Solution updated
2015-04-29 12:49psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8384#r8384
2015-04-29 12:50psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8385#r8385
2015-04-30 14:29psanjuanSummary[Cost Adjutments] - Purchase price differences must be post to a "PPV" acount instead of an "Asset" account for Standard Cost. => Purchase price differences must not trigger a cost adjustment and need to be posted to a PPV account.
2015-04-30 14:29psanjuanDescription Updatedbug_revision_view_page.php?rev_id=8414#r8414
2015-04-30 14:29psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8415#r8415
2015-04-30 14:29psanjuanProposed Solution updated
2015-04-30 14:30psanjuanSummaryPurchase price differences must not trigger a cost adjustment and need to be posted to a PPV account. => Purchase price differences must not trigger a cost adjustment and need to be post to a PPV account.
2015-04-30 14:30psanjuanDescription Updatedbug_revision_view_page.php?rev_id=8416#r8416
2015-04-30 14:33psanjuanSummaryPurchase price differences must not trigger a cost adjustment and need to be post to a PPV account. => Purchase price differences must not trigger a cost adjustment and need to be post to a PPV account for products valued at "Stand
2015-04-30 14:33psanjuanDescription Updatedbug_revision_view_page.php?rev_id=8418#r8418
2015-05-04 12:30dmitry_mezentsevRelationship replacedblocks 0029729
2015-05-29 14:34psanjuanProposed Solution updated
2015-05-29 14:34psanjuanProposed Solution updated
2015-05-29 14:48psanjuanSummaryPurchase price differences must not trigger a cost adjustment and need to be post to a PPV account for products valued at "Stand => Purchase price differences need to be post to a PPV account for products valued at "Standard" cost
2015-05-29 14:48psanjuanDescription Updatedbug_revision_view_page.php?rev_id=8714#r8714
2015-05-29 14:50psanjuanProposed Solution updated
2015-06-11 17:35aferrazAssigned ToTriage Finance => aferraz
2015-06-29 15:44psanjuanNote Added: 0078563
2015-07-02 17:09aferrazSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8970#r8970
2015-07-06 14:06psanjuanNote Added: 0078676
2015-07-06 14:14psanjuanNote Edited: 0078676bug_revision_view_page.php?bugnote_id=0078676#r8985
2015-07-06 15:47vmromanosStatusnew => scheduled
2015-07-06 15:56hgbotCheckin
2015-07-06 15:56hgbotNote Added: 0078680
2015-07-06 15:56hgbotStatusscheduled => resolved
2015-07-06 15:56hgbotResolutionopen => fixed
2015-07-06 15:56hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b45cf0559789653c61099068e3954a76a3bec0b5 [^]
2015-07-06 15:58vmromanosReview Assigned To => vmromanos
2015-07-06 15:58vmromanosStatusresolved => closed
2015-08-20 23:16hudsonbotCheckin
2015-08-20 23:16hudsonbotNote Added: 0079476

Notes
(0078563)
psanjuan   
2015-06-29 15:44   
After running this scenario:
(1) Matched invoice posting is as described in the proposed solution above.
(2) No Cost adjustment is created
(3) However the Total Cost and the Unit Cost of the Vendor Receipt transaction has changed to 750.00. This is not correct as it should be 500.00. Please check.
(0078676)
psanjuan   
2015-07-06 14:06   
(edited on: 2015-07-06 14:14)
Point (3) above verified it is now workig ok. total cost and unit cost of vendor receipt transaction has not changed.

Also verified it is working properly while changing the price in the purchase order. No cost adjustment is created. Product Cost does not change, same as total cost/unit cost of the corresponding transaction.

Matched invoice posting correct.

(0078680)
hgbot   
2015-07-06 15:56   
Repository: erp/devel/pi
Changeset: b45cf0559789653c61099068e3954a76a3bec0b5
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Jul 02 15:12:55 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b45cf0559789653c61099068e3954a76a3bec0b5 [^]

Fixes issue 29729 & Fixes issue 29702 & Fixes issue 29728

Cost Adjustments will not be created in transactions calculated with Standard Algorithm.

---
M src/org/openbravo/costing/CostingServer.java
M src/org/openbravo/costing/PriceDifferenceProcess.java
---
(0079476)
hudsonbot   
2015-08-20 23:16   
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/8c91718397a5 [^]
Maturity status: Test