details: https://code.openbravo.com/erp/stable/2.50/rev/681cc0d238aa changeset: 9854:681cc0d238aa user: Javier Etxarri <javier.echarri <at> openbravo.com> date: Wed Mar 14 18:48:08 2012 +0100 summary: Fixes issue 20026: Not possible to validate a work effort because an error
details: https://code.openbravo.com/erp/stable/2.50/rev/d6fcd39b376f changeset: 9855:d6fcd39b376f user: Javier Etxarri <javier.echarri <at> openbravo.com> date: Mon Mar 26 12:54:12 2012 +0200 summary: Fixes issue 20109: It is possible select a purchase price list in the product selector of sales invoice diffstat: src-db/database/model/functions/MA_PRODUCTIONRUN_STANDARD.xml | 8 ++++++ src-db/database/sourcedata/AD_MESSAGE.xml | 11 +++++++++ src/org/openbravo/erpCommon/info/PriceListVersionCombo_data.xsql | 4 ++- src/org/openbravo/erpCommon/info/Product.java | 12 ++++++--- 4 files changed, 30 insertions(+), 5 deletions(-) diffs (109 lines): diff -r 6e99d68db06c -r d6fcd39b376f src-db/database/model/functions/MA_PRODUCTIONRUN_STANDARD.xml --- a/src-db/database/model/functions/MA_PRODUCTIONRUN_STANDARD.xml Fri Mar 16 18:01:23 2012 +0000 +++ b/src-db/database/model/functions/MA_PRODUCTIONRUN_STANDARD.xml Mon Mar 26 12:54:12 2012 +0200 @@ -143,6 +143,14 @@ v_Message:='@ProductionRunProcessed@'; RAISE_APPLICATION_ERROR(-20000, v_Message); END IF; + + IF (v_DoneQuantity <= 0) THEN + v_ResultStr:='Completed Quantity must be greater than zero'; + DBMS_OUTPUT.PUT_LINE('Completed Quantity must be greater than zero') ; + v_Message:='@CompletedQuantityGreaterZero@'; + RAISE_APPLICATION_ERROR(-20000, v_Message); + END IF; + --Insert toolsets if necessary v_ResultStr:='ToolsetProcess Processing'; FOR Cur_ToolsetProcess IN diff -r 6e99d68db06c -r d6fcd39b376f src-db/database/sourcedata/AD_MESSAGE.xml --- a/src-db/database/sourcedata/AD_MESSAGE.xml Fri Mar 16 18:01:23 2012 +0000 +++ b/src-db/database/sourcedata/AD_MESSAGE.xml Mon Mar 26 12:54:12 2012 +0200 @@ -34397,6 +34397,17 @@ <!--EA8C3BCA062B4BB687AE2A2AAE4E32EE--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> <!--EA8C3BCA062B4BB687AE2A2AAE4E32EE--></AD_MESSAGE> +<!--EABA2F32B26B4854A976381054CE06FF--><AD_MESSAGE> +<!--EABA2F32B26B4854A976381054CE06FF--> <AD_MESSAGE_ID><![CDATA[EABA2F32B26B4854A976381054CE06FF]]></AD_MESSAGE_ID> +<!--EABA2F32B26B4854A976381054CE06FF--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--EABA2F32B26B4854A976381054CE06FF--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--EABA2F32B26B4854A976381054CE06FF--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--EABA2F32B26B4854A976381054CE06FF--> <VALUE><![CDATA[CompletedQuantityGreaterZero]]></VALUE> +<!--EABA2F32B26B4854A976381054CE06FF--> <MSGTEXT><![CDATA[Completed Quantity must be greater than zero]]></MSGTEXT> +<!--EABA2F32B26B4854A976381054CE06FF--> <MSGTYPE><![CDATA[E]]></MSGTYPE> +<!--EABA2F32B26B4854A976381054CE06FF--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--EABA2F32B26B4854A976381054CE06FF--></AD_MESSAGE> + <!--EB21629341AC4F7CB3F7EE16BCA24E4D--><AD_MESSAGE> <!--EB21629341AC4F7CB3F7EE16BCA24E4D--> <AD_MESSAGE_ID><![CDATA[EB21629341AC4F7CB3F7EE16BCA24E4D]]></AD_MESSAGE_ID> <!--EB21629341AC4F7CB3F7EE16BCA24E4D--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> diff -r 6e99d68db06c -r d6fcd39b376f src/org/openbravo/erpCommon/info/PriceListVersionCombo_data.xsql --- a/src/org/openbravo/erpCommon/info/PriceListVersionCombo_data.xsql Fri Mar 16 18:01:23 2012 +0000 +++ b/src/org/openbravo/erpCommon/info/PriceListVersionCombo_data.xsql Mon Mar 26 12:54:12 2012 +0200 @@ -35,12 +35,14 @@ AND M_PriceList_Version.IsActive='Y' AND M_PriceList_Version.AD_Client_ID IN ('1') AND p.ad_org_id IN + AND p.issopricelist = ? ORDER BY M_PriceList_Version.Name ]]></Sql> <Parameter name="priceList" optional="true" after="AND M_PriceList_Version.IsActive='Y' " text="AND EXISTS (SELECT * FROM M_PriceList xp WHERE xp.M_PriceList_ID= ? AND p.C_Currency_ID=xp.C_Currency_ID)"/> <Parameter name="adUserClient" type="replace" optional="true" after="M_PriceList_Version.AD_Client_ID IN (" text="'1'"/> <Parameter name="organizations" optional="true" after="AND p.ad_org_id IN " text="(select ad_org_id from AD_ORG O where ad_isorgincluded(?, o.ad_org_id, ?) != -1)"/> - <Parameter name="client_id"/> + <Parameter name="client_id"/> + <Parameter name="isSales"/> </SqlMethod> <SqlMethod name="selectActual" type="preparedStatement" return="multiple"> diff -r 6e99d68db06c -r d6fcd39b376f src/org/openbravo/erpCommon/info/Product.java --- a/src/org/openbravo/erpCommon/info/Product.java Fri Mar 16 18:01:23 2012 +0000 +++ b/src/org/openbravo/erpCommon/info/Product.java Mon Mar 26 12:54:12 2012 +0200 @@ -105,8 +105,10 @@ vars.setSessionValue("Product.priceListVersion", strPriceListVersion); String strOrg = vars.getGlobalVariable("inpAD_Org_ID", "Product.adorgid", ""); + String isSales = vars.getSessionValue(windowId + "|ISSOTRX"); + printPage(response, vars, "", strNameValue, strWarehouse, strPriceList, strPriceListVersion, - windowId, "paramName", strOrg); + windowId, "paramName", strOrg, isSales); } else if (vars.commandIn("KEY")) { removePageSessionVariables(vars); String strKeyValue = vars.getRequestGlobalVariable("inpNameValue", "Product.key"); @@ -121,6 +123,7 @@ String strPriceList = vars.getRequestGlobalVariable("inpPriceList", "Product.priceList"); String strDate = vars.getRequestGlobalVariable("inpDate", "Product.date"); String windowId = vars.getRequestGlobalVariable("WindowID", "Product.windowId"); + String isSales = vars.getSessionValue(windowId + "|ISSOTRX"); // getGlobalVariable only used to store request value into session, not to read it from there String strOrg = vars.getGlobalVariable("inpAD_Org_ID", "Product.adorgid", ""); vars.removeSessionValue("Product.name"); @@ -173,7 +176,7 @@ printPageKey(response, vars, data, strWarehouse, strPriceListVersion); else printPage(response, vars, strKeyValue, "", strWarehouse, strPriceList, strPriceListVersion, - windowId, "paramKey", strOrg); + windowId, "paramKey", strOrg, isSales); } else if (vars.commandIn("STRUCTURE")) { printGridStructure(response, vars); } else if (vars.commandIn("DATA")) { @@ -227,7 +230,8 @@ private void printPage(HttpServletResponse response, VariablesSecureApp vars, String strKeyValue, String strNameValue, String strWarehouse, String strPriceList, String strPriceListVersion, - String windowId, String focusedId, String strOrg) throws IOException, ServletException { + String windowId, String focusedId, String strOrg, String isSales) throws IOException, + ServletException { if (log4j.isDebugEnabled()) log4j.debug("Output: Frame 1 of the products seeker"); String[] discard = new String[1]; @@ -263,7 +267,7 @@ .getClient())); xmlDocument.setData("structure2", PriceListVersionComboData.select(this, strPriceList, Utility - .getContext(this, vars, "#User_Client", "Product"), strOrg, vars.getClient())); + .getContext(this, vars, "#User_Client", "Product"), strOrg, vars.getClient(), isSales)); response.setContentType("text/html; charset=UTF-8"); PrintWriter out = response.getWriter(); ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Openbravo-commits mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbravo-commits
