svn commit: r431476 - in /incubator/ofbiz/trunk/applications/marketing: data/MarketingTypeData.xml entitydef/entitymodel.xml webapp/marketing/campaign/MarketingCampaignForms.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r431476 - in /incubator/ofbiz/trunk/applications/marketing: data/MarketingTypeData.xml entitydef/entitymodel.xml webapp/marketing/campaign/MarketingCampaignForms.xml

sichen
Author: sichen
Date: Mon Aug 14 17:19:21 2006
New Revision: 431476

URL: http://svn.apache.org/viewvc?rev=431476&view=rev
Log:
OFBIZ-154:  Extend marketing campaign.  Adds some cost fieds, a status field, from and thru dates.  Updated related forms a bit.

Modified:
    incubator/ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml
    incubator/ofbiz/trunk/applications/marketing/entitydef/entitymodel.xml
    incubator/ofbiz/trunk/applications/marketing/webapp/marketing/campaign/MarketingCampaignForms.xml

Modified: incubator/ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml?rev=431476&r1=431475&r2=431476&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml (original)
+++ incubator/ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml Mon Aug 14 17:19:21 2006
@@ -17,6 +17,19 @@
 -->
 
 <entity-engine-xml>
+    <StatusType description="Marketing Campaign" statusTypeId="MKTG_CAMP_STATUS" hasTable="N" parentTypeId=""/>
+    <StatusItem description="Planned" sequenceId="01" statusCode="PLANNED" statusId="MKTG_CAMP_PLANNED" statusTypeId="MKTG_CAMP_STATUS"/>
+    <StatusItem description="Approved" sequenceId="02" statusCode="APPROVED" statusId="MKTG_CAMP_APPROVED" statusTypeId="MKTG_CAMP_STATUS"/>
+    <StatusItem description="In Progress" sequenceId="03" statusCode="INPROGRESS" statusId="MKTG_CAMP_INPROGRESS" statusTypeId="MKTG_CAMP_STATUS"/>
+    <StatusItem description="Completed" sequenceId="04" statusCode="COMPLETED" statusId="MKTG_CAMP_COMPLETED" statusTypeId="MKTG_CAMP_STATUS"/>
+    <StatusItem description="Cancelled" sequenceId="05" statusCode="CANCELLED" statusId="MKTG_CAMP_CANCELLED" statusTypeId="MKTG_CAMP_STATUS"/>
+    <StatusValidChange condition="" statusId="MKTG_CAMP_PLANNED" statusIdTo="MKTG_CAMP_APPROVED" transitionName="Approve Marketing Campaign"/>
+    <StatusValidChange condition="" statusId="MKTG_CAMP_APPROVED" statusIdTo="MKTG_CAMP_INPROGRESS" transitionName="Marketing Campaign In Progress"/>
+    <StatusValidChange condition="" statusId="MKTG_CAMP_INPROGRESS" statusIdTo="MKTG_CAMP_COMPLETED" transitionName="Complete Marketing Campaign"/>
+    <StatusValidChange condition="" statusId="MKTG_CAMP_PLANNED" statusIdTo="MKTG_CAMP_CANCELLED" transitionName="Cancel Marketing Campaign"/>
+    <StatusValidChange condition="" statusId="MKTG_CAMP_APPROVED" statusIdTo="MKTG_CAMP_CANCELLED" transitionName="Cancel Marketing Campaign"/>
+    <StatusValidChange condition="" statusId="MKTG_CAMP_INPROGRESS" statusIdTo="MKTG_CAMP_CANCELLED" transitionName="Cancel Marketing Campaign"/>
+
     <ContactListType contactListTypeId="MARKETING" description="Marketing"/>
     <ContactListType contactListTypeId="NEWSLETTER" description="Newsletter"/>
     <ContactListType contactListTypeId="ANNOUNCEMENT" description="Announcement"/>

Modified: incubator/ofbiz/trunk/applications/marketing/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/marketing/entitydef/entitymodel.xml?rev=431476&r1=431475&r2=431476&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/marketing/entitydef/entitymodel.xml (original)
+++ incubator/ofbiz/trunk/applications/marketing/entitydef/entitymodel.xml Mon Aug 14 17:19:21 2006
@@ -45,11 +45,24 @@
             title="Marketing Campaign Entity">
       <field name="marketingCampaignId" type="id-ne"></field>
       <field name="parentCampaignId" type="id"></field>
+      <field name="statusId" type="id"></field>
       <field name="campaignName" type="name"></field>
       <field name="campaignSummary" type="very-long"></field>
+      <field name="budgetedCost" type="currency-amount"></field>
+      <field name="actualCost" type="currency-amount"></field>
+      <field name="estimatedCost" type="currency-amount"></field>
+      <field name="currencyUomId" type="id-ne"></field>
+      <field name="fromDate" type="date-time"></field>
+      <field name="thruDate" type="date-time"></field>
       <prim-key field="marketingCampaignId"/>
       <relation type="one" fk-name="MKTGCPN_PRNT" title="Parent" rel-entity-name="MarketingCampaign">
         <key-map field-name="parentCampaignId" rel-field-name="marketingCampaignId"/>
+      </relation>
+      <relation type="one" fk-name="MKTGCPN_STS" rel-entity-name="StatusItem">
+        <key-map field-name="statusId"/>
+      </relation>
+      <relation type="one" fk-name="MKTGCPN_CUOM" rel-entity-name="Uom">
+        <key-map field-name="currencyUomId"/>
       </relation>
     </entity>
     <entity entity-name="MarketingCampaignNote"

Modified: incubator/ofbiz/trunk/applications/marketing/webapp/marketing/campaign/MarketingCampaignForms.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/marketing/webapp/marketing/campaign/MarketingCampaignForms.xml?rev=431476&r1=431475&r2=431476&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/marketing/webapp/marketing/campaign/MarketingCampaignForms.xml (original)
+++ incubator/ofbiz/trunk/applications/marketing/webapp/marketing/campaign/MarketingCampaignForms.xml Mon Aug 14 17:19:21 2006
@@ -18,9 +18,13 @@
 
 <forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/widget-form.xsd">
-    <form name="EditMarketingCampaign" type="single"
+     <form name="EditMarketingCampaign" type="single"
             target="updateMarketingCampaign" title="" default-map-name="marketingCampaign"
             default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext">
+        <actions>
+            <property-to-field field="defaultCurrencyUomId" resource="general" property="currency.uom.id.default" default="USD"/>
+        </actions>
+        <auto-fields-entity entity-name="MarketingCampaign"/>
         <alt-target use-when="marketingCampaign==null" target="createMarketingCampaign"/>
         
         <field use-when="marketingCampaign!=null" name="marketingCampaignId" title="${uiLabelMap.MarketingCampaignId}" tooltip="${uiLabelMap.CommonNotModifRecreat}"><display/></field>
@@ -37,7 +41,21 @@
         <field name="campaignSummary" title="${uiLabelMap.MarketingCampaignSummary}">
             <textarea rows="5"/>
         </field>
-        
+        <field name="statusId" title="${uiLabelMap.CommonStatus}">
+            <drop-down allow-empty="false">
+                <entity-options description="${description}" entity-name="StatusItem">
+                     <entity-constraint name="statusTypeId" value="MKTG_CAMP_STATUS"/>
+                     <entity-order-by field-name="sequenceId"/>
+                </entity-options>        
+            </drop-down>
+        </field>
+        <field name="currencyUomId" title="${uiLabelMap.CommonCurrency}">
+            <drop-down allow-empty="false" current="selected" no-current-selected-key="${defaultCurrencyUomId}">
+                <entity-options description="${abbreviation}" key-field-name="uomId" entity-name="Uom">
+                    <entity-constraint name="uomTypeId" value="CURRENCY_MEASURE"/>
+                </entity-options>
+            </drop-down>
+        </field>
         <field name="DONE_PAGE">
             <hidden value="${donePage}"/>
         </field>