This closes "Price rule add not correctly" https://issues.apache.org/jira/browse/OFBIZ-4978
steps: 1.login and goto price rule tab 2.add a rule 3.add a condition for the rule The issue is, the added condition is not my selection. I add condition "Party is Fanse Fan", then add, after success, in the detail list, the last party of the select box be shown on the condition , not the one which I choosed. jleroux: * The problem reported by Fanse is now corrected * Fixes an issue when updating a condition (check is now done on input types and not only on value as in creation where it's not a problem, the copy and adaptation from creation to update service implementation was the reason of this bug I'm in the process of adding some more check for condition creation, but will do that later (ne feature not only fixes as here) git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1366960 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -307,9 +307,12 @@ under the License.
|
||||
</check-permission>
|
||||
<check-errors/>
|
||||
|
||||
<if-not-empty field="parameters.condValueInput">
|
||||
<if-compare field="parameters.inputParamEnumId" operator="equals" value="PRIP_QUANTITY">
|
||||
<set field="parameters.condValue" from-field="parameters.condValueInput"/>
|
||||
</if-not-empty>
|
||||
</if-compare>
|
||||
<if-compare field="parameters.inputParamEnumId" operator="equals" value="PRIP_LIST_PRICE">
|
||||
<set field="parameters.condValue" from-field="parameters.condValueInput"/>
|
||||
</if-compare>
|
||||
<make-value entity-name="ProductPriceCond" value-field="lookupPKMap"/>
|
||||
<set-pk-fields map="parameters" value-field="lookupPKMap"/>
|
||||
<find-by-primary-key entity-name="ProductPriceCond" map="lookupPKMap" value-field="lookedUpValue"/>
|
||||
|
||||
@@ -23,9 +23,9 @@ jQuery(document).ready( function() {
|
||||
if (document.getElementById('EditProductPriceRulesCond_o_${i}')) {
|
||||
jQuery('#EditProductPriceRulesCond_condValueInput_o_${i}').hide();
|
||||
jQuery('#EditProductPriceRulesCond_inputParamEnumId_o_${i}').change( function() {
|
||||
getDependentDropdownValues('getAssociatedPriceRulesConds', 'inputParamEnumId', 'EditProductPriceRulesCond_inputParamEnumId_o_${i}', 'EditProductPriceRulesCond_condValue_o_${i}', 'productPriceRulesCondValues', 'condValue_o_${i}', 'description', '', '', '', '', 'EditProductPriceRulesCond_condValueInput_o_${i}');
|
||||
getDependentDropdownValues('getAssociatedPriceRulesConds', 'inputParamEnumId', 'EditProductPriceRulesCond_inputParamEnumId_o_${i}', 'EditProductPriceRulesCond_condValue_o_${i}', 'productPriceRulesCondValues', 'condValue_o_${i}', 'description', '${productPriceConds[i].condValue}', '', '', '', 'EditProductPriceRulesCond_condValueInput_o_${i}');
|
||||
});
|
||||
getDependentDropdownValues('getAssociatedPriceRulesConds', 'inputParamEnumId', 'EditProductPriceRulesCond_inputParamEnumId_o_${i}', 'EditProductPriceRulesCond_condValue_o_${i}', 'productPriceRulesCondValues', 'condValue_o_${i}', 'description', '', '', '', '', 'EditProductPriceRulesCond_condValueInput_o_${i}');
|
||||
getDependentDropdownValues('getAssociatedPriceRulesConds', 'inputParamEnumId', 'EditProductPriceRulesCond_inputParamEnumId_o_${i}', 'EditProductPriceRulesCond_condValue_o_${i}', 'productPriceRulesCondValues', 'condValue_o_${i}', 'description', '${productPriceConds[i].condValue}', '', '', '', 'EditProductPriceRulesCond_condValueInput_o_${i}');
|
||||
}
|
||||
</#list>
|
||||
</#if>
|
||||
|
||||
@@ -94,11 +94,11 @@
|
||||
</field>
|
||||
<field name="condValueInput" title="${uiLabelMap.ProductValue}" entry-name="condValue"><text size="10"/></field>
|
||||
<field name="condValue" title=" ">
|
||||
<drop-down allow-empty="false">
|
||||
<list-options list-name="productPriceRulesCondValues" key-name="condValue"/>
|
||||
<drop-down allow-empty="false" current="selected">
|
||||
<list-options list-name="productPriceRulesCondValues" key-name="condValue"/>
|
||||
</drop-down>
|
||||
</field>
|
||||
<field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit/></field>
|
||||
<field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit/></field>
|
||||
<field name="deleteLink" title=" " widget-style="buttontext" widget-area-style="align-text">
|
||||
<hyperlink target="deleteProductPriceCond" description="${uiLabelMap.CommonRemove}">
|
||||
<parameter param-name="productPriceRuleId" from-field="productPriceCond.productPriceRuleId"/>
|
||||
|
||||
Reference in New Issue
Block a user