Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030017Openbravo ERP04. Warehouse managementpublic2015-05-26 16:242015-06-02 03:42
maite 
aferraz 
immediatemajoralways
closedfixed 
5
 
3.0PR15Q3 
vmromanos
Core
No
0030017: Should not be possible to select negative receipts when registering a Landed Cost
Should not be possible to select negative receipts when registering a Landed Cost
1. Register Goods Receipt for Bebidas Alegres. Add line for any product and quantity=-2. Process
2. Define Landed Cost Type referencing any account
3. Register Landed Cost document. Create register in Cost tab with amount=2. Access "Receipt" tab and realize that you are able to choose negative receipt
No tags attached.
related to defect 00299483.0PR15Q3 closed umartirena Wrong landed cost calculation when referencing a negative goods receipt 
related to defect 0033197 closed markmm82 / by zero error when processing a landed cost with a goods receipt with more than one line and 0 cost 
Issue History
2015-05-26 16:24maiteNew Issue
2015-05-26 16:24maiteAssigned To => Triage Finance
2015-05-26 16:24maiteModules => Core
2015-05-26 16:24maiteResolution time => 1432764000
2015-05-26 16:24maiteTriggers an Emergency Pack => No
2015-05-26 16:24maiteAssigned ToTriage Finance => umartirena
2015-05-26 16:24maiteIssue Monitored: networkb
2015-05-27 12:26aferrazAssigned Toumartirena => aferraz
2015-05-28 19:32aferrazStatusnew => scheduled
2015-05-29 08:48aferrazStatusscheduled => acknowledged
2015-05-29 08:48aferrazStatusacknowledged => scheduled
2015-05-29 09:42aferrazNote Added: 0077882
2015-06-01 11:58hgbotCheckin
2015-06-01 11:58hgbotNote Added: 0077923
2015-06-01 11:58hgbotStatusscheduled => resolved
2015-06-01 11:58hgbotResolutionopen => fixed
2015-06-01 11:58hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/eef37b346fe41b64d05219ca8a30cb59b78742ac [^]
2015-06-01 11:59vmromanosReview Assigned To => vmromanos
2015-06-01 11:59vmromanosNote Added: 0077924
2015-06-01 11:59vmromanosStatusresolved => closed
2015-06-02 03:42hudsonbotCheckin
2015-06-02 03:42hudsonbotNote Added: 0077962
2015-06-03 15:51umartirenaRelationship addedrelated to 0029948
2016-06-17 13:32aferrazRelationship addedrelated to 0033197

Notes
(0077882)
aferraz   
2015-05-29 09:42   
Test plan:

- Create a Goods Receipt with two lines, one with a negative movement quantity and another with a negative movement quantity. Process it.

- Create a Goods Receipt with two lines, one with a negative movement quantity and another with a positive movement quantity. Process it.

- Run Costing Background process in Process Request window.

- Create a Landed Cost Type with any account and Distribution by Amount algorithm.

- Create a Landed Cost. Add a Landed Cost Cost with any amount.
  
- Move to Receipt tab.
  Realize first receipt does not appear in Goods Receipt selector because all its lines are negative, while second receipt does because it has at least one positive line.
  Select the second receipt in the Goods Receipt selector.
  Realize first receipt line does not appear in Goods Receipt Line selector because it has a negative movement quantity, while second receipt line does because it has at positive movement quantity.
  Keep Goods Receipt Line selector empty.
  Process the Landed Cost.

- Move to Receipt Line Amount tab.
  Realize only one record has been created, related to the positive line of the selected receipt and with the total amount of the Landed Cost Cost.

- Go to Cost Adjustment window.
  Realize an adjustment with only one line has been created, related to the positive line of the selected receipt and with the total amount of the Landed Cost Cost.

- Repeat the same flow, creating the landed cost in Goods Receipt window - Landed Cost tab, while creating the receipts, instead from the Landed Cost window. The results should be the same.
(0077923)
hgbot   
2015-06-01 11:58   
Repository: erp/devel/pi
Changeset: eef37b346fe41b64d05219ca8a30cb59b78742ac
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri May 29 09:52:37 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/eef37b346fe41b64d05219ca8a30cb59b78742ac [^]

Fixes issue 30017: Landed Cost must not be applied to negative receipt lines

Goods Receipt selector in Landed Cost window - Receipt tab, will not show receipts which does not have any positive line.
Goods Receipt Line selector in Landed Cost window - Receipt tab, will not show negative receipts lines.
Landed Cost process will not consider negative receipt lines to distribute the amount of the landed cost.

---
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_REFERENCE.xml
M src-db/database/sourcedata/OBUISEL_SELECTOR.xml
M src-db/database/sourcedata/OBUISEL_SELECTOR_FIELD.xml
M src/org/openbravo/costing/LandedCostDistributionByAmount.java
M src/org/openbravo/costing/LandedCostProcess.java
---
(0077924)
vmromanos   
2015-06-01 11:59   
Code review + testing OK
(0077962)
hudsonbot   
2015-06-02 03:42   
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/14de467bd788 [^]
Maturity status: Test