Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0037183Openbravo ERP04. Warehouse managementpublic2017-10-27 13:472018-01-30 14:38
ngarcia 
collazoandy4 
urgentmajoralways
closedfixed 
5
 
3.0PR18Q1 
dmiguelez
Core
No
0037183: Wrong cost adjustment made to a transaction related with a return shipment line
Wrong cost adjustment made to a transaction related with a return shipment line
As group admin role:
   Create a new product
   Add a purchase price list of 0.79
   Create a purchase order of 6300 units
   Create the related goods receipt
   Create a goods shipment of 45 units
   Create another goods shipment of 1 unit
   Create a Return From Customer and Return Material Receipt to return the 45 units of the first shipment

   Launch the costing background process and check the transaction costs have been calculated with a cost of 0.79. This is correct

   Go to Product - Transactions tab and create a Manual Cost Adjustment to the transaction related with the goods receipt (decrease its cost):
      Total Cost: -3000
      Incremental: Y
      Unit Cost: Y
   Check the total cost of the transaction related with the return shipment is not the same than the transaction related with the original shipment. The adjustment amount has been added instead of being subtracted:

   Original trx:
      Trx Original Cost: 35.55
      Total Cost: 13.95

   Return trx:
      Trx Original Cost: 35.55
      Total Cost: 57.15 (this is wrong)
No tags attached.
Issue History
2017-10-27 13:47ngarciaNew Issue
2017-10-27 13:47ngarciaAssigned To => Triage Finance
2017-10-27 13:47ngarciaModules => Core
2017-10-27 13:47ngarciaTriggers an Emergency Pack => No
2017-10-27 13:48ngarciaIssue Monitored: networkb
2017-10-30 12:51dmiguelezAssigned ToTriage Finance => AtulOpenbravo
2017-10-30 17:47AtulOpenbravoAssigned ToAtulOpenbravo => collazoandy4
2017-10-30 21:25collazoandy4Statusnew => scheduled
2017-11-02 18:13collazoandy4Note Added: 0100225
2017-11-07 08:49hgbotCheckin
2017-11-07 08:49hgbotNote Added: 0100298
2017-11-07 08:49hgbotStatusscheduled => resolved
2017-11-07 08:49hgbotResolutionopen => fixed
2017-11-07 08:49hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/53224949e2165c51ba57ddc6144624c79bdc2882 [^]
2017-11-07 08:50dmiguelezReview Assigned To => dmiguelez
2017-11-07 08:50dmiguelezNote Added: 0100299
2017-11-07 08:50dmiguelezStatusresolved => closed
2017-11-07 08:50dmiguelezFixed in Version => 3.0PR18Q1
2018-01-03 12:38hudsonbotCheckin
2018-01-03 12:38hudsonbotNote Added: 0101377
2018-01-30 14:38jfrancesIssue Monitored: jfrances

Notes
(0100225)
collazoandy4   
2017-11-02 18:13   
Test Plan
  As F&B International Group Admin Role
    Create a new Product:
      Search Key/Name: IssueProduct
      Create a new record in Price tab:
        Price List Version: Tarifa de Bebidas Alegres
        Unit Price/List Price: 0.79
    Create a new Goods Receipt for the previous product created with movement qty 6300
    Create a new Goods Shipment for IssueProduct with movement qty 45
    Create another Goods Shipment for IssueProduct with movement qty 1
    Create a Return from Customer for the first shipment and return 45 units
    Create a new Return Material Receipt for the previous return and receive all units (45)
    Go to Process Request window and launch the Costing Background Process
    In Transaction tab of product window:
      Check that all the transaction costs have been calculated
        Movement Quantity: -1 Trx Original Cost/Total Cost/Unit Cost: 0.79
        Movement Quantity: -45 Trx Original Cost/Total Cost/Unit Cost: 35.55
        Movement Quantity: 45 Trx Original Cost/Total Cost/Unit Cost: 35.55
        Movement Quantity: 6300 Trx Original Cost/Total Cost/Unit Cost: 4,977.00
      Select the Transaction with Movement qty 6300 and create a Manual Cost Adjustment
        Total Cost Amount: -3000
        Incremental: Y
        Unit Cost: Y
      Refresh the transaction tab if necesary and check that all the transaction costs have been recalculated
        Movement Quantity: -1 Trx Original Cost: 0.79 Total Cost/Unit Cost: 0.31
        Movement Quantity: -45 Trx Original Cost: 35.55 Total Cost/Unit Cost: 13.95
        Movement Quantity: 45 Trx Original Cost: 35.55 Total Cost/Unit Cost: 13.95
        Movement Quantity: 6300 Trx Original Cost: 4,977.00 Total Cost/Unit Cost: 1,977.00

  Test Plan II
    Create a new Product:
      Search Key/Name: IssueProduct2
      Create a new record in Price tab:
        Price List Version: Tarifa de Bebidas Alegres
        Unit Price/List Price: 100
    Create a new Goods Receipt for the previous product created with movement qty 10
    Create a new Goods Shipment for IssueProduct with movement qty 5
    Create a Return from Customer for all shipment units (5)
    Create a new Return Material Receipt for the previous return and receive all units (5)
    Go to Process Request window and launch the Costing Background Process
    In Transaction tab of product window:
      Check that all the transaction costs have been calculated
        Movement Quantity: -5 Trx Original Cost/Total Cost/Unit Cost: 500.00
        Movement Quantity: 5 Trx Original Cost/Total Cost/Unit Cost: 500.00
        Movement Quantity: 10 Trx Original Cost/Total Cost/Unit Cost: 1,000.00
      Select the Transaction with Movement qty 10 and create a Manual Cost Adjustment
        Total Cost Amount: 100
        Incremental: Y
        Unit Cost: Y
      Refresh the transaction tab if necesary and check that all the transaction costs have been recalculated
        Movement Quantity: -5 Trx Original Cost: 500.00 Total Cost/Unit Cost: 600
        Movement Quantity: 5 Trx Original Cost: 500.00 Total Cost/Unit Cost: 600
        Movement Quantity: 10 Trx Original Cost: 1,000.00 Total Cost/Unit Cost: 1,100.00
      Navigate to the Cost Adjustment Line asociated to the Goods Receipt Transaction (Movement type: Vendor Receipts) and Cancel the cost adjustment line.
      Refresh the transaction tab if necesary and check that all the transaction costs have been recalculated
        Movement Quantity: -5 Trx Original Cost/Total Cost/Unit Cost: 500.00
        Movement Quantity: 5 Trx Original Cost/Total Cost/Unit Cost: 500.00
        Movement Quantity: 10 Trx Original Cost/Total Cost/Unit Cost: 1,000.00
(0100298)
hgbot   
2017-11-07 08:49   
Repository: erp/devel/pi
Changeset: 53224949e2165c51ba57ddc6144624c79bdc2882
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Thu Nov 02 09:52:23 2017 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/53224949e2165c51ba57ddc6144624c79bdc2882 [^]

Fixes issue 37183:Wrong cost adjustment made to a transaction related with a
return shipment line

When the transaction is related with a return shipment line a negative adjustment
amout was used to compute the cost adjustmen of the related transaction.

The negative method call was removed from the adjustment amount

---
M src/org/openbravo/costing/CostingAlgorithmAdjustmentImp.java
---
(0100299)
dmiguelez   
2017-11-07 08:50   
Code Review + Testing Ok
(0101377)
hudsonbot   
2018-01-03 12:38   
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/c81e0d3cbab5 [^]
Maturity status: Test