Author: sichen
Date: Tue May 8 14:22:09 2007 New Revision: 536333 URL: http://svn.apache.org/viewvc?view=rev&rev=536333 Log: Added textValue to InvoiceTerm, OrderTerm and AgreementTerm to store an actual description of what the term is and can be filled in with seed data. The description fields are retained, but are intended to be user editable. Modified: ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java ofbiz/trunk/applications/ecommerce/data/DemoPurchasing.xml ofbiz/trunk/applications/order/entitydef/entitymodel.xml ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/orderterms.bsh ofbiz/trunk/applications/order/webapp/ordermgr/entry/order/orderheaderinfo.ftl ofbiz/trunk/applications/order/webapp/ordermgr/entry/orderterms.ftl ofbiz/trunk/applications/order/webapp/ordermgr/order/orderReportContactMechs.fo.ftl ofbiz/trunk/applications/order/webapp/ordermgr/order/orderterms.ftl ofbiz/trunk/applications/party/entitydef/entitymodel.xml Modified: ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml?view=diff&rev=536333&r1=536332&r2=536333 ============================================================================== --- ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml (original) +++ ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml Tue May 8 14:22:09 2007 @@ -1213,6 +1213,7 @@ <field name="invoiceItemSeqId" type="id"></field> <field name="termValue" type="currency-amount"></field> <field name="termDays" type="numeric"></field> + <field name="textValue" type="description"></field> <field name="description" type="description"></field> <field name="uomId" type="id"></field> <prim-key field="invoiceTermId"/> Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java?view=diff&rev=536333&r1=536332&r2=536333 ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java Tue May 8 14:22:09 2007 @@ -2054,6 +2054,7 @@ createInvoiceTermContext.put("termTypeId", term.get("termTypeId")); createInvoiceTermContext.put("termValue", term.get("termValue")); createInvoiceTermContext.put("termDays", term.get("termDays")); + createInvoiceTermContext.put("textValue", term.get("textValue")); createInvoiceTermContext.put("description", term.get("description")); createInvoiceTermContext.put("uomId", term.get("uomId")); createInvoiceTermContext.put("userLogin", userLogin); Modified: ofbiz/trunk/applications/ecommerce/data/DemoPurchasing.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/data/DemoPurchasing.xml?view=diff&rev=536333&r1=536332&r2=536333 ============================================================================== --- ofbiz/trunk/applications/ecommerce/data/DemoPurchasing.xml (original) +++ ofbiz/trunk/applications/ecommerce/data/DemoPurchasing.xml Tue May 8 14:22:09 2007 @@ -195,8 +195,8 @@ --> <AgreementTerm agreementTermId="1000" termTypeId="FIN_PAYMENT_TERM" agreementId="AGR_TEST" termDays="30"/> <AgreementTerm agreementTermId="1001" termTypeId="FIN_PAYMENT_DISC" agreementId="AGR_TEST" termDays="10" termValue="2"/> <!-- a 2% discount for paying within 10 days --> - <AgreementTerm agreementTermId="1003" termTypeId="PURCH_VENDOR_ID" agreementId="AGR_TEST" description="OPEN-001"/> - <AgreementTerm agreementTermId="1004" termTypeId="PURCH_FREIGHT" agreementId="AGR_TEST" description="Ship via Open Express"/> + <AgreementTerm agreementTermId="1003" termTypeId="PURCH_VENDOR_ID" agreementId="AGR_TEST" textValue="OPEN-001"/> + <AgreementTerm agreementTermId="1004" termTypeId="PURCH_FREIGHT" agreementId="AGR_TEST" textValue="Shp via Open Express"/> <!-- A final note: if we use Agreement and AgreementTerm in this way we can store 'party terms' without the need of a new PartyTerm entity --> <!-- an example of agreements with multiple payment terms --> Modified: ofbiz/trunk/applications/order/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/entitydef/entitymodel.xml?view=diff&rev=536333&r1=536332&r2=536333 ============================================================================== --- ofbiz/trunk/applications/order/entitydef/entitymodel.xml (original) +++ ofbiz/trunk/applications/order/entitydef/entitymodel.xml Tue May 8 14:22:09 2007 @@ -1088,6 +1088,7 @@ <field name="orderItemSeqId" type="id-ne"></field> <field name="termValue" type="currency-amount"></field> <field name="termDays" type="numeric"></field> + <field name="textValue" type="description"></field> <field name="description" type="description"></field> <field name="uomId" type="id"></field> <prim-key field="termTypeId"/> Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?view=diff&rev=536333&r1=536332&r2=536333 ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Tue May 8 14:22:09 2007 @@ -2539,12 +2539,12 @@ } /** Add an orderTerm to the order */ - public int addOrderTerm(String termTypeId,Double termValue,Long termDays, String description) { + public int addOrderTerm(String termTypeId,Double termValue,Long termDays, String textValue) { GenericValue orderTerm = GenericValue.create(delegator.getModelEntity("OrderTerm")); orderTerm.put("termTypeId", termTypeId); orderTerm.put("termValue", termValue); orderTerm.put("termDays", termDays); - orderTerm.put("description", description); + orderTerm.put("textValue", textValue); return addOrderTerm(orderTerm); } Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java?view=diff&rev=536333&r1=536332&r2=536333 ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java Tue May 8 14:22:09 2007 @@ -944,7 +944,7 @@ String termValue = request.getParameter("termValue"); String termDays = request.getParameter("termDays"); String termIndex = request.getParameter("termIndex"); - String description = request.getParameter("description"); + String textValue = request.getParameter("textValue"); Locale locale = UtilHttp.getLocale(request); Double dTermValue = null; @@ -978,7 +978,7 @@ cartHelper.removeOrderTerm(Integer.parseInt(termIndex)); } - Map result = cartHelper.addOrderTerm(termTypeId, dTermValue, lTermDays, description); + Map result = cartHelper.addOrderTerm(termTypeId, dTermValue, lTermDays, textValue); if (ServiceUtil.isError(result)) { request.setAttribute("_ERROR_MESSAGE_", ServiceUtil.getErrorMessage(result)); return "error"; Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java?view=diff&rev=536333&r1=536332&r2=536333 ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java Tue May 8 14:22:09 2007 @@ -931,8 +931,8 @@ String termTypeId = (String) agreementTerm.get("termTypeId"); Double termValue = (Double) agreementTerm.get("termValue"); Long termDays = (Long) agreementTerm.get("termDays"); - String description = agreementTerm.getString("description"); - cart.addOrderTerm(termTypeId, termValue, termDays, description); + String textValue = agreementTerm.getString("textValue"); + cart.addOrderTerm(termTypeId, termValue, termDays, textValue); } } } catch (GenericEntityException e) { @@ -961,9 +961,9 @@ return addOrderTerm(termTypeId, termValue, termDays, null); } - public Map addOrderTerm(String termTypeId,Double termValue,Long termDays, String description) { + public Map addOrderTerm(String termTypeId,Double termValue,Long termDays, String textValue) { Map result = null; - this.cart.addOrderTerm(termTypeId,termValue,termDays,description); + this.cart.addOrderTerm(termTypeId,termValue,termDays,textValue); result = ServiceUtil.returnSuccess(); return result; } Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/orderterms.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/orderterms.bsh?view=diff&rev=536333&r1=536332&r2=536333 ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/orderterms.bsh (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/orderterms.bsh Tue May 8 14:22:09 2007 @@ -42,6 +42,6 @@ context.put("termTypeId",orderTerm.getString("termTypeId")); context.put("termValue",orderTerm.get("termValue")); context.put("termDays",orderTerm.get("termDays")); - context.put("description",orderTerm.get("description")); + context.put("textValue",orderTerm.get("textValue")); } } Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/order/orderheaderinfo.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/order/orderheaderinfo.ftl?view=diff&rev=536333&r1=536332&r2=536333 ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/order/orderheaderinfo.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/order/orderheaderinfo.ftl Tue May 8 14:22:09 2007 @@ -79,7 +79,7 @@ <td width="35%"><div class="tabletext">${orderTerm.getRelatedOne("TermType").get("description",locale)}</div></td> <td width="10%"><div class="tabletext">${orderTerm.termValue?default("")}</div></td> <td width="10%"><div class="tabletext">${orderTerm.termDays?default("")}</div></td> - <td width="45%"><div class="tabletext">${orderTerm.description?default("")}</div></td> + <td width="45%"><div class="tabletext">${orderTerm.textValue?default("")}</div></td> </tr> <#if orderTerms.size()<index> <tr><td colspan="4"><hr class="sepbar"/></td></tr> @@ -184,4 +184,4 @@ </#if> </table> </div> -</div> \ No newline at end of file +</div> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/orderterms.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/orderterms.ftl?view=diff&rev=536333&r1=536332&r2=536333 ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/orderterms.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/orderterms.ftl Tue May 8 14:22:09 2007 @@ -46,7 +46,7 @@ <td><div class="tabletext">${orderTerm.getRelatedOne("TermType").get("description",locale)}</div></td> <td><div class="tabletext">${orderTerm.termValue?default("")}</div></td> <td><div class="tabletext">${orderTerm.termDays?default("")}</div></td> - <td><div class="tabletext">${orderTerm.description?default("")}</div></td> + <td><div class="tabletext">${orderTerm.textValue?default("")}</div></td> <td align="right"> <a href="<@ofbizUrl>setOrderTerm?termIndex=${index}&createNew=Y</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonUpdate}</a> @@ -113,7 +113,7 @@ </td> <td width="5"> </td> <td width="74%"> - <input type="text" class="inputBox" size="30" maxlength="255" name="description" value="${description?if_exists}"/> + <input type="text" class="inputBox" size="30" maxlength="255" name="textValue" value="${textValue?if_exists}"/> </td> </tr> <tr><td colspan="3" align="middle"><input type="submit" class="smallSubmit" value="${uiLabelMap.CommonAdd}"/></td></tr> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/order/orderReportContactMechs.fo.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/orderReportContactMechs.fo.ftl?view=diff&rev=536333&r1=536332&r2=536333 ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/order/orderReportContactMechs.fo.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/order/orderReportContactMechs.fo.ftl Tue May 8 14:22:09 2007 @@ -120,7 +120,7 @@ <#if orderTerms?has_content> <fo:table-row> <fo:table-cell><fo:block font-weight="bold">${uiLabelMap.OrderOrderTerms}: </fo:block></fo:table-cell> - <fo:table-cell white-space-collapse="false"><#list orderTerms as orderTerm><fo:block>${orderTerm.getRelatedOne("TermType").get("description",locale)} ${orderTerm.termValue?default("")} ${orderTerm.termDays?default("")} ${orderTerm.description?default("")} + <fo:table-cell white-space-collapse="false"><#list orderTerms as orderTerm><fo:block>${orderTerm.getRelatedOne("TermType").get("description",locale)} ${orderTerm.termValue?default("")} ${orderTerm.termDays?default("")} ${orderTerm.textValue?default("")} </fo:block></#list></fo:table-cell> </fo:table-row> </#if> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/order/orderterms.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/orderterms.ftl?view=diff&rev=536333&r1=536332&r2=536333 ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/order/orderterms.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/order/orderterms.ftl Tue May 8 14:22:09 2007 @@ -36,7 +36,7 @@ <td width="35%" align="left"><div class="tabletext">${orderTerm.getRelatedOne("TermType").get("description", locale)}</div></td> <td width="15%" align="center"><div class="tabletext">${orderTerm.termValue?default("")}</div></td> <td width="15%" align="center"><div class="tabletext">${orderTerm.termDays?default("")}</div></td> - <td width="35%" align="center"><div class="tabletext">${orderTerm.description?default("")}</div></td> + <td width="35%" align="center"><div class="tabletext">${orderTerm.textValue?default("")}</div></td> </tr> <tr><td colspan="4"> </td></tr> </#list> Modified: ofbiz/trunk/applications/party/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/entitydef/entitymodel.xml?view=diff&rev=536333&r1=536332&r2=536333 ============================================================================== --- ofbiz/trunk/applications/party/entitydef/entitymodel.xml (original) +++ ofbiz/trunk/applications/party/entitydef/entitymodel.xml Tue May 8 14:22:09 2007 @@ -318,6 +318,7 @@ <field name="thruDate" type="date-time"></field> <field name="termValue" type="currency-amount"></field> <field name="termDays" type="numeric"></field> + <field name="textValue" type="description"></field> <field name="minQuantity" type="floating-point"></field> <field name="maxQuantity" type="floating-point"></field> <field name="description" type="description"></field> |
Free forum by Nabble | Edit this page |