[
https://issues.apache.org/jira/browse/OFBIZ-7053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15280279#comment-15280279 ]
Montalbano Florian commented on OFBIZ-7053:
-------------------------------------------
Hi Ravi,
I looked into the issue and found the root of the problem :
There are multiple functions prototype to add a term to an order and the one used wasn't using the "description" field.
The used prototype was :
{code}public int addOrderTerm(String termTypeId, BigDecimal termValue, Long termDays, String textValue){code}
instead of :
{code}public int addOrderTerm(String termTypeId, String orderItemSeqId,BigDecimal termValue, Long termDays, String textValue, String description){code}
So I tried to change the call of the function in "addOrderTerm" from "ShoppingCartEvents.java" from :
{code}cart.addOrderTerm(termTypeId, termValue, termDays, textValue);{code}
to :
{code} cart.addOrderTerm(termTypeId, null, termValue, termDays, textValue, description); {code}
The description parameter is retrieved the same way textValue is.
The "null" parameter is for the "orderItemSeqId" which is not editable for the creation or the update of the term.
This seems to work for the creation and the update of a term.
I've made a patch, I'm trying to share it on the Jira so it can be checked.
Have a nice day,
Florian
> Order term description is not getting set on adding and updating new order term
> -------------------------------------------------------------------------------
>
> Key: OFBIZ-7053
> URL:
https://issues.apache.org/jira/browse/OFBIZ-7053> Project: OFBiz
> Issue Type: Bug
> Components: order
> Affects Versions: Release Branch 13.07, Trunk
> Reporter: Ravi Lodhi
> Priority: Minor
>
> Steps to regenerate (Create a new order) -
> 1) Go to Order Entry (in Order Manager) and add the necessary detail and continue.
> 2) Add Order items and click on Finalize Order.
> 3) Continue with Order Entry Ship-To Settings.
> 4) Add any shipment method and continue.
> 5) On Order Terms Page add a term with description. Term description is not getting saved. Same case with the update term functionality.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)