details: https://code.openbravo.com/erp/devel/pi/rev/e9ebac32e344 changeset: 17510:e9ebac32e344 user: Mikel Irurita <mikel.irurita <at> openbravo.com> date: Wed Jul 18 16:22:33 2012 +0200 summary: Fixes issue 21108: Warehouse control report - attribute filtering not working
details: https://code.openbravo.com/erp/devel/pi/rev/d055a5224b99 changeset: 17511:d055a5224b99 user: Mikel Irurita <mikel.irurita <at> openbravo.com> date: Wed Jul 18 16:37:40 2012 +0200 summary: Fixes issue 21138: Copy Lines not working using comma as decimal separator diffstat: src-db/database/sourcedata/AD_TEXTINTERFACES.xml | 22 --------- src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.html | 24 +++++----- src/org/openbravo/erpCommon/ad_reports/ReportWarehouseControl.html | 4 +- src/org/openbravo/erpCommon/ad_reports/ReportWarehouseControl.java | 9 +--- 4 files changed, 15 insertions(+), 44 deletions(-) diffs (137 lines): diff -r d1623e828d4d -r d055a5224b99 src-db/database/sourcedata/AD_TEXTINTERFACES.xml --- a/src-db/database/sourcedata/AD_TEXTINTERFACES.xml Wed Jul 18 16:25:58 2012 +0200 +++ b/src-db/database/sourcedata/AD_TEXTINTERFACES.xml Wed Jul 18 16:37:40 2012 +0200 @@ -3129,17 +3129,6 @@ <!--805051--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> <!--805051--></AD_TEXTINTERFACES> -<!--805057--><AD_TEXTINTERFACES> -<!--805057--> <AD_TEXTINTERFACES_ID><![CDATA[805057]]></AD_TEXTINTERFACES_ID> -<!--805057--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> -<!--805057--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> -<!--805057--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> -<!--805057--> <TEXT><![CDATA[Serial No]]></TEXT> -<!--805057--> <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/ReportWarehouseControl.html]]></FILENAME> -<!--805057--> <ISUSED><![CDATA[Y]]></ISUSED> -<!--805057--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> -<!--805057--></AD_TEXTINTERFACES> - <!--805115--><AD_TEXTINTERFACES> <!--805115--> <AD_TEXTINTERFACES_ID><![CDATA[805115]]></AD_TEXTINTERFACES_ID> <!--805115--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> @@ -17641,17 +17630,6 @@ <!--824818EB1076489EAC986E497180AF22--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> <!--824818EB1076489EAC986E497180AF22--></AD_TEXTINTERFACES> -<!--829E2B2EFCBA3DFBE040007F01013C0D--><AD_TEXTINTERFACES> -<!--829E2B2EFCBA3DFBE040007F01013C0D--> <AD_TEXTINTERFACES_ID><![CDATA[829E2B2EFCBA3DFBE040007F01013C0D]]></AD_TEXTINTERFACES_ID> -<!--829E2B2EFCBA3DFBE040007F01013C0D--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> -<!--829E2B2EFCBA3DFBE040007F01013C0D--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> -<!--829E2B2EFCBA3DFBE040007F01013C0D--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> -<!--829E2B2EFCBA3DFBE040007F01013C0D--> <TEXT><![CDATA[Serial No / Attribute.]]></TEXT> -<!--829E2B2EFCBA3DFBE040007F01013C0D--> <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/ReportWarehouseControl.html]]></FILENAME> -<!--829E2B2EFCBA3DFBE040007F01013C0D--> <ISUSED><![CDATA[Y]]></ISUSED> -<!--829E2B2EFCBA3DFBE040007F01013C0D--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> -<!--829E2B2EFCBA3DFBE040007F01013C0D--></AD_TEXTINTERFACES> - <!--83138086E1BB4553A01995EE567C1BF5--><AD_TEXTINTERFACES> <!--83138086E1BB4553A01995EE567C1BF5--> <AD_TEXTINTERFACES_ID><![CDATA[83138086E1BB4553A01995EE567C1BF5]]></AD_TEXTINTERFACES_ID> <!--83138086E1BB4553A01995EE567C1BF5--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> diff -r d1623e828d4d -r d055a5224b99 src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.html --- a/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.html Wed Jul 18 16:25:58 2012 +0200 +++ b/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.html Wed Jul 18 16:37:40 2012 +0200 @@ -81,7 +81,7 @@ var numRow = frm.elements[i].id.slice("CheckNum".length); var lp =document.getElementsByName('inpLastpriceso'+ numRow)[0]; var qty = document.getElementsByName('inpquantity'+ numRow)[0]; - if ((!validateNumber(lp, 'inpLastpriceso', 'lpinvalid')) || (!validateNumber(qty, 'inpquantity', 'qtyinvalid'))) { + if ((!isValidNumber(lp, 'inpLastpriceso', 'lpinvalid')) || (!isValidNumber(qty, 'inpquantity', 'qtyinvalid'))) { setWindowElementFocus(frm.elements[i]); showJSMessage('APRM_NotValidNumber'); return false; @@ -157,15 +157,15 @@ return true; } - function validateNumber(input, name, idd) { - var id = input.name.slice(name.length); - var invalidSpan = document.getElementById(idd+id); - if (invalidSpan) { - var invalid = isNaN(Number(input.value)); - document.getElementById(idd+id).style.display = invalid ? 'block' : 'none'; - if (invalid) { - return false; - } + function isValidNumber(input, name, idd) { + var id = input.name.slice(name.length); + var errorSpan = document.getElementById(idd+id); + if (errorSpan) { + var isValid = validateNumber(input.value, true, true); + errorSpan.style.display = isValid ? 'none' : 'block'; + if (!isValid) { + return false; + } } return true; } @@ -465,7 +465,7 @@ <td width="9%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);"><input type="hidden" name="inpmAttributesetinstanceIdxx" id="fieldmAttributesetinstanceId" value=""/><span id="fieldDescription">xxExtraLarge</span></td> <td width="11%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);"><input type="hidden" name="inpmOfferIdxx" id="fieldMofferid" value=""/><span id="fieldOffername">xx15%descuentoFebrero</span></td> <td width="9%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);"><input type="hidden" name="inpmPricestdvaluexx" id="fieldPricestdvalue" value=""/><span id="fieldPricestd">xx15.345</span></td> - <td width="9%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);"><input class="dojoValidateValid readonly" id="fieldLastpriceso" style="font-weight: normal;" name="inpLastpricesoxx" type="text" size="6" value="" outputformat="priceEdition" onfocus="numberInputEvent('onfocus', this);" onblur="numberInputEvent('onblur', this);" onkeydown="numberInputEvent('onkeydown', this, event);" onchange="validateNumber(this, 'inpLastpriceso','lpinvalid');" disabled="" class="xx" /> + <td width="9%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);"><input class="dojoValidateValid readonly" id="fieldLastpriceso" style="font-weight: normal;" name="inpLastpricesoxx" type="text" size="6" value="" outputformat="priceEdition" onfocus="numberInputEvent('onfocus', this);" onblur="numberInputEvent('onblur', this);" onkeydown="numberInputEvent('onkeydown', this, event);" onchange="isValidNumber(this, 'inpLastpriceso','lpinvalid');" disabled="" class="xx" /> <span class="TextBox_MsgContainer_span" id="lpinvalidxx" style="display: none;" > <table class="TextBox_MsgContainer_table"> <tbody><tr class="TextBox_MsgContainer_tr"> @@ -478,7 +478,7 @@ </table> </span> </td> - <td width="7%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);"><input class="dojoValidateValid readonly" id="fieldQty" style="font-weight: normal;" name="inpquantityxx" type="text" size="5" value="0" outputformat="euroEdition" onfocus="numberInputEvent('onfocus', this);" onblur="numberInputEvent('onblur', this);" onkeydown="numberInputEvent('onkeydown', this, event);" onchange="validateNumber(this, 'inpquantity','qtyinvalid');" disabled="" /> + <td width="7%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);"><input class="dojoValidateValid readonly" id="fieldQty" style="font-weight: normal;" name="inpquantityxx" type="text" size="5" value="0" outputformat="euroEdition" onfocus="numberInputEvent('onfocus', this);" onblur="numberInputEvent('onblur', this);" onkeydown="numberInputEvent('onkeydown', this, event);" onchange="isValidNumber(this, 'inpquantity','qtyinvalid');" disabled="" /> <span class="TextBox_MsgContainer_span" id="qtyinvalidxx" style="display: none;"> <table class="TextBox_MsgContainer_table"> <tbody><tr class="TextBox_MsgContainer_tr"> diff -r d1623e828d4d -r d055a5224b99 src/org/openbravo/erpCommon/ad_reports/ReportWarehouseControl.html --- a/src/org/openbravo/erpCommon/ad_reports/ReportWarehouseControl.html Wed Jul 18 16:25:58 2012 +0200 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportWarehouseControl.html Wed Jul 18 16:37:40 2012 +0200 @@ -282,7 +282,7 @@ </tr> </table> </td> - <td class="TitleCell"><span class="LabelText">Serial No</span></td> + <td class="TitleCell"><span class="LabelText">Attribute</span></td> <td class="TextBox_ContentCell"> <input dojotype="openbravo:ValidationTextbox" class="TextBox_OneCell_width" type="text" size="22" maxlength="50" name="inpReferential" id="paramReferential" value=""></input><script>djConfig.searchIds.push("paramReferential");</script> </tr> <tr> @@ -350,7 +350,7 @@ </tr> <tr class="DataGrid_Body_Row"> <th class="DataGrid_Header_Cell" width="40%">Product</th> - <th class="DataGrid_Header_Cell" width="20%">Serial No / Attribute.</th> + <th class="DataGrid_Header_Cell" width="20%">Attribute</th> <th class="DataGrid_Header_Cell" width="20%">Unit</th> <th class="DataGrid_Header_Cell" width="20%" style="text-align:right;">Quantity</th> </tr> diff -r d1623e828d4d -r d055a5224b99 src/org/openbravo/erpCommon/ad_reports/ReportWarehouseControl.java --- a/src/org/openbravo/erpCommon/ad_reports/ReportWarehouseControl.java Wed Jul 18 16:25:58 2012 +0200 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportWarehouseControl.java Wed Jul 18 16:37:40 2012 +0200 @@ -71,17 +71,10 @@ PrintWriter out = response.getWriter(); XmlDocument xmlDocument = null; - String strRef; - if (strReferential.equals("")) { - strRef = strReferential; - } else { - strRef = "#" + strReferential; - } - ReportWarehouseControlData[] data = ReportWarehouseControlData.select(this, Utility.getContext(this, vars, "#User_Client", "ReportWarehouseControl"), Utility.getContext(this, vars, "#AccessibleOrgTree", "ReportWarehouseControl"), - strDateFrom, DateTimeData.nDaysAfter(this, strDateTo, "1"), strRef); + strDateFrom, DateTimeData.nDaysAfter(this, strDateTo, "1"), strReferential); if (data == null || data.length == 0 || vars.commandIn("DEFAULT")) { String discard[] = { "sectionDescription" }; ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Openbravo-commits mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbravo-commits
