Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0010711Openbravo ERP04. Warehouse managementpublic2009-09-23 11:112009-10-12 09:19
networkb 
rafaroda 
highminoralways
closedfixed 
5
2.40 
2.40MP112.40MP10 
Core
No
0010711: Warehouse control report does not filter properly if serial number is used
If a product has a serial number, and its value is used to filter this report, does not find any record. The problem is that it is stored, as serial number, the number + '_'. So, if you fill 154 as serial number, the report does not show any record. However, if you enter 154_, the report shows the product.

Also, if the product has expiration date (154_01-01-2010), does not find any record, even using _ after serial number. In addition to this, it is not possible to enter the whole serial number (154_01-01-2010) in serial number field, so report will ever show this product.
Go to Master Data Management > Product Setup > Serial Number Sequence. Create a new record (just fill name field). Save it.
Go to Master Data Management > Product Setup > Attribute Set. Create a new record. Enter a name, and check Serial No, and Expiration Date. Select as Serial No Control, the existing one. As guaranteed days, 365. Save it.
Go to Master Data Management > Product. Create a new one. Enter its name and select as Attribute Set, the created one.
Go to Warehouse management > Transactions > Physical Inventory. Create a new record. Save it.
Go to its lines. Select as a product, the new one (uncheck "With stock" in the selector). As Attribute Set Value, enter a Serial Number (154) and Expiration date (01-01-2010). Save it.
Go to Header, and press "Process Inventory Count".
Go to Warehouse Management > Analysis Tools > Warehouse control report. Enter as Serial Number, 154. Report does not show any record.
Do not fill Serial number field, and search. The product will appear. Copy its serial number (154_01-01-2010) and try to paste it into Serial Number field. It is not possible because of its length.
Make in the HTML the Serial Number field accept much more characters (50).

And the Serial Number comparison should not be equal but like.
In https://code.openbravo.com/erp/devel/pi/file/97dd457bbb50/src/org/openbravo/erpCommon/ad_reports/ReportWarehouseControl_data.xsql [^]
Replace:
<Parameter name="reference" optional="true" after="AND 1=1"><![CDATA[ AND M_ATTRIBUTESETINSTANCE.DESCRIPTION = ?]]></Parameter>
by
<Parameter name="reference" optional="true" after="AND 1=1"><![CDATA[ AND UPPER(M_ATTRIBUTESETINSTANCE.DESCRIPTION) LIKE '%'||UPPER(?)||'%']]></Parameter>
No tags attached.
blocks defect 00107102.40MP11 closed harikrishnan Warehouse control report does not filter properly if serial number is used 
Issue History
2009-09-23 11:59rafarodaTypedefect => backport
2009-09-23 11:59rafarodafix_in_branch => 2.40
2009-09-23 12:07rafarodaSteps to Reproduce Updated
2009-10-05 07:17hgbotCheckin
2009-10-05 07:17hgbotNote Added: 0020688
2009-10-05 07:17hgbotStatusscheduled => resolved
2009-10-05 07:17hgbotResolutionopen => fixed
2009-10-05 07:17hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.40/rev/38004a07a7e923efa84dceb1d30ce802320bcc95 [^]
2009-10-12 09:19sureshbabuStatusresolved => closed
2009-10-12 09:19sureshbabuNote Added: 0020937
2009-10-12 09:19sureshbabuFixed in Version => 2.40MP10

Notes
(0020688)
hgbot   
2009-10-05 07:17   
Repository: erp/stable/2.40
Changeset: 38004a07a7e923efa84dceb1d30ce802320bcc95
Author: Harikrishnan Raja <harikrishnan.raja <at> openbravo.com>
Date: Mon Oct 05 10:46:03 2009 +0530
URL: http://code.openbravo.com/erp/stable/2.40/rev/38004a07a7e923efa84dceb1d30ce802320bcc95 [^]

Fixes Issue 10711: Warehouse control report does not filter properly if serial number is used.

---
M src/org/openbravo/erpCommon/ad_reports/ReportWarehouseControl.html
M src/org/openbravo/erpCommon/ad_reports/ReportWarehouseControl_data.xsql
---
(0020937)
sureshbabu   
2009-10-12 09:19   
Tested working fine