[OFBiz] SVN: r6725 - in trunk/applications/accounting: entitydef webapp/accounting/WEB-INF/actions/billingaccount webapp/accounting/billingaccount widget
jonesde@svn.ofbiz.org
jonesde at svn.ofbiz.org
Mon Feb 13 01:41:04 CST 2006
Author: jonesde
Date: 2006-02-13 01:40:53 -0600 (Mon, 13 Feb 2006)
New Revision: 6725
Added:
trunk/applications/accounting/widget/BillingAccountForms.xml
Removed:
trunk/applications/accounting/webapp/accounting/WEB-INF/actions/billingaccount/EditBillingAccount.bsh
trunk/applications/accounting/webapp/accounting/WEB-INF/actions/billingaccount/EditBillingAccountRoles.bsh
trunk/applications/accounting/webapp/accounting/billingaccount/EditBillingAccount.ftl
trunk/applications/accounting/webapp/accounting/billingaccount/EditBillingAccountRoles.ftl
Modified:
trunk/applications/accounting/entitydef/entitygroup.xml
trunk/applications/accounting/entitydef/entitymodel.xml
trunk/applications/accounting/webapp/accounting/billingaccount/FindBillingAccount.ftl
trunk/applications/accounting/widget/BillingAccountScreens.xml
Log:
Some billing account improvements; there were some ugly things in there plus old code so modernized and did improvements to make setting up billing accounts much easier
Modified: trunk/applications/accounting/entitydef/entitygroup.xml
===================================================================
--- trunk/applications/accounting/entitydef/entitygroup.xml 2006-02-13 07:14:24 UTC (rev 6724)
+++ trunk/applications/accounting/entitydef/entitygroup.xml 2006-02-13 07:40:53 UTC (rev 6725)
@@ -125,6 +125,7 @@
<entity-group group="org.ofbiz" entity="BillingAccount" />
<entity-group group="org.ofbiz" entity="BillingAccountAndRole" />
<entity-group group="org.ofbiz" entity="BillingAccountRole" />
+ <entity-group group="org.ofbiz" entity="BillingAccountRoleAndAddress" />
<entity-group group="org.ofbiz" entity="BillingAccountTerm" />
<entity-group group="org.ofbiz" entity="BillingAccountTermAttr" />
<entity-group group="org.ofbiz" entity="CreditCard" />
Modified: trunk/applications/accounting/entitydef/entitymodel.xml
===================================================================
--- trunk/applications/accounting/entitydef/entitymodel.xml 2006-02-13 07:14:24 UTC (rev 6724)
+++ trunk/applications/accounting/entitydef/entitymodel.xml 2006-02-13 07:40:53 UTC (rev 6725)
@@ -1636,6 +1636,24 @@
<key-map field-name="roleTypeId"/>
</relation>
</entity>
+ <view-entity entity-name="BillingAccountRoleAndAddress"
+ package-name="org.ofbiz.accounting.payment"
+ title="Billing Account Role and Address Entity">
+ <description>Note that the ContactMech is not linked into this view and the PADDR is not optional, this way we naturally only get postal address entries</description>
+ <member-entity entity-alias="BAR" entity-name="BillingAccountRole"/>
+ <member-entity entity-alias="PCM" entity-name="PartyContactMech"/>
+ <member-entity entity-alias="PADDR" entity-name="PostalAddress"/>
+ <alias-all entity-alias="BAR"/>
+ <alias-all entity-alias="PADDR"/>
+ <alias entity-alias="PCM" name="pcmFromDate" field="fromDate"/>
+ <alias entity-alias="PCM" name="pcmThruDate" field="thruDate"/>
+ <view-link entity-alias="BAR" rel-entity-alias="PCM">
+ <key-map field-name="partyId"/>
+ </view-link>
+ <view-link entity-alias="PCM" rel-entity-alias="PADDR">
+ <key-map field-name="contactMechId"/>
+ </view-link>
+ </view-entity>
<entity entity-name="BillingAccountTerm"
package-name="org.ofbiz.accounting.payment"
title="Billing Account Term Entity">
Deleted: trunk/applications/accounting/webapp/accounting/WEB-INF/actions/billingaccount/EditBillingAccount.bsh
===================================================================
--- trunk/applications/accounting/webapp/accounting/WEB-INF/actions/billingaccount/EditBillingAccount.bsh 2006-02-13 07:14:24 UTC (rev 6724)
+++ trunk/applications/accounting/webapp/accounting/WEB-INF/actions/billingaccount/EditBillingAccount.bsh 2006-02-13 07:40:53 UTC (rev 6725)
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2003 The Open For Business Project - www.ofbiz.org
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
- * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
- * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- *@author Andy Zeneski (jaz at ofbiz.org)
- *@version $Rev$
- *@since 2.1
- */
-
-import java.util.*;
-import org.ofbiz.entity.*;
-import org.ofbiz.base.util.*;
-
-requestParams = UtilHttp.getParameterMap(request);
-delegator = request.getAttribute("delegator");
-billingAccountId = requestParams.get("billingAccountId");
-if (billingAccountId == null) {
- billingAccountId = request.getAttribute("billingAccountId");
-}
-if (billingAccountId != null) {
- billingAccount = delegator.findByPrimaryKey("BillingAccount", UtilMisc.toMap("billingAccountId", billingAccountId));
- context.put("billingAccount", billingAccount);
-}
-
-tryEntity = true;
-errorMessage = request.getAttribute("_ERROR_MESSAGE_");
-if (errorMessage != null && errorMessage.length() > 0) {
- tryEntity = false;
-}
-
-billingAccountData = context.get("billingAccount");
-if (!tryEntity) billingAccountData = requestParams;
-if (billingAccountData == null) billingAccountData = new HashMap();
-context.put("billingAccountData", billingAccountData);
-
-// currencies and billing account currency currency
-currencies = delegator.findByAndCache("Uom", UtilMisc.toMap("uomTypeId","CURRENCY_MEASURE"));
-context.put("currencies", currencies);
-if (billingAccountData != null) {
- context.put("defaultCurrencyUomId", billingAccountData.get("accountCurrencyUomId"));
-}
-
Deleted: trunk/applications/accounting/webapp/accounting/WEB-INF/actions/billingaccount/EditBillingAccountRoles.bsh
===================================================================
--- trunk/applications/accounting/webapp/accounting/WEB-INF/actions/billingaccount/EditBillingAccountRoles.bsh 2006-02-13 07:14:24 UTC (rev 6724)
+++ trunk/applications/accounting/webapp/accounting/WEB-INF/actions/billingaccount/EditBillingAccountRoles.bsh 2006-02-13 07:40:53 UTC (rev 6725)
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2003 The Open For Business Project - www.ofbiz.org
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
- * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
- * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- *@author Andy Zeneski (jaz at ofbiz.org)
- *@version $Rev$
- *@since 2.1
- */
-
-import java.util.*;
-import org.ofbiz.entity.*;
-import org.ofbiz.base.util.*;
-
-requestParams = UtilHttp.getParameterMap(request);
-delegator = request.getAttribute("delegator");
-billingAccountId = requestParams.get("billingAccountId");
-if (billingAccountId == null)
- billingAccountId = request.getAttribute("billingAccountId");
-if (billingAccountId != null) {
- billingAccount = delegator.findByPrimaryKey("BillingAccount", UtilMisc.toMap("billingAccountId", billingAccountId));
- context.put("billingAccount", billingAccount);
-}
-
-tryEntity = true;
-errorMessage = request.getAttribute("_ERROR_MESSAGE_");
-if (errorMessage != null && errorMessage.length() > 0) {
- tryEntity = false;
-}
-
-newRoleData = new HashMap();
-if (!tryEntity && requestParams != null && requestParams.size() > 0)
- newRoleData = requestParams;
-context.put("newRoleData", newRoleData);
-
-billingAccountRoles = delegator.findByAnd("BillingAccountRole", UtilMisc.toMap("billingAccountId", billingAccountId));
-context.put("billingAccountRoles", billingAccountRoles);
-context.put("nowTimestamp", UtilDateTime.nowTimestamp());
-
-roleTypes = delegator.findAll("RoleType");
-context.put("roleTypes", roleTypes);
-
-
Deleted: trunk/applications/accounting/webapp/accounting/billingaccount/EditBillingAccount.ftl
===================================================================
--- trunk/applications/accounting/webapp/accounting/billingaccount/EditBillingAccount.ftl 2006-02-13 07:14:24 UTC (rev 6724)
+++ trunk/applications/accounting/webapp/accounting/billingaccount/EditBillingAccount.ftl 2006-02-13 07:40:53 UTC (rev 6725)
@@ -1,86 +0,0 @@
-<#--
- * Copyright (c) 2003 The Open For Business Project - www.ofbiz.org
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
- * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
- * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- *@author Andy Zeneski (jaz at ofbiz.org)
- *@author David E. Jones (jonesde at ofbiz.org)
- *@author Olivier Heintz (olivier.heintz at nereide.biz)
- *@version $Rev$
- *@since 2.1
--->
-
-<#if billingAccount?has_content>
- <div class="head1">${uiLabelMap.AccountingUpdateBillingAccount}</div>
- <form name="billingform" method="post" action="<@ofbizUrl>updateBillingAccount</@ofbizUrl>">
- <input type="hidden" name="billingAccountId" value="${billingAccount.billingAccountId}">
-<#else>
- <div class="head1">${uiLabelMap.AccountingCreateBillingAccount}</div>
- <form name="billingform" method="post" action="<@ofbizUrl>createBillingAccount</@ofbizUrl>">
- <#if (requestParameters.partyId)?has_content && (requestParameters.roleTypeId)?has_content>
- <input type="hidden" name="roleTypeId" value="${requestParameters.roleTypeId}">
- <input type="hidden" name="partyId" value="${requestParameters.partyId}">
- </#if>
-</#if>
-
- <br/>
- <table width="90%" border="0" cellpadding="2" cellspacing="0">
- <#if billingAccount?has_content>
- <tr>
- <td width='26%' align='right' valign='top'><div class="tabletext">${uiLabelMap.AccountingAccountId}</div></td>
- <td width="5"> </td>
- <td width="74%" valign="top"><div class="tabletext"><b>${billingAccount.billingAccountId?if_exists}</b> (${uiLabelMap.CommonNotModifRecreat})</td>
- </tr>
- </#if>
- <tr>
- <td width='26%' align='right' valign='top'><div class="tabletext">${uiLabelMap.AccountingDescription}</div></td>
- <td width="5"> </td>
- <td width="74%"><input type="text" class="inputBox" size="40" name="description" value="${billingAccountData.description?if_exists}"></td>
- </tr>
- <tr>
- <td width='26%' align='right' valign='top'><div class="tabletext">${uiLabelMap.AccountingBillingContactMechId}</div></td>
- <td width="5"> </td>
- <td width="74%"><input type="text" class="inputBox" size="20" name="contactMechId" value="${billingAccountData.contactMechId?if_exists}"></td>
- </tr>
- <tr>
- <td width='26%' align='right' valign='top'><div class="tabletext">${uiLabelMap.AccountingAccountLimit}</div></td>
- <td width="5"> </td>
- <td width="74%"><input type="text" class="inputBox" size="10" name="accountLimit" value="${billingAccountData.accountLimit?default(0)?string("##0.00")}">
- *</td>
- </tr>
- <tr>
- <td width='26%' align='right' valign='top'><div class="tabletext">${uiLabelMap.CommonCurrency}</div></td>
- <td width="5"> </td>
- <td width="74%">
- <select class="selectBox" name="accountCurrencyUomId">
- <option value=""></option>
- <#list currencies as currency>
- <option value="${currency.uomId}" <#if (defaultCurrencyUomId?has_content) && (currency.uomId == defaultCurrencyUomId)>selected</#if>>${currency.uomId}</option>
- </#list>
- </select>
- </td>
- </tr>
- <tr>
- <td width="26%" align="right" valign="top">
- <input type="submit" value="${uiLabelMap.CommonSave}" class="smallSubmit">
- <td width="5"> </td>
- <td width="74%"> </td>
- </tr>
- </table>
-</form>
Deleted: trunk/applications/accounting/webapp/accounting/billingaccount/EditBillingAccountRoles.ftl
===================================================================
--- trunk/applications/accounting/webapp/accounting/billingaccount/EditBillingAccountRoles.ftl 2006-02-13 07:14:24 UTC (rev 6724)
+++ trunk/applications/accounting/webapp/accounting/billingaccount/EditBillingAccountRoles.ftl 2006-02-13 07:40:53 UTC (rev 6725)
@@ -1,108 +0,0 @@
-<#--
- * Copyright (c) 2003 The Open For Business Project - www.ofbiz.org
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
- * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
- * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- *@author Andy Zeneski (jaz at ofbiz.org)
- *@author David E. Jones (jonesde at ofbiz.org)
- *@author Olivier Heintz (olivier.heintz at nereide.biz)
- *@version $Rev$
- *@since 2.1
--->
-<div class="head1">${uiLabelMap.PageTitleEditBillingAccountRoles} - ${uiLabelMap.AccountingAccountId}: ${billingAccount.billingAccountId}</div>
-
-<br/>
-<table width="100%" border="0" cellpadding="2" cellspacing="0">
- <tr>
- <td><div class='tableheadtext'>${uiLabelMap.PartyPartyId}</div></td>
- <td><div class='tableheadtext'>${uiLabelMap.PartyRoleTypeId}</div></td>
- <td><div class='tableheadtext'>${uiLabelMap.CommonFromDate}</div></td>
- <td><div class='tableheadtext'>${uiLabelMap.CommonThruDate}</div></td>
- <td> </td>
- </tr>
- <tr><td colspan="5"><hr class="sepbar"></td></tr>
- <#if !billingAccountRoles?exists || billingAccountRoles?size == 0>
- <tr>
- <td colspan='5'><div class='tabletext'>${uiLabelMap.AccountingNoBillingAccountRole}</div></td>
- </tr>
- <#else>
- <#list billingAccountRoles as role>
- <tr>
- <td><div class="tabletext">${role.partyId}</div></td>
- <td><div class="tabletext">${role.roleTypeId}</div></td>
- <td><div class="tabletext">${role.fromDate}</div></td>
- <td><div class="tabletext">${role.thruDate?if_exists}</div></td>
- <td align="right">
- <#if role.thruDate?exists>
-
- <#else>
- <a href="<@ofbizUrl>updateBillingAccountRole?billingAccountId=${role.billingAccountId}&partyId=${role.partyId}&roleTypeId=${role.roleTypeId}&fromDate=${role.fromDate}&thruDate=${nowTimestamp}</@ofbizUrl>" class="buttontext">[Remove]</a>
- </#if>
- </td>
- </tr>
- </#list>
- </#if>
-</table>
-
-<br/>
-<div class="head1">${uiLabelMap.AccountingCreateBillingAccountRole}</div>
-<br/>
-<form name="billingform" method="post" action="<@ofbizUrl>createBillingAccountRole</@ofbizUrl>">
- <input type="hidden" name="billingAccountId" value="${billingAccount.billingAccountId}">
- <table width="90%" border="0" cellpadding="2" cellspacing="0">
- <tr>
- <td width='26%' align='right' valign='top'><div class="tabletext">${uiLabelMap.PartyPartyId}</div></td>
- <td width="5"> </td>
- <td width="74%">
- <input type="text" class="inputBox" size="25" name="partyId" value="">*
- <span class='tabletext'>
- <a href="javascript:call_fieldlookup2(document.billingform.partyId,'LookupPartyName');">
- <img src='/images/fieldlookup.gif' width='15' height='14' border='0' alt='Click here For Party Name Lookup'>
- </a>
- </span>
- </td>
- </tr>
- <tr>
- <td width='26%' align='right' valign='top'><div class="tabletext">${uiLabelMap.PartyRoleTypeId}</div></td>
- <td width="5"> </td>
- <td width="74%">
- <select name="roleTypeId" class="selectBox">
- <#list roleTypes as roleType>
- <option value="${roleType.roleTypeId}">${roleType.description?if_exists}</option>
- </#list>
- </select>*
- </td>
- </tr>
- <tr>
- <td width='26%' align='right' valign='top'><div class="tabletext">${uiLabelMap.CommonFromDate}</div></td>
- <td width="5"> </td>
- <td width="74%">
- <input type="text" name="fromDate" size="25" class="inputBox" value="">
- <a href="javascript:call_cal(document.billingform.fromDate, null);"><img src="/images/cal.gif" width="16" height="16" border="0" alt="Click here For Calendar"></a>
- </td>
- </tr>
- <tr>
- <td width="26%" align="right" valign="top">
- <input type='submit' value="${uiLabelMap.CommonSave}" class='smallSubmit'>
- <td width="5"> </td>
- <td width="74%"> </td>
- </tr>
- </table>
-</form>
-
Modified: trunk/applications/accounting/webapp/accounting/billingaccount/FindBillingAccount.ftl
===================================================================
--- trunk/applications/accounting/webapp/accounting/billingaccount/FindBillingAccount.ftl 2006-02-13 07:14:24 UTC (rev 6724)
+++ trunk/applications/accounting/webapp/accounting/billingaccount/FindBillingAccount.ftl 2006-02-13 07:40:53 UTC (rev 6725)
@@ -1,5 +1,5 @@
<#--
- * Copyright (c) 2003 The Open For Business Project - www.ofbiz.org
+ * Copyright (c) 2003-2006 The Open For Business Project - www.ofbiz.org
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -27,7 +27,7 @@
-->
<div class="head1">${uiLabelMap.AccountingBillingAccounts}</div>
-<div><a href="<@ofbizUrl>EditBillingAccount<#if (requestParameters.partyId)?has_content>?partyId=${requestParameters.partyId}&roleTypeId=BILL_TO_CUSTOMER</#if></@ofbizUrl>" class="buttontext">[${uiLabelMap.AccountingNewAccount}]</a></div>
+<div><a href="<@ofbizUrl>EditBillingAccount<#if (requestParameters.partyId)?has_content>?partyId=${requestParameters.partyId}&roleTypeId=BILL_TO_CUSTOMER</#if></@ofbizUrl>" class="buttontext">${uiLabelMap.AccountingNewAccount}</a></div>
<br/>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
@@ -52,7 +52,7 @@
<td><div class="tabletext"><@ofbizCurrency amount=billingAccount.accountLimit isoCode=billingAccount.accountCurrencyUomId/></div></td>
<td><div class="tabletext">${roleType.description}</div></td>
<td align="right">
- <a href="<@ofbizUrl>EditBillingAccount?billingAccountId=${billingAccount.billingAccountId}</@ofbizUrl>" class="buttontext">[${uiLabelMap.CommonEdit}]</a>
+ <a href="<@ofbizUrl>EditBillingAccount?billingAccountId=${billingAccount.billingAccountId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonEdit}</a>
</td>
</tr>
</#list>
@@ -62,7 +62,7 @@
<td><div class="tabletext">${billingAccount.billingAccountId}</div></td>
<td><div class="tabletext"><@ofbizCurrency amount=billingAccount.accountLimit isoCode=billingAccount.accountCurrencyUomId/></div></td>
<td align="right">
- <a href="<@ofbizUrl>EditBillingAccount?billingAccountId=${billingAccount.billingAccountId}</@ofbizUrl>" class="buttontext">[${uiLabelMap.CommonEdit}]</a>
+ <a href="<@ofbizUrl>EditBillingAccount?billingAccountId=${billingAccount.billingAccountId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonEdit}</a>
</td>
</tr>
</#list>
Added: trunk/applications/accounting/widget/BillingAccountForms.xml
===================================================================
--- trunk/applications/accounting/widget/BillingAccountForms.xml 2006-02-13 07:14:24 UTC (rev 6724)
+++ trunk/applications/accounting/widget/BillingAccountForms.xml 2006-02-13 07:40:53 UTC (rev 6725)
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ * Copyright (c) 2006-2006 The Open For Business Project - www.ofbiz.org
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
+ * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+-->
+
+<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/widget-form.xsd">
+
+ <form name="EditBillingAccount" type="single" target="updateBillingAccount" title="" default-map-name="billingAccount"
+ default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext">
+ <alt-target use-when="billingAccount==null" target="createBillingAccount"/>
+ <auto-fields-service service-name="updateBillingAccount" map-name="billingAccount"/>
+
+ <field use-when="billingAccount!=null" name="billingAccountId" title="${uiLabelMap.PartyParty}" tooltip="${uiLabelMap.CommonNotModifRecreat}" widget-style="tabletext"><display/></field>
+ <field use-when="billingAccount==null&&billingAccountId==null" name="billingAccountId" title="${uiLabelMap.PartyParty}"><lookup target-form-name="LookupPartyName"/></field>
+ <field use-when="billingAccount==null&&billingAccountId!=null" name="billingAccountId" title="${uiLabelMap.PartyParty}" tooltip="${uiLabelMap.CommonCannotBeFound}:[${billingAccountId}]"><lookup target-form-name="LookupPartyName"/></field>
+
+ <field name="accountCurrencyUomId">
+ <drop-down allow-empty="false" no-current-selected-key="USD">
+ <entity-options entity-name="Uom" description="[${abbreviation}] ${description}" key-field-name="uomId">
+ <entity-constraint name="uomTypeId" value="CURRENCY_MEASURE"/>
+ <entity-order-by field-name="abbreviation"/>
+ </entity-options>
+ </drop-down>
+ </field>
+ <field name="contactMechId" tooltip="Billing Address; Add Party/Role first, then select from drop-down">
+ <drop-down>
+ <entity-options entity-name="BillingAccountRoleAndAddress" description="[${partyId}][${contactMechId}] ${toName}, ${attnName}, ${address1}, ${stateProvinceGeoId} ${postalCode}" key-field-name="contactMechId" filter-by-date="true">
+ <entity-constraint name="billingAccountId" env-name="billingAccountId"/>
+ <entity-order-by field-name="partyId"/>
+ <entity-order-by field-name="contactMechId"/>
+ </entity-options>
+ </drop-down>
+ </field>
+
+ <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
+ </form>
+
+ <form name="ListBillingAccountRoles" type="list" list-name="billingAccountRoleList" target="updateBillingAccountRole"
+ default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext">
+ <actions>
+ <entity-condition entity-name="BillingAccountRole" list-name="billingAccountRoleList">
+ <condition-expr field-name="billingAccountId" env-name="billingAccountId"/>
+ <order-by field-name="roleTypeId"/>
+ </entity-condition>
+ </actions>
+
+ <auto-fields-service service-name="updateBillingAccountRole" default-field-type="edit"/>
+
+ <field name="billingAccountId"><hidden/></field>
+ <field name="partyId" title="${uiLabelMap.PartyPartyId}" widget-style="tabletext">
+ <display-entity entity-name="PartyNameView" description="${firstName} ${middleName} ${lastName} ${groupName}">
+ <sub-hyperlink description="${partyId}" target="/partymgr/control/viewprofile?partyId=${partyId}" target-type="inter-app" link-style="buttontext"/>
+ </display-entity>
+ </field>
+ <field name="roleTypeId" title="${uiLabelMap.PartyRoleTypeId}" widget-style="tabletext">
+ <display-entity entity-name="RoleType" description="${description}"/>
+ </field>
+ <field name="fromDate" title="${uiLabelMap.CommonFromDate}" widget-style="tabletext"><display/></field>
+
+ <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
+ <field name="deleteLink" title=" " widget-style="buttontext">
+ <hyperlink target="deleteBillingAccountRole?billingAccountId=${billingAccountId}&roleTypeId=${roleTypeId}&partyId=${partyId}"
+ description="${uiLabelMap.CommonDelete}" also-hidden="false"/>
+ </field>
+ </form>
+ <form name="AddBillingAccountRole" type="single" target="createBillingAccountRole" title="" default-map-name="billingAccountRole"
+ default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext">
+
+ <auto-fields-service service-name="createBillingAccountRole"/>
+ <field name="billingAccountId"><hidden/></field>
+ <field name="roleTypeId">
+ <drop-down allow-empty="false" no-current-selected-key="BILL_TO_CUSTOMER">
+ <entity-options entity-name="RoleType" description="${description}">
+ <entity-order-by field-name="description"/>
+ </entity-options>
+ </drop-down>
+ </field>
+ <field name="partyId" title="${uiLabelMap.PartyId}"><lookup target-form-name="LookupPartyName"/></field>
+ <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
+ </form>
+</forms>
Property changes on: trunk/applications/accounting/widget/BillingAccountForms.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:keywords
+ "Id Rev Author"
Name: svn:eol-style
+ native
Modified: trunk/applications/accounting/widget/BillingAccountScreens.xml
===================================================================
--- trunk/applications/accounting/widget/BillingAccountScreens.xml 2006-02-13 07:14:24 UTC (rev 6724)
+++ trunk/applications/accounting/widget/BillingAccountScreens.xml 2006-02-13 07:40:53 UTC (rev 6725)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- * Copyright (c) 2004 The Open For Business Project - www.ofbiz.org
+ * Copyright (c) 2004-2006 The Open For Business Project - www.ofbiz.org
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -81,14 +81,13 @@
<set field="headerItem" value="billingaccount"/>
<set field="tabButtonItem" value="EditBillingAccount"/>
- <script location="component://accounting/webapp/accounting/WEB-INF/actions/billingaccount/EditBillingAccount.bsh"/>
+ <set field="billingAccountId" from-field="parameters.billingAccountId"/>
+ <entity-one entity-name="BillingAccount" value-name="billingAccount"/>
</actions>
<widgets>
<decorator-screen name="CommonBillingAccountDecorator">
<decorator-section name="body">
- <platform-specific>
- <html><html-template location="component://accounting/webapp/accounting/billingaccount/EditBillingAccount.ftl"/></html>
- </platform-specific>
+ <include-form name="EditBillingAccount" location="component://accounting/widget/BillingAccountForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
@@ -102,14 +101,14 @@
<set field="headerItem" value="billingaccount"/>
<set field="tabButtonItem" value="EditBillingAccountRoles"/>
- <script location="component://accounting/webapp/accounting/WEB-INF/actions/billingaccount/EditBillingAccountRoles.bsh"/>
+ <set field="billingAccountId" from-field="parameters.billingAccountId"/>
+ <entity-one entity-name="BillingAccount" value-name="billingAccount"/>
</actions>
<widgets>
<decorator-screen name="CommonBillingAccountDecorator">
<decorator-section name="body">
- <platform-specific>
- <html><html-template location="component://accounting/webapp/accounting/billingaccount/EditBillingAccountRoles.ftl"/></html>
- </platform-specific>
+ <include-form name="ListBillingAccountRoles" location="component://accounting/widget/BillingAccountForms.xml"/>
+ <include-form name="AddBillingAccountRole" location="component://accounting/widget/BillingAccountForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
@@ -178,6 +177,4 @@
</widgets>
</section>
</screen>
-
</screens>
-
More information about the Svn
mailing list