Author: apatel
Date: Thu Jun 28 13:19:12 2007
New Revision: 551691
URL: http://svn.apache.org/viewvc?view=rev&rev=551691
Log:
Adding carrier account forms and services.
Modified:
ofbiz/trunk/applications/party/config/PartyUiLabels.properties
ofbiz/trunk/applications/party/entitydef/entitymodel.xml
ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml
ofbiz/trunk/applications/party/servicedef/services.xml
ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml
ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml
ofbiz/trunk/applications/party/webapp/partymgr/party/viewprofile.ftl
ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml
ofbiz/trunk/applications/party/widget/partymgr/ProfileScreens.xml
Modified: ofbiz/trunk/applications/party/config/PartyUiLabels.properties
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/config/PartyUiLabels.properties?view=diff&rev=551691&r1=551690&r2=551691
==============================================================================
--- ofbiz/trunk/applications/party/config/PartyUiLabels.properties (original)
+++ ofbiz/trunk/applications/party/config/PartyUiLabels.properties Thu Jun 28
13:19:12 2007
@@ -109,6 +109,7 @@
PageTitleLogin=Login
PageTitleMain=Main Page
PageTitleNewPartyNote=New Party Note
+PageTitlePartyCarrierAccount=Edit Party Carrier Account
PageTitlePendingCommunications=Pending Communications
PageTitleSecurityGroupsList=Security Groups List
PageTitleShoppingList=Shopping List
@@ -484,6 +485,7 @@
PartyServicemgntCustRequestId=Service management Customer Request Id
PartyServiceNotForPostalAddress=This service (createContactMech) should not be
used for POSTAL_ADDRESS type ContactMechs, use the createPostalAddress service
PartyServiceNotForTelecomNumber=This service (createContactMech) should not be
used for TELECOM_NUMBER type ContactMechs, use the createTelecomNumber service
+PartyShipperAccount=Shipper Account
PartyShoppingListDetail=Shopping List Detail
PartyShoppingListEmpty=Empty Shopping List
PartyShoppingLists=Shopping Lists
@@ -707,4 +709,4 @@
FormFieldTitle_cityLocality=City Locality
FormFieldTitle_stateProvince=State Province
FormFieldTitle_country=Country
-FormFieldTitle_certString=Cert String
\ No newline at end of file
+FormFieldTitle_certString=Cert String
Modified: ofbiz/trunk/applications/party/entitydef/entitymodel.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/entitydef/entitymodel.xml?view=diff&rev=551691&r1=551690&r2=551691
==============================================================================
--- ofbiz/trunk/applications/party/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/party/entitydef/entitymodel.xml Thu Jun 28
13:19:12 2007
@@ -1479,7 +1479,7 @@
<field name="carrierPartyId" type="id-ne"></field>
<field name="fromDate" type="date-time"></field>
<field name="thruDate" type="date-time"></field>
- <field name="accountNumber" type="date-time"><!-- the customer's or
user's account number, also known as the shipper number sometimes --></field>
+ <field name="accountNumber" type="id-ne"><!-- the customer's or user's
account number, also known as the shipper number sometimes --></field>
<prim-key field="partyId"/>
<prim-key field="carrierPartyId"/>
<prim-key field="fromDate"/>
Modified:
ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml?view=diff&rev=551691&r1=551690&r2=551691
==============================================================================
---
ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml
(original)
+++
ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml
Thu Jun 28 13:19:12 2007
@@ -822,4 +822,21 @@
<entity-one entity-name="PartyRelationship"
value-name="lookedUpValue"/>
<remove-value value-name="lookedUpValue"/>
</simple-method>
+
+ <simple-method method-name="createPartyCarrierAccount"
short-description="Create PartyCarrierAccount">
+ <make-value entity-name="PartyCarrierAccount" value-name="newEntity"/>
+ <set-pk-fields map-name="parameters" value-name="newEntity"/>
+ <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
+ <if-empty field-name="newEntity.fromDate">
+ <now-timestamp-to-env env-name="nowTimeStamp"/>
+ <set field="newEntity.fromDate" from-field="nowTimeStamp"/>
+ </if-empty>
+ <create-value value-name="newEntity"/>
+ </simple-method>
+
+ <simple-method method-name="updatePartyCarrierAccount"
short-description="Update a PartyCarrierAccount">
+ <entity-one entity-name="PartyCarrierAccount"
value-name="lookedUpValue"/>
+ <set-nonpk-fields value-name="lookedUpValue" map-name="parameters"/>
+ <store-value value-name="lookedUpValue"/>
+ </simple-method>
</simple-methods>
Modified: ofbiz/trunk/applications/party/servicedef/services.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/servicedef/services.xml?view=diff&rev=551691&r1=551690&r2=551691
==============================================================================
--- ofbiz/trunk/applications/party/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/party/servicedef/services.xml Thu Jun 28 13:19:12
2007
@@ -738,4 +738,20 @@
<attribute name="partyId" type="String" mode="IN" optional="false"/>
<attribute name="emailAddress" type="String" mode="OUT"
optional="true"/>
</service>
+
+ <service name="createPartyCarrierAccount" engine="simple"
default-entity-name="PartyCarrierAccount"
+ location="org/ofbiz/party/party/PartyServices.xml"
invoke="createPartyCarrierAccount" auth="true">
+ <description>Create a PartyCarrierAccount record</description>
+ <auto-attributes mode="IN" include="pk" optional="false"/>
+ <auto-attributes mode="IN" include="nonpk" optional="true"/>
+ <override type="Timestamp" mode="IN" name="fromDate" optional="true"/>
+ <override type="String" mode="IN" name="accountNumber"
optional="false"/>
+ </service>
+
+ <service name="updatePartyCarrierAccount" engine="simple"
default-entity-name="PartyCarrierAccount"
+ location="org/ofbiz/party/party/PartyServices.xml"
invoke="updatePartyCarrierAccount" auth="true">
+ <description>Update a PartyCarrierAccount record</description>
+ <auto-attributes mode="IN" include="pk" optional="false"/>
+ <auto-attributes mode="IN" include="nonpk" optional="true"/>
+ </service>
</services>
Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml?view=diff&rev=551691&r1=551690&r2=551691
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml
(original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml Thu
Jun 28 13:19:12 2007
@@ -892,7 +892,25 @@
<response name="success" type="none"/>
<response name="error" type="view" value="main"/>
</request-map>
-
+
+ <request-map uri="editCarrierAccount">
+ <security auth="true" https="true"/>
+ <response name="success" type="view" value="editCarrierAccount"/>
+ <response name="error" type="view" value="editCarrierAccount"/>
+ </request-map>
+ <request-map uri="createPartyCarrierAccount">
+ <security auth="true" https="true"/>
+ <event type="service" invoke="createPartyCarrierAccount"/>
+ <response name="success" type="view" value="viewprofile"/>
+ <response name="error" type="view" value="editCarrierAccount"/>
+ </request-map>
+ <request-map uri="updatePartyCarrierAccount">
+ <security auth="true" https="true"/>
+ <event type="service" invoke="updatePartyCarrierAccount"/>
+ <response name="success" type="view" value="viewprofile"/>
+ <response name="error" type="view" value="viewprofile"/>
+ </request-map>
+
<!-- Lookup request mappings -->
<request-map uri="LookupPartyName"><security https="true"
auth="true"/><response name="success" type="view"
value="LookupPartyName"/></request-map>
<request-map uri="LookupPerson"><security https="true"
auth="true"/><response name="success" type="view"
value="LookupPerson"/></request-map>
@@ -1003,5 +1021,6 @@
<view-map name="AddressMatchMap" type="screen"
page="component://party/widget/partymgr/PartyScreens.xml#AddressMatchMap"/>
<view-map name="FindAddressMatch" type="screen"
page="component://party/widget/partymgr/PartyScreens.xml#FindAddressMatch"/>
<view-map name="EditPartyContents" type="screen"
page="component://party/widget/partymgr/PartyScreens.xml#EditPartyContents"/>
+ <view-map name="editCarrierAccount" type="screen"
page="component://party/widget/partymgr/PartyScreens.xml#editCarrierAccount"/>
<!-- end of view mappings -->
</site-conf>
Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml?view=diff&rev=551691&r1=551690&r2=551691
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml
(original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml Thu Jun
28 13:19:12 2007
@@ -505,5 +505,38 @@
<field name="finAccountTypeId"><ignored/></field>
<field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit
button-type="button"/></field>
</form>
-
+
+ <form name="ListCarrierAccounts" type="list"
target="updatePartyCarrierAccount">
+ <actions>
+ <entity-condition entity-name="PartyCarrierAccount"
list-name="carrierAccounts" filter-by-date="true">
+ <condition-expr field-name="partyId"
env-name="parameters.partyId"></condition-expr>
+ <order-by field-name="fromDate"/>
+ </entity-condition>
+ </actions>
+ <auto-fields-service service-name="updatePartyCarrierAccount"/>
+ <field name="partyId"><display /></field>
+ <field name="carrierPartyId"><display /></field>
+ <field name="fromDate"><display /></field>
+ <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit
button-type="button"/></field>
+ <field name="deleteLink" title="${uiLabelMap.CommonDelete}"
widget-style="smallSubmit">
+ <hyperlink
target="updatePartyCarrierAccount?partyId=${partyId}&carrierPartyId=${carrierPartyId}&fromDate=${fromDate}&thruDate=${context.thruDate}"
+ description="${uiLabelMap.CommonDelete}" also-hidden="false"/>
+ </field>
+ </form>
+
+ <form name="EditCarrierAccount" type="single"
target="createPartyCarrierAccount" title="">
+ <auto-fields-service service-name="createPartyCarrierAccount"/>
+ <field name="partyId"><hidden/></field>
+ <field name="carrierPartyId">
+ <drop-down allow-empty="true">
+ <entity-options entity-name="PartyRole"
description="${partyId}" key-field-name="partyId">
+ <entity-constraint name="roleTypeId" operator="equals"
value="CARRIER"/>
+ <entity-constraint name="partyId" operator="not-equals"
value="_NA_"/>
+ </entity-options>
+ </drop-down>
+ </field>
+ <field name="fromDate" title="${uiLabelMap.CommonFromDate}"
tooltip="${uiLabelMap.CommonRequired}"/>
+ <field name="accountNumber"
title="${uiLabelMap.AccountingAccountNumber}"
tooltip="${uiLabelMap.CommonRequired}"/>
+ <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit
button-type="button"/></field>
+ </form>
</forms>
Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/viewprofile.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/viewprofile.ftl?view=diff&rev=551691&r1=551690&r2=551691
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/viewprofile.ftl
(original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/viewprofile.ftl Thu
Jun 28 13:19:12 2007
@@ -66,9 +66,12 @@
<#-- Party Content -->
${screens.render('component://party/widget/partymgr/ProfileScreens.xml#Content')}
+
+ <#-- Shipper Account Info -->
+
${screens.render('component://party/widget/partymgr/ProfileScreens.xml#ShipperAccount')}
<#-- Party Notes -->
-
${screens.render('component://party/widget/partymgr/ProfileScreens.xml#Notes')}
+
${screens.render('component://party/widget/partymgr/ProfileScreens.xml#Notes')}
<#else>
${uiLabelMap.PartyNoPartyFoundWithPartyId}: ${parameters.partyId?if_exists}
</#if>
Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml?view=diff&rev=551691&r1=551690&r2=551691
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml Thu Jun 28
13:19:12 2007
@@ -706,5 +706,27 @@
</widgets>
</section>
</screen>
+
+ <screen name="editCarrierAccount">
+ <section>
+ <actions>
+ <set field="titleProperty"
value="PageTitlePartyCarrierAccount"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="CommonPartyDecorator"
location="${parameters.mainDecoratorLocation}">
+ <decorator-section name="body">
+ <container style="boxoutside">
+ <container style="screenlet-title-bar">
+ <label
style="boxhead">${uiLabelMap.PartyShipperAccount}</label>
+ </container>
+ <include-form name="EditCarrierAccount"
location="component://party/webapp/partymgr/party/PartyForms.xml"/>
+ </container>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
+
</screens>
+
Modified: ofbiz/trunk/applications/party/widget/partymgr/ProfileScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/ProfileScreens.xml?view=diff&rev=551691&r1=551690&r2=551691
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/ProfileScreens.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/ProfileScreens.xml Thu Jun
28 13:19:12 2007
@@ -343,4 +343,28 @@
</widgets>
</section>
</screen>
-</screens>
\ No newline at end of file
+
+ <screen name="ShipperAccount">
+ <section>
+ <actions>
+ <set field="partyId" from-field="parameters.partyId"/>
+ <set field="thruDate" value="${bsh:
org.ofbiz.base.util.UtilDateTime.nowTimestamp()}"/>
+ </actions>
+ <widgets>
+ <container style="screenlet">
+ <label text="${context.thruDate}"></label>
+ <container style="screenlet-header">
+ <platform-specific>
+ <html>
+ <html-template
location="component://party/webapp/partymgr/party/profileblocks/ShipperAccount.ftl"/>
+ </html>
+ </platform-specific>
+ </container>
+ <container style="screenlet-body">
+ <include-form name="ListCarrierAccounts"
location="component://party/webapp/partymgr/party/PartyForms.xml"/>
+ </container>
+ </container>
+ </widgets>
+ </section>
+ </screen>
+</screens>