Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0031186
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementmajoralways2015-10-20 12:442015-11-18 11:13
ReporterVictorVillarView Statuspublic 
Assigned Toaferraz 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision5ca106808897
ProjectionnoneETAnoneTarget Version3.0PR16Q1
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0031186: org.openbravo.fix.stock.qtyorderonhand module is not working with negative stock

Descriptionorg.openbravo.fix.stock.qtyorderonhand module is not working with negative stock
Steps To Reproduceorg.openbravo.fix.stock.qtyorderonhand module is not working with negative stock
Proposed SolutionReview the CostingRuleprocess.java in order to know how this problem is avoided.


        if (BigDecimal.ZERO.compareTo(qty) < 0) {
          // Do not insert negative values in Inventory lines, instead reverse the Quantity Count
          // and the Book Quantity. For example:
          // Instead of CountQty=0 and BookQty=-5 insert CountQty=5 and BookQty=0
          // By doing so the difference between both quantities remains the same and no negative
          // values have been inserted.

          openInventoryLine = insertInventoryLine(cri.getInitInventory(), productId, attrSetInsId,
              uomId, orderUOMId, locatorId, qty, BigDecimal.ZERO, orderQty, BigDecimal.ZERO,
              lineNo, null);
          insertInventoryLine(cri.getCloseInventory(), productId, attrSetInsId, uomId, orderUOMId,
              locatorId, BigDecimal.ZERO, qty, BigDecimal.ZERO, orderQty, lineNo, openInventoryLine);

        } else {
          openInventoryLine = insertInventoryLine(cri.getInitInventory(), productId, attrSetInsId,
              uomId, orderUOMId, locatorId, BigDecimal.ZERO, qty.abs(), BigDecimal.ZERO,
              orderQty == null ? null : orderQty.abs(), lineNo, closingInventoryLine);
          insertInventoryLine(cri.getCloseInventory(), productId, attrSetInsId, uomId, orderUOMId,
              locatorId, qty == null ? null : qty.abs(), BigDecimal.ZERO, orderQty == null ? null
                  : orderQty.abs(), BigDecimal.ZERO, lineNo, openInventoryLine);

        }
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on defect 00304813.0PR15Q4 closedAtulOpenbravo Wrong quantity conversion in goods receipts under some circumstancies 
related to defect 0031761 closedaferraz Not possible to launch the org.openbravo.fix.stock.qtyorderonhand module if you have more than 100 inventory lines 

-  Notes
(0081497)
hgbot (developer)
2015-11-05 10:49

Repository: erp/pmods/org.openbravo.fix.stock.qtyorderonhand
Changeset: 5ca106808897bda2875a3ba64f32484c333cc565
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Nov 05 09:50:23 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.fix.stock.qtyorderonhand/rev/5ca106808897bda2875a3ba64f32484c333cc565 [^]

Fixes issue 31186: Module is not working with negative stock

With negative stock, instead of creating inventory lines with negative values, reverse the quantity count and the book quantity. For example, instead of CountQty=0 and BookQty=-5 insert CountQty=5 and BookQty=0.
By doing so the difference between both quantities remains the same and no negative values have been inserted.
Move also storage detail query to a separate method, to make code more clear.

---
M src/org/openbravo/fix/stock/qtyorderonhand/FixStockQtyOrderProcess.java
---
(0081706)
dmiguelez (developer)
2015-11-11 13:35

Code Review + Testing Ok
(0081944)
hgbot (developer)
2015-11-18 11:13

Repository: erp/pmods/org.openbravo.fix.stock.qtyorderonhand
Changeset: 266a181d6bef2413a9d8da417ba5a86d671a6c1f
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Wed Nov 18 11:12:35 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.fix.stock.qtyorderonhand/rev/266a181d6bef2413a9d8da417ba5a86d671a6c1f [^]

Related to Issue 31186: Reverse creation of Opening Inventory Lines when
dealing with negative Stock.

---
M src/org/openbravo/fix/stock/qtyorderonhand/FixStockQtyOrderProcess.java
---

- Issue History
Date Modified Username Field Change
2015-10-20 12:44 VictorVillar New Issue
2015-10-20 12:44 VictorVillar Assigned To => Triage Finance
2015-10-20 12:44 VictorVillar Modules => Core
2015-10-20 12:44 VictorVillar Resolution time => 1447974000
2015-10-20 12:44 VictorVillar Triggers an Emergency Pack => No
2015-10-20 12:44 VictorVillar Relationship added depends on 0030481
2015-10-20 12:44 VictorVillar Issue Monitored: networkb
2015-11-05 10:49 hgbot Checkin
2015-11-05 10:49 hgbot Note Added: 0081497
2015-11-05 10:49 hgbot Status new => resolved
2015-11-05 10:49 hgbot Resolution open => fixed
2015-11-05 10:49 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.fix.stock.qtyorderonhand/rev/5ca106808897bda2875a3ba64f32484c333cc565 [^]
2015-11-05 10:51 aferraz Assigned To Triage Finance => aferraz
2015-11-11 12:44 ngarcia Issue Monitored: ngarcia
2015-11-11 13:35 dmiguelez Review Assigned To => dmiguelez
2015-11-11 13:35 dmiguelez Note Added: 0081706
2015-11-11 13:35 dmiguelez Status resolved => closed
2015-11-18 11:13 hgbot Checkin
2015-11-18 11:13 hgbot Note Added: 0081944
2015-12-22 11:10 VictorVillar Relationship added related to 0031761


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker