You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2010/12/07 11:42:19 UTC
svn commit: r1042964 [2/9] - in /ofbiz/branches/jquery: ./
applications/accounting/data/ applications/accounting/servicedef/
applications/accounting/src/org/ofbiz/accounting/tax/
applications/content/data/ applications/content/src/org/ofbiz/content/dat...
Modified: ofbiz/branches/jquery/applications/marketing/data/sfaDemoData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/marketing/data/sfaDemoData.xml?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/marketing/data/sfaDemoData.xml (original)
+++ ofbiz/branches/jquery/applications/marketing/data/sfaDemoData.xml Tue Dec 7 10:42:16 2010
@@ -1,146 +1,146 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<entity-engine-xml>
-
- <!-- demo accounts -->
- <Party partyId="sfa100" partyTypeId="PARTY_GROUP" statusId="PARTY_ENABLED"/>
- <PartyGroup partyId="sfa100" groupName="A profitable Account"/>
- <PartyRole partyId="sfa100" roleTypeId="_NA_"/>
- <PartyRole partyId="sfa100" roleTypeId="ACCOUNT"/>
- <ContactMech contactMechId="sfa100" contactMechTypeId="POSTAL_ADDRESS"/>
- <ContactMech contactMechId="sfa101" contactMechTypeId="TELECOM_NUMBER"/>
- <ContactMech contactMechId="sfa102" contactMechTypeId="EMAIL_ADDRESS" infoString="ofbiztest@yahoo.com"/>
- <PostalAddress contactMechId="sfa100" address1="151 Madison street." city="Edison" postalCode="32451" lastUpdatedStamp="2008-05-23 11:57:40.936" lastUpdatedTxStamp="2008-05-23 11:57:39.476" createdStamp="2008-05-23 11:57:40.936" createdTxStamp="2008-05-23 11:57:39.476"/>
- <TelecomNumber contactMechId="sfa101" countryCode="1" areaCode="33" contactNumber="12456" lastUpdatedStamp="2008-05-23 11:57:41.179" lastUpdatedTxStamp="2008-05-23 11:57:39.476" createdStamp="2008-05-23 11:57:41.179" createdTxStamp="2008-05-23 11:57:39.476"/>
- <PartyContactMech partyId="sfa100" contactMechId="sfa100" fromDate="2000-01-01 00:00:00.000"/>
- <PartyContactMech partyId="sfa100" contactMechId="sfa101" fromDate="2000-01-01 00:00:00.000"/>
- <PartyContactMech partyId="sfa100" contactMechId="sfa102" fromDate="2000-01-01 00:00:00.000"/>
- <PartyContactMechPurpose partyId="sfa100" contactMechId="sfa100" contactMechPurposeTypeId="GENERAL_LOCATION" fromDate="2000-01-01 00:00:00.000"/>
- <PartyContactMechPurpose partyId="sfa100" contactMechId="sfa101" contactMechPurposeTypeId="PRIMARY_PHONE" fromDate="2000-01-01 00:00:00.000"/>
- <PartyContactMechPurpose partyId="sfa100" contactMechId="sfa102" contactMechPurposeTypeId="PRIMARY_EMAIL" fromDate="2000-01-01 00:00:00.000"/>
- <Party partyId="DemoCustCompany"/>
- <PartyRole partyId="DemoCustCompany" roleTypeId="ACCOUNT"/>
-
- <!-- demo contacts -->
- <Party partyId="DemoCustomer1"/>
- <PartyRole partyId="DemoCustomer1" roleTypeId="CONTACT"/>
- <PartyRelationship partyIdFrom="sfa100" roleTypeIdFrom="ACCOUNT" partyIdTo="DemoCustomer1" roleTypeIdTo="CONTACT" fromDate="2000-01-01 00:00:00.000" partyRelationshipTypeId="EMPLOYMENT"/>
- <Party partyId="DemoCustomer2"/>
- <PartyRole partyId="DemoCustomer2" roleTypeId="CONTACT"/>
- <PartyRelationship partyIdFrom="DemoCustCompany" roleTypeIdFrom="ACCOUNT" partyIdTo="DemoCustomer2" roleTypeIdTo="CONTACT" fromDate="2000-01-01 00:00:00.000" partyRelationshipTypeId="EMPLOYMENT"/>
- <Party partyId="DemoCustomer3"/>
- <PartyRole partyId="DemoCustomer3" roleTypeId="CONTACT"/>
- <PartyRelationship partyIdFrom="DemoCustCompany" roleTypeIdFrom="ACCOUNT" partyIdTo="DemoCustomer3" roleTypeIdTo="CONTACT" fromDate="2000-01-01 00:00:00.000" partyRelationshipTypeId="EMPLOYMENT"/>
-
- <!-- Demo Lead Owners -->
- <Party partyId="DemoLeadOwner" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
- <Person partyId="DemoLeadOwner" firstName="Demo" lastName="LeadOwner"/>
- <PartyRole partyId="DemoLeadOwner" roleTypeId="_NA_"/>
- <PartyRole partyId="DemoLeadOwner" roleTypeId="OWNER"/>
- <PartyRelationship partyIdFrom="Company" roleTypeIdFrom="_NA_" partyIdTo="DemoLeadOwner" roleTypeIdTo="_NA_" partyRelationshipTypeId="EMPLOYMENT" fromDate="2000-01-01 00:00:00"/>
- <UserLogin userLoginId="DemoLeadOwner" currentPassword="{SHA}47ca69ebb4bdc9ae0adec130880165d2cc05db1a" partyId="DemoLeadOwner" enabled="Y"/>
- <!-- FIXME: Establish SecurityGroup for SFA. This user should have access only to SFA -->
- <UserLoginSecurityGroup groupId="FULLADMIN" userLoginId="DemoLeadOwner" fromDate="2001-05-13 00:00:00.000"/>
-
- <Party partyId="DemoLeadOwner1" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
- <Person partyId="DemoLeadOwner1" firstName="Demo" lastName="LeadOwner1"/>
- <PartyRole partyId="DemoLeadOwner1" roleTypeId="_NA_"/>
- <PartyRole partyId="DemoLeadOwner1" roleTypeId="OWNER"/>
- <PartyRelationship partyIdFrom="Company" roleTypeIdFrom="_NA_" partyIdTo="DemoLeadOwner1" roleTypeIdTo="_NA_" partyRelationshipTypeId="EMPLOYMENT" fromDate="2000-01-01 00:00:00"/>
- <UserLogin userLoginId="DemoLeadOwner1" currentPassword="{SHA}47ca69ebb4bdc9ae0adec130880165d2cc05db1a" partyId="DemoLeadOwner1" enabled="Y"/>
- <!-- FIXME: Establish SecurityGroup for SFA. This user should have access only to SFA -->
- <UserLoginSecurityGroup groupId="FULLADMIN" userLoginId="DemoLeadOwner1" fromDate="2001-05-13 00:00:00.000"/>
-
- <!-- Demo Leads -->
- <Party partyId="sfa102" partyTypeId="PARTY_GROUP" statusId="PARTY_ENABLED"/>
- <PartyGroup partyId="sfa102" groupName="A promising Lead Company"/>
- <PartyRole partyId="sfa102" roleTypeId="ACCOUNT_LEAD"/>
- <PartyRole partyId="sfa102" roleTypeId="_NA_"/>
- <Party partyId="sfa101" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
- <Person partyId="sfa101" firstName="John" lastName="Lead"/>
- <PartyRole partyId="sfa101" roleTypeId="_NA_"/>
- <PartyRole partyId="sfa101" roleTypeId="LEAD"/>
- <!-- company to lead relationship -->
- <PartyRelationship partyIdFrom="sfa102" roleTypeIdFrom="ACCOUNT_LEAD" partyIdTo="sfa101" roleTypeIdTo="LEAD" fromDate="2000-01-01 00:00:00.000" partyRelationshipTypeId="EMPLOYMENT"/>
- <!-- owner to lead relationship -->
- <PartyRelationship partyIdFrom="DemoLeadOwner" roleTypeIdFrom="OWNER" partyIdTo="sfa101" roleTypeIdTo="LEAD" fromDate="2000-01-01 00:00:00.000" partyRelationshipTypeId="LEAD_OWNER"/>
- <ContactMech contactMechId="sfa103" contactMechTypeId="EMAIL_ADDRESS" infoString="ofbiztestLead@yahoo.com"/>
- <PartyContactMech partyId="sfa101" contactMechId="sfa103" fromDate="2000-01-01 00:00:00.000"/>
- <PartyContactMechPurpose partyId="sfa101" contactMechId="sfa103" contactMechPurposeTypeId="PRIMARY_EMAIL" fromDate="2000-01-01 00:00:00.000"/>
- <!-- Status Valid Change -->
- <StatusValidChange statusId="PARTY_ENABLED" statusIdTo="LEAD_CONVERTED" transitionName="Convert Lead To Contact"/>
- <StatusValidChange statusId="LEAD_CONVERTED" statusIdTo="PARTY_DISABLED" transitionName="Disabled"/>
-
- <Party partyId="DemoLead" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
- <Person partyId="DemoLead" firstName="Demo" lastName="Lead"/>
- <PartyRole partyId="DemoLead" roleTypeId="_NA_"/>
- <PartyRole partyId="DemoLead" roleTypeId="LEAD"/>
-
- <Party partyId="DemoLead1" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
- <Person partyId="DemoLead1" firstName="Demo" lastName="Lead1"/>
- <PartyRole partyId="DemoLead1" roleTypeId="_NA_"/>
- <PartyRole partyId="DemoLead1" roleTypeId="LEAD"/>
-
- <Party partyId="DemoLead2" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
- <Person partyId="DemoLead2" firstName="Demo" lastName="Lead2"/>
- <PartyRole partyId="DemoLead2" roleTypeId="_NA_"/>
- <PartyRole partyId="DemoLead2" roleTypeId="LEAD"/>
-
- <Party partyId="DemoLead3" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
- <Person partyId="DemoLead3" firstName="Demo" lastName="Lead3"/>
- <PartyRole partyId="DemoLead3" roleTypeId="_NA_"/>
- <PartyRole partyId="DemoLead3" roleTypeId="LEAD"/>
-
- <Party partyId="DemoLead4" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
- <Person partyId="DemoLead4" firstName="Demo" lastName="Lead4"/>
- <PartyRole partyId="DemoLead4" roleTypeId="_NA_"/>
- <PartyRole partyId="DemoLead4" roleTypeId="LEAD"/>
-
- <!-- Lead Owners Team -->
- <Party partyId="DemoLeadOwnersGroup" partyTypeId="TEAM" statusId="PARTY_ENABLED"/>
- <PartyGroup partyId="DemoLeadOwnersGroup" groupName="A Group of Lead Owners"/>
- <PartyRole partyId="DemoLeadOwnersGroup" roleTypeId="_NA_"/>
- <PartyRole partyId="DemoLeadOwnersGroup" roleTypeId="INTERNAL_ORGANIZATIO"/>
- <PartyRelationship partyIdFrom="Company" partyIdTo="DemoLeadOwnersGroup" partyRelationshipTypeId="GROUP_ROLLUP" roleTypeIdFrom="_NA_" roleTypeIdTo="_NA_" fromDate="2001-05-13 00:00:00.000"/>
-
- <!-- Leads of DemoLeadOwner -->
- <PartyRelationship partyIdFrom="DemoLeadOwner" roleTypeIdFrom="OWNER" partyIdTo="DemoLead" roleTypeIdTo="LEAD" fromDate="2001-05-13 00:00:00.000" partyRelationshipTypeId="LEAD_OWNER"/>
- <PartyRelationship partyIdFrom="DemoLeadOwner" roleTypeIdFrom="OWNER" partyIdTo="DemoLead1" roleTypeIdTo="LEAD" fromDate="2001-05-13 00:00:00.000" partyRelationshipTypeId="LEAD_OWNER"/>
- <PartyRelationship partyIdFrom="DemoLeadOwner" roleTypeIdFrom="OWNER" partyIdTo="DemoLead2" roleTypeIdTo="LEAD" fromDate="2001-05-13 00:00:00.000" partyRelationshipTypeId="LEAD_OWNER"/>
-
- <!-- Leads of DemoLeadOwner1 -->
- <PartyRelationship partyIdFrom="DemoLeadOwner1" roleTypeIdFrom="OWNER" partyIdTo="DemoLead3" roleTypeIdTo="LEAD" fromDate="2001-05-13 00:00:00.000" partyRelationshipTypeId="LEAD_OWNER"/>
- <PartyRelationship partyIdFrom="DemoLeadOwner1" roleTypeIdFrom="OWNER" partyIdTo="DemoLead4" roleTypeIdTo="LEAD" fromDate="2001-05-13 00:00:00.000" partyRelationshipTypeId="LEAD_OWNER"/>
-
- <PartyRelationship partyIdFrom="DemoLeadOwnersGroup" roleTypeIdFrom="INTERNAL_ORGANIZATIO" partyIdTo="DemoLeadOwner" roleTypeIdTo="OWNER" fromDate="2001-05-13 00:00:00.000" partyRelationshipTypeId="LEAD_OWN_GRP_MEMBER"/>
- <PartyRelationship partyIdFrom="DemoLeadOwnersGroup" roleTypeIdFrom="INTERNAL_ORGANIZATIO" partyIdTo="DemoLeadOwner1" roleTypeIdTo="OWNER" fromDate="2001-05-13 00:00:00.000" partyRelationshipTypeId="LEAD_OWN_GRP_MEMBER"/>
-
- <SalesOpportunityStage opportunityStageId="SOSTG_PROSPECT" description="Prospect" defaultProbability="0.050000" sequenceNum="1" lastUpdatedStamp="2009-04-20 10:23:33.982" lastUpdatedTxStamp="2009-04-20 10:23:33.972" createdStamp="2009-04-20 10:23:33.982" createdTxStamp="2009-04-20 10:23:33.972"/>
- <SalesOpportunityStage opportunityStageId="SOSTG_PROPOSAL" description="Proposal" defaultProbability="0.200000" sequenceNum="2" lastUpdatedStamp="2009-04-20 10:23:33.98" lastUpdatedTxStamp="2009-04-20 10:23:33.972" createdStamp="2009-04-20 10:23:33.98" createdTxStamp="2009-04-20 10:23:33.972"/>
- <SalesOpportunityStage opportunityStageId="SOSTG_QUOTED" description="Quoted" defaultProbability="0.400000" sequenceNum="3" lastUpdatedStamp="2009-04-20 10:23:33.983" lastUpdatedTxStamp="2009-04-20 10:23:33.972" createdStamp="2009-04-20 10:23:33.983" createdTxStamp="2009-04-20 10:23:33.972"/>
- <SalesOpportunityStage opportunityStageId="SOSTG_CLOSED" description="Closed" defaultProbability="1.000000" sequenceNum="4" lastUpdatedStamp="2009-04-20 10:23:33.978" lastUpdatedTxStamp="2009-04-20 10:23:33.972" createdStamp="2009-04-20 10:23:33.978" createdTxStamp="2009-04-20 10:23:33.972"/>
-
- <Enumeration enumId="SLSOPP_ECOMMERCE" enumTypeId="SLSOPP_TYP_ENUM" description="Ecommerce"/>
- <Enumeration enumId="SLSOPP_ERP" enumTypeId="SLSOPP_TYP_ENUM" description="ERP"/>
- <Enumeration enumId="SLSOPP_INSTALL" enumTypeId="SLSOPP_TYP_ENUM" description="Installation"/>
- <Enumeration enumId="SLSOPP_CUSTM" enumTypeId="SLSOPP_TYP_ENUM" description="Customization"/>
- <Enumeration enumId="SLSOPP_SUPPORT" enumTypeId="SLSOPP_TYP_ENUM" description="Support plan"/>
-
-</entity-engine-xml>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<entity-engine-xml>
+
+ <!-- demo accounts -->
+ <Party partyId="sfa100" partyTypeId="PARTY_GROUP" statusId="PARTY_ENABLED"/>
+ <PartyGroup partyId="sfa100" groupName="A profitable Account"/>
+ <PartyRole partyId="sfa100" roleTypeId="_NA_"/>
+ <PartyRole partyId="sfa100" roleTypeId="ACCOUNT"/>
+ <ContactMech contactMechId="sfa100" contactMechTypeId="POSTAL_ADDRESS"/>
+ <ContactMech contactMechId="sfa101" contactMechTypeId="TELECOM_NUMBER"/>
+ <ContactMech contactMechId="sfa102" contactMechTypeId="EMAIL_ADDRESS" infoString="ofbiztest@example.com"/>
+ <PostalAddress contactMechId="sfa100" address1="151 Madison street." city="Edison" postalCode="32451" lastUpdatedStamp="2008-05-23 11:57:40.936" lastUpdatedTxStamp="2008-05-23 11:57:39.476" createdStamp="2008-05-23 11:57:40.936" createdTxStamp="2008-05-23 11:57:39.476"/>
+ <TelecomNumber contactMechId="sfa101" countryCode="1" areaCode="33" contactNumber="12456" lastUpdatedStamp="2008-05-23 11:57:41.179" lastUpdatedTxStamp="2008-05-23 11:57:39.476" createdStamp="2008-05-23 11:57:41.179" createdTxStamp="2008-05-23 11:57:39.476"/>
+ <PartyContactMech partyId="sfa100" contactMechId="sfa100" fromDate="2000-01-01 00:00:00.000"/>
+ <PartyContactMech partyId="sfa100" contactMechId="sfa101" fromDate="2000-01-01 00:00:00.000"/>
+ <PartyContactMech partyId="sfa100" contactMechId="sfa102" fromDate="2000-01-01 00:00:00.000"/>
+ <PartyContactMechPurpose partyId="sfa100" contactMechId="sfa100" contactMechPurposeTypeId="GENERAL_LOCATION" fromDate="2000-01-01 00:00:00.000"/>
+ <PartyContactMechPurpose partyId="sfa100" contactMechId="sfa101" contactMechPurposeTypeId="PRIMARY_PHONE" fromDate="2000-01-01 00:00:00.000"/>
+ <PartyContactMechPurpose partyId="sfa100" contactMechId="sfa102" contactMechPurposeTypeId="PRIMARY_EMAIL" fromDate="2000-01-01 00:00:00.000"/>
+ <Party partyId="DemoCustCompany"/>
+ <PartyRole partyId="DemoCustCompany" roleTypeId="ACCOUNT"/>
+
+ <!-- demo contacts -->
+ <Party partyId="DemoCustomer1"/>
+ <PartyRole partyId="DemoCustomer1" roleTypeId="CONTACT"/>
+ <PartyRelationship partyIdFrom="sfa100" roleTypeIdFrom="ACCOUNT" partyIdTo="DemoCustomer1" roleTypeIdTo="CONTACT" fromDate="2000-01-01 00:00:00.000" partyRelationshipTypeId="EMPLOYMENT"/>
+ <Party partyId="DemoCustomer2"/>
+ <PartyRole partyId="DemoCustomer2" roleTypeId="CONTACT"/>
+ <PartyRelationship partyIdFrom="DemoCustCompany" roleTypeIdFrom="ACCOUNT" partyIdTo="DemoCustomer2" roleTypeIdTo="CONTACT" fromDate="2000-01-01 00:00:00.000" partyRelationshipTypeId="EMPLOYMENT"/>
+ <Party partyId="DemoCustomer3"/>
+ <PartyRole partyId="DemoCustomer3" roleTypeId="CONTACT"/>
+ <PartyRelationship partyIdFrom="DemoCustCompany" roleTypeIdFrom="ACCOUNT" partyIdTo="DemoCustomer3" roleTypeIdTo="CONTACT" fromDate="2000-01-01 00:00:00.000" partyRelationshipTypeId="EMPLOYMENT"/>
+
+ <!-- Demo Lead Owners -->
+ <Party partyId="DemoLeadOwner" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
+ <Person partyId="DemoLeadOwner" firstName="Demo" lastName="LeadOwner"/>
+ <PartyRole partyId="DemoLeadOwner" roleTypeId="_NA_"/>
+ <PartyRole partyId="DemoLeadOwner" roleTypeId="OWNER"/>
+ <PartyRelationship partyIdFrom="Company" roleTypeIdFrom="_NA_" partyIdTo="DemoLeadOwner" roleTypeIdTo="_NA_" partyRelationshipTypeId="EMPLOYMENT" fromDate="2000-01-01 00:00:00"/>
+ <UserLogin userLoginId="DemoLeadOwner" currentPassword="{SHA}47ca69ebb4bdc9ae0adec130880165d2cc05db1a" partyId="DemoLeadOwner" enabled="Y"/>
+ <!-- FIXME: Establish SecurityGroup for SFA. This user should have access only to SFA -->
+ <UserLoginSecurityGroup groupId="FULLADMIN" userLoginId="DemoLeadOwner" fromDate="2001-05-13 00:00:00.000"/>
+
+ <Party partyId="DemoLeadOwner1" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
+ <Person partyId="DemoLeadOwner1" firstName="Demo" lastName="LeadOwner1"/>
+ <PartyRole partyId="DemoLeadOwner1" roleTypeId="_NA_"/>
+ <PartyRole partyId="DemoLeadOwner1" roleTypeId="OWNER"/>
+ <PartyRelationship partyIdFrom="Company" roleTypeIdFrom="_NA_" partyIdTo="DemoLeadOwner1" roleTypeIdTo="_NA_" partyRelationshipTypeId="EMPLOYMENT" fromDate="2000-01-01 00:00:00"/>
+ <UserLogin userLoginId="DemoLeadOwner1" currentPassword="{SHA}47ca69ebb4bdc9ae0adec130880165d2cc05db1a" partyId="DemoLeadOwner1" enabled="Y"/>
+ <!-- FIXME: Establish SecurityGroup for SFA. This user should have access only to SFA -->
+ <UserLoginSecurityGroup groupId="FULLADMIN" userLoginId="DemoLeadOwner1" fromDate="2001-05-13 00:00:00.000"/>
+
+ <!-- Demo Leads -->
+ <Party partyId="sfa102" partyTypeId="PARTY_GROUP" statusId="PARTY_ENABLED"/>
+ <PartyGroup partyId="sfa102" groupName="A promising Lead Company"/>
+ <PartyRole partyId="sfa102" roleTypeId="ACCOUNT_LEAD"/>
+ <PartyRole partyId="sfa102" roleTypeId="_NA_"/>
+ <Party partyId="sfa101" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
+ <Person partyId="sfa101" firstName="John" lastName="Lead"/>
+ <PartyRole partyId="sfa101" roleTypeId="_NA_"/>
+ <PartyRole partyId="sfa101" roleTypeId="LEAD"/>
+ <!-- company to lead relationship -->
+ <PartyRelationship partyIdFrom="sfa102" roleTypeIdFrom="ACCOUNT_LEAD" partyIdTo="sfa101" roleTypeIdTo="LEAD" fromDate="2000-01-01 00:00:00.000" partyRelationshipTypeId="EMPLOYMENT"/>
+ <!-- owner to lead relationship -->
+ <PartyRelationship partyIdFrom="DemoLeadOwner" roleTypeIdFrom="OWNER" partyIdTo="sfa101" roleTypeIdTo="LEAD" fromDate="2000-01-01 00:00:00.000" partyRelationshipTypeId="LEAD_OWNER"/>
+ <ContactMech contactMechId="sfa103" contactMechTypeId="EMAIL_ADDRESS" infoString="ofbiztestLead@example.com"/>
+ <PartyContactMech partyId="sfa101" contactMechId="sfa103" fromDate="2000-01-01 00:00:00.000"/>
+ <PartyContactMechPurpose partyId="sfa101" contactMechId="sfa103" contactMechPurposeTypeId="PRIMARY_EMAIL" fromDate="2000-01-01 00:00:00.000"/>
+ <!-- Status Valid Change -->
+ <StatusValidChange statusId="PARTY_ENABLED" statusIdTo="LEAD_CONVERTED" transitionName="Convert Lead To Contact"/>
+ <StatusValidChange statusId="LEAD_CONVERTED" statusIdTo="PARTY_DISABLED" transitionName="Disabled"/>
+
+ <Party partyId="DemoLead" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
+ <Person partyId="DemoLead" firstName="Demo" lastName="Lead"/>
+ <PartyRole partyId="DemoLead" roleTypeId="_NA_"/>
+ <PartyRole partyId="DemoLead" roleTypeId="LEAD"/>
+
+ <Party partyId="DemoLead1" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
+ <Person partyId="DemoLead1" firstName="Demo" lastName="Lead1"/>
+ <PartyRole partyId="DemoLead1" roleTypeId="_NA_"/>
+ <PartyRole partyId="DemoLead1" roleTypeId="LEAD"/>
+
+ <Party partyId="DemoLead2" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
+ <Person partyId="DemoLead2" firstName="Demo" lastName="Lead2"/>
+ <PartyRole partyId="DemoLead2" roleTypeId="_NA_"/>
+ <PartyRole partyId="DemoLead2" roleTypeId="LEAD"/>
+
+ <Party partyId="DemoLead3" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
+ <Person partyId="DemoLead3" firstName="Demo" lastName="Lead3"/>
+ <PartyRole partyId="DemoLead3" roleTypeId="_NA_"/>
+ <PartyRole partyId="DemoLead3" roleTypeId="LEAD"/>
+
+ <Party partyId="DemoLead4" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
+ <Person partyId="DemoLead4" firstName="Demo" lastName="Lead4"/>
+ <PartyRole partyId="DemoLead4" roleTypeId="_NA_"/>
+ <PartyRole partyId="DemoLead4" roleTypeId="LEAD"/>
+
+ <!-- Lead Owners Team -->
+ <Party partyId="DemoLeadOwnersGroup" partyTypeId="TEAM" statusId="PARTY_ENABLED"/>
+ <PartyGroup partyId="DemoLeadOwnersGroup" groupName="A Group of Lead Owners"/>
+ <PartyRole partyId="DemoLeadOwnersGroup" roleTypeId="_NA_"/>
+ <PartyRole partyId="DemoLeadOwnersGroup" roleTypeId="INTERNAL_ORGANIZATIO"/>
+ <PartyRelationship partyIdFrom="Company" partyIdTo="DemoLeadOwnersGroup" partyRelationshipTypeId="GROUP_ROLLUP" roleTypeIdFrom="_NA_" roleTypeIdTo="_NA_" fromDate="2001-05-13 00:00:00.000"/>
+
+ <!-- Leads of DemoLeadOwner -->
+ <PartyRelationship partyIdFrom="DemoLeadOwner" roleTypeIdFrom="OWNER" partyIdTo="DemoLead" roleTypeIdTo="LEAD" fromDate="2001-05-13 00:00:00.000" partyRelationshipTypeId="LEAD_OWNER"/>
+ <PartyRelationship partyIdFrom="DemoLeadOwner" roleTypeIdFrom="OWNER" partyIdTo="DemoLead1" roleTypeIdTo="LEAD" fromDate="2001-05-13 00:00:00.000" partyRelationshipTypeId="LEAD_OWNER"/>
+ <PartyRelationship partyIdFrom="DemoLeadOwner" roleTypeIdFrom="OWNER" partyIdTo="DemoLead2" roleTypeIdTo="LEAD" fromDate="2001-05-13 00:00:00.000" partyRelationshipTypeId="LEAD_OWNER"/>
+
+ <!-- Leads of DemoLeadOwner1 -->
+ <PartyRelationship partyIdFrom="DemoLeadOwner1" roleTypeIdFrom="OWNER" partyIdTo="DemoLead3" roleTypeIdTo="LEAD" fromDate="2001-05-13 00:00:00.000" partyRelationshipTypeId="LEAD_OWNER"/>
+ <PartyRelationship partyIdFrom="DemoLeadOwner1" roleTypeIdFrom="OWNER" partyIdTo="DemoLead4" roleTypeIdTo="LEAD" fromDate="2001-05-13 00:00:00.000" partyRelationshipTypeId="LEAD_OWNER"/>
+
+ <PartyRelationship partyIdFrom="DemoLeadOwnersGroup" roleTypeIdFrom="INTERNAL_ORGANIZATIO" partyIdTo="DemoLeadOwner" roleTypeIdTo="OWNER" fromDate="2001-05-13 00:00:00.000" partyRelationshipTypeId="LEAD_OWN_GRP_MEMBER"/>
+ <PartyRelationship partyIdFrom="DemoLeadOwnersGroup" roleTypeIdFrom="INTERNAL_ORGANIZATIO" partyIdTo="DemoLeadOwner1" roleTypeIdTo="OWNER" fromDate="2001-05-13 00:00:00.000" partyRelationshipTypeId="LEAD_OWN_GRP_MEMBER"/>
+
+ <SalesOpportunityStage opportunityStageId="SOSTG_PROSPECT" description="Prospect" defaultProbability="0.050000" sequenceNum="1" lastUpdatedStamp="2009-04-20 10:23:33.982" lastUpdatedTxStamp="2009-04-20 10:23:33.972" createdStamp="2009-04-20 10:23:33.982" createdTxStamp="2009-04-20 10:23:33.972"/>
+ <SalesOpportunityStage opportunityStageId="SOSTG_PROPOSAL" description="Proposal" defaultProbability="0.200000" sequenceNum="2" lastUpdatedStamp="2009-04-20 10:23:33.98" lastUpdatedTxStamp="2009-04-20 10:23:33.972" createdStamp="2009-04-20 10:23:33.98" createdTxStamp="2009-04-20 10:23:33.972"/>
+ <SalesOpportunityStage opportunityStageId="SOSTG_QUOTED" description="Quoted" defaultProbability="0.400000" sequenceNum="3" lastUpdatedStamp="2009-04-20 10:23:33.983" lastUpdatedTxStamp="2009-04-20 10:23:33.972" createdStamp="2009-04-20 10:23:33.983" createdTxStamp="2009-04-20 10:23:33.972"/>
+ <SalesOpportunityStage opportunityStageId="SOSTG_CLOSED" description="Closed" defaultProbability="1.000000" sequenceNum="4" lastUpdatedStamp="2009-04-20 10:23:33.978" lastUpdatedTxStamp="2009-04-20 10:23:33.972" createdStamp="2009-04-20 10:23:33.978" createdTxStamp="2009-04-20 10:23:33.972"/>
+
+ <Enumeration enumId="SLSOPP_ECOMMERCE" enumTypeId="SLSOPP_TYP_ENUM" description="Ecommerce"/>
+ <Enumeration enumId="SLSOPP_ERP" enumTypeId="SLSOPP_TYP_ENUM" description="ERP"/>
+ <Enumeration enumId="SLSOPP_INSTALL" enumTypeId="SLSOPP_TYP_ENUM" description="Installation"/>
+ <Enumeration enumId="SLSOPP_CUSTM" enumTypeId="SLSOPP_TYP_ENUM" description="Customization"/>
+ <Enumeration enumId="SLSOPP_SUPPORT" enumTypeId="SLSOPP_TYP_ENUM" description="Support plan"/>
+
+</entity-engine-xml>
Modified: ofbiz/branches/jquery/applications/order/data/OrderTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/data/OrderTypeData.xml?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/data/OrderTypeData.xml (original)
+++ ofbiz/branches/jquery/applications/order/data/OrderTypeData.xml Tue Dec 7 10:42:16 2010
@@ -42,6 +42,7 @@ under the License.
<OrderAdjustmentType description="Fee" hasTable="N" orderAdjustmentTypeId="FEE" parentTypeId=""/>
<OrderAdjustmentType description="Miscellaneous Charges" hasTable="N" orderAdjustmentTypeId="MISCELLANEOUS_CHARGE" parentTypeId=""/>
<OrderAdjustmentType description="Sales Tax" hasTable="N" orderAdjustmentTypeId="SALES_TAX" parentTypeId=""/>
+ <OrderAdjustmentType description="VAT Tax (not added to totals)" hasTable="N" orderAdjustmentTypeId="VAT_TAX" parentTypeId=""/>
<OrderAdjustmentType description="VAT Price Correction" hasTable="N" orderAdjustmentTypeId="VAT_PRICE_CORRECT" parentTypeId=""/>
<OrderAdjustmentType description="Shipping and Handling" hasTable="N" orderAdjustmentTypeId="SHIPPING_CHARGES" parentTypeId=""/>
<OrderAdjustmentType description="Surcharge" hasTable="N" orderAdjustmentTypeId="SURCHARGE_ADJUSTMENT" parentTypeId=""/>
Modified: ofbiz/branches/jquery/applications/order/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/entitydef/entitymodel.xml?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/entitydef/entitymodel.xml (original)
+++ ofbiz/branches/jquery/applications/order/entitydef/entitymodel.xml Tue Dec 7 10:42:16 2010
@@ -59,6 +59,7 @@ under the License.
<field name="description" type="description"></field>
<field name="amount" type="currency-precise"></field>
<field name="recurringAmount" type="currency-precise"></field>
+ <field name="amountAlreadyIncluded" type="currency-precise"><description>The amount here is already represented in the price, such as VAT taxes.</description></field>
<field name="productPromoId" type="id"></field>
<field name="productPromoRuleId" type="id"></field>
<field name="productPromoActionSeqId" type="id"></field>
Propchange: ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 7 10:42:16 2010
@@ -1,3 +1,3 @@
/ofbiz/branches/addbirt/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml:831210-885099,885686-886087
/ofbiz/branches/multitenant20100310/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml:921280-927264
-/ofbiz/trunk/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml:951708-1040441
+/ofbiz/trunk/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml:951708-1042956
Modified: ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/shoppinglist/ShoppingListServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/shoppinglist/ShoppingListServices.xml?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/shoppinglist/ShoppingListServices.xml (original)
+++ ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/shoppinglist/ShoppingListServices.xml Tue Dec 7 10:42:16 2010
@@ -321,6 +321,7 @@ under the License.
<set field="createShoppingListInMap.partyId" from-field="orderRole.partyId"/>
<set field="createShoppingListInMap.listName" value="Auto Suggestions"/>
<set field="createShoppingListInMap.shoppingListTypeId" value="SLT_WISH_LIST"/>
+ <set field="createShoppingListInMap.productStoreId" from-field="parameters.productStoreId"/>
<call-service service-name="createShoppingList" in-map-name="createShoppingListInMap">
<result-to-field result-name="shoppingListId"/>
</call-service>
Modified: ofbiz/branches/jquery/applications/order/servicedef/orderProcessXPDL.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/servicedef/orderProcessXPDL.xml?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/servicedef/orderProcessXPDL.xml (original)
+++ ofbiz/branches/jquery/applications/order/servicedef/orderProcessXPDL.xml Tue Dec 7 10:42:16 2010
@@ -88,7 +88,7 @@ under the License.
<DataType>
<BasicType Type="STRING"/>
</DataType>
- <InitialValue>ofbiztest@yahoo.com</InitialValue>
+ <InitialValue>ofbiztest@example.com</InitialValue>
</DataField>
</DataFields>
Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java (original)
+++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java Tue Dec 7 10:42:16 2010
@@ -2920,4 +2920,62 @@ public class OrderReadHelper {
result.put("taxGrandTotal", taxGrandTotal);
return result;
}
+
+ public static Map<String, Object> getOrderTaxByTaxAuthGeoAndPartyForDisplay(List<GenericValue> orderAdjustmentsOriginal) {
+ BigDecimal taxGrandTotal = BigDecimal.ZERO;
+ List<Map<String, Object>> taxByTaxAuthGeoAndPartyList = FastList.newInstance();
+ List<GenericValue> orderAdjustmentsToUse = FastList.newInstance();
+ if (UtilValidate.isNotEmpty(orderAdjustmentsOriginal)) {
+ // get orderAdjustment where orderAdjustmentTypeId is SALES_TAX.
+ orderAdjustmentsToUse.addAll(EntityUtil.filterByAnd(orderAdjustmentsOriginal, UtilMisc.toMap("orderAdjustmentTypeId", "SALES_TAX")));
+ orderAdjustmentsToUse.addAll(EntityUtil.filterByAnd(orderAdjustmentsOriginal, UtilMisc.toMap("orderAdjustmentTypeId", "VAT_TAX")));
+ orderAdjustmentsToUse = EntityUtil.orderBy(orderAdjustmentsToUse, UtilMisc.toList("taxAuthGeoId","taxAuthPartyId"));
+
+ // get the list of all distinct taxAuthGeoId and taxAuthPartyId. It is for getting the number of taxAuthGeo and taxAuthPartyId in adjustments.
+ List<String> distinctTaxAuthGeoIdList = EntityUtil.getFieldListFromEntityList(orderAdjustmentsToUse, "taxAuthGeoId", true);
+ List<String> distinctTaxAuthPartyIdList = EntityUtil.getFieldListFromEntityList(orderAdjustmentsToUse, "taxAuthPartyId", true);
+
+ // Keep a list of amount that have been added to make sure none are missed (if taxAuth* information is missing)
+ List<GenericValue> processedAdjustments = FastList.newInstance();
+ // For each taxAuthGeoId get and add amount from orderAdjustment
+ for (String taxAuthGeoId : distinctTaxAuthGeoIdList) {
+ for (String taxAuthPartyId : distinctTaxAuthPartyIdList) {
+ //get all records for orderAdjustments filtered by taxAuthGeoId and taxAurhPartyId
+ List<GenericValue> orderAdjByTaxAuthGeoAndPartyIds = EntityUtil.filterByAnd(orderAdjustmentsToUse, UtilMisc.toMap("taxAuthGeoId", taxAuthGeoId, "taxAuthPartyId", taxAuthPartyId));
+ if (UtilValidate.isNotEmpty(orderAdjByTaxAuthGeoAndPartyIds)) {
+ BigDecimal totalAmount = BigDecimal.ZERO;
+ //Now for each orderAdjustment record get and add amount.
+ for (GenericValue orderAdjustment : orderAdjByTaxAuthGeoAndPartyIds) {
+ BigDecimal amount = orderAdjustment.getBigDecimal("amount");
+ if (amount != null) {
+ totalAmount = totalAmount.add(amount);
+ }
+ if ("VAT_TAX".equals(orderAdjustment.getString("orderAdjustmentTypeId")) &&
+ orderAdjustment.get("amountAlreadyIncluded") != null) {
+ // this is the only case where the VAT_TAX amountAlreadyIncluded should be added in, and should just be for display and not to calculate the order grandTotal
+ totalAmount = totalAmount.add(orderAdjustment.getBigDecimal("amountAlreadyIncluded"));
+ }
+ totalAmount = totalAmount.setScale(taxCalcScale, taxRounding);
+ processedAdjustments.add(orderAdjustment);
+ }
+ totalAmount = totalAmount.setScale(taxFinalScale, taxRounding);
+ taxByTaxAuthGeoAndPartyList.add(UtilMisc.<String, Object>toMap("taxAuthPartyId", taxAuthPartyId, "taxAuthGeoId", taxAuthGeoId, "totalAmount", totalAmount));
+ taxGrandTotal = taxGrandTotal.add(totalAmount);
+ }
+ }
+ }
+ // Process any adjustments that got missed
+ List<GenericValue> missedAdjustments = FastList.newInstance();
+ missedAdjustments.addAll(orderAdjustmentsToUse);
+ missedAdjustments.removeAll(processedAdjustments);
+ for (GenericValue orderAdjustment : missedAdjustments) {
+ taxGrandTotal = taxGrandTotal.add(orderAdjustment.getBigDecimal("amount").setScale(taxCalcScale, taxRounding));
+ }
+ taxGrandTotal = taxGrandTotal.setScale(taxFinalScale, taxRounding);
+ }
+ Map<String, Object> result = FastMap.newInstance();
+ result.put("taxByTaxAuthGeoAndPartyList", taxByTaxAuthGeoAndPartyList);
+ result.put("taxGrandTotal", taxGrandTotal);
+ return result;
+ }
}
Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java (original)
+++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java Tue Dec 7 10:42:16 2010
@@ -2648,7 +2648,7 @@ public class OrderReturnServices {
originalTotal = originalTotal.setScale(decimals, rounding);
BigDecimal newAmount = null;
if (ZERO.compareTo(originalTotal) != 0) {
- newAmount = returnTotal.divide(originalTotal, decimals, rounding).multiply(amount).setScale(decimals, rounding);
+ newAmount = returnTotal.multiply(amount).divide(originalTotal, decimals, rounding);
} else {
newAmount = ZERO;
}
Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java Tue Dec 7 10:42:16 2010
@@ -2134,8 +2134,8 @@ public class OrderServices {
String newItemStatusId = null;
if ("ORDER_APPROVED".equals(statusId)) {
newItemStatusId = "ITEM_APPROVED";
- } else if ("ORDER_COMPLETE".equals(statusId)) {
- newItemStatusId = "ITEM_COMPLETE";
+ } else if ("ORDER_COMPLETED".equals(statusId)) {
+ newItemStatusId = "ITEM_COMPLETED";
} else if ("ORDER_CANCELLED".equals(statusId)) {
newItemStatusId = "ITEM_CANCELLED";
}
@@ -3796,6 +3796,7 @@ public class OrderServices {
exprs.add(EntityCondition.makeCondition("orderAdjustmentTypeId", EntityOperator.EQUALS, "PROMOTION_ADJUSTMENT"));
exprs.add(EntityCondition.makeCondition("orderAdjustmentTypeId", EntityOperator.EQUALS, "SHIPPING_CHARGES"));
exprs.add(EntityCondition.makeCondition("orderAdjustmentTypeId", EntityOperator.EQUALS, "SALES_TAX"));
+ exprs.add(EntityCondition.makeCondition("orderAdjustmentTypeId", EntityOperator.EQUALS, "VAT_TAX"));
exprs.add(EntityCondition.makeCondition("orderAdjustmentTypeId", EntityOperator.EQUALS, "VAT_PRICE_CORRECT"));
adjExprs.add(EntityCondition.makeCondition(exprs, EntityOperator.OR));
EntityCondition cond = EntityCondition.makeCondition(adjExprs, EntityOperator.AND);
Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java (original)
+++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java Tue Dec 7 10:42:16 2010
@@ -749,22 +749,34 @@ public class CheckOutHelper {
}
public void calcAndAddTax() throws GeneralException {
- calcAndAddTax(null);
+ calcAndAddTax(null, false);
+ }
+
+ public void calcAndAddTax(boolean skipEmptyAddresses) throws GeneralException {
+ calcAndAddTax(null, skipEmptyAddresses);
}
public void calcAndAddTax(GenericValue shipAddress) throws GeneralException {
+ calcAndAddTax(shipAddress, false);
+ }
+
+ public void calcAndAddTax(GenericValue shipAddress, boolean skipEmptyAddresses) throws GeneralException {
if (UtilValidate.isEmpty(cart.getShippingContactMechId()) && cart.getBillingAddress() == null && shipAddress == null) {
return;
}
int shipGroups = this.cart.getShipGroupSize();
for (int i = 0; i < shipGroups; i++) {
+ ShoppingCart.CartShipInfo csi = cart.getShipInfo(i);
Map<Integer, ShoppingCartItem> shoppingCartItemIndexMap = new HashMap<Integer, ShoppingCartItem>();
- Map<String, Object> serviceContext = this.makeTaxContext(i, shipAddress, shoppingCartItemIndexMap, cart.getFacilityId());
+ Map<String, Object> serviceContext = this.makeTaxContext(i, shipAddress, shoppingCartItemIndexMap, cart.getFacilityId(), skipEmptyAddresses);
+ if (skipEmptyAddresses && serviceContext == null) {
+ csi.clearAllTaxInfo();
+ continue;
+ }
List<List<? extends Object>> taxReturn = this.getTaxAdjustments(dispatcher, "calcTax", serviceContext);
if (Debug.verboseOn()) Debug.logVerbose("ReturnList: " + taxReturn, module);
- ShoppingCart.CartShipInfo csi = cart.getShipInfo(i);
List<GenericValue> orderAdj = UtilGenerics.checkList(taxReturn.get(0));
List<List<GenericValue>> itemAdj = UtilGenerics.checkList(taxReturn.get(1));
@@ -787,7 +799,7 @@ public class CheckOutHelper {
}
}
- private Map<String, Object> makeTaxContext(int shipGroup, GenericValue shipAddress, Map<Integer, ShoppingCartItem> shoppingCartItemIndexMap, String originFacilityId) {
+ private Map<String, Object> makeTaxContext(int shipGroup, GenericValue shipAddress, Map<Integer, ShoppingCartItem> shoppingCartItemIndexMap, String originFacilityId, boolean skipEmptyAddresses) {
ShoppingCart.CartShipInfo csi = cart.getShipInfo(shipGroup);
int totalItems = csi.shipItemInfo.size();
@@ -825,6 +837,10 @@ public class CheckOutHelper {
// Debug.logInfo("====== makeTaxContext set shipAddress to cart.getShippingAddress(shipGroup): " + shipAddress, module);
}
+ if (shipAddress == null && skipEmptyAddresses) {
+ return null;
+ }
+
// no shipping address; try the billing address
if (shipAddress == null) {
for (int i = 0; i < cart.selectedPayments(); i++) {
Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Tue Dec 7 10:42:16 2010
@@ -4441,6 +4441,14 @@ public class ShoppingCart implements Ite
}
}
+ public void clearAllTaxInfo() {
+ this.shipTaxAdj.clear();
+ Iterator i = shipItemInfo.values().iterator();
+ while (i.hasNext()) {
+ CartShipItemInfo itemInfo = (CartShipItemInfo) i.next();
+ itemInfo.itemTaxAdj.clear();
+ }
+ }
public List makeItemShipGroupAndAssoc(Delegator delegator, ShoppingCart cart, long groupIndex) {
shipGroupSeqId = UtilFormatOut.formatPaddedNumber(groupIndex, 5);
Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java (original)
+++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java Tue Dec 7 10:42:16 2010
@@ -549,6 +549,21 @@ public class ShoppingCartEvents {
Debug.logError(e.getMessage(), module);
}
}
+
+ // check for alternative packing
+ if(ProductWorker.isAlternativePacking(delegator, productId , parentProductId)){
+ GenericValue parentProduct = null;
+ try {
+ parentProduct = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", parentProductId));
+ } catch (GenericEntityException e) {
+ Debug.logError(e, "Error getting parent product", module);
+ }
+ BigDecimal piecesIncluded = BigDecimal.ZERO;
+ if(parentProduct != null){
+ piecesIncluded = new BigDecimal(parentProduct.getLong("piecesIncluded"));
+ quantity = quantity.multiply(piecesIncluded);
+ }
+ }
// Translate the parameters and add to the cart
result = cartHelper.addToCart(catalogId, shoppingListId, shoppingListItemSeqId, productId, productCategoryId,
@@ -1342,6 +1357,7 @@ public class ShoppingCartEvents {
cart = (ShoppingCart) outMap.get("shoppingCart");
cart.removeAdjustmentByType("SALES_TAX");
+ cart.removeAdjustmentByType("VAT_TAX");
cart.removeAdjustmentByType("VAT_PRICE_CORRECT");
cart.removeAdjustmentByType("PROMOTION_ADJUSTMENT");
String shipGroupSeqId = null;
Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java (original)
+++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java Tue Dec 7 10:42:16 2010
@@ -20,6 +20,7 @@ package org.ofbiz.order.shoppingcart;
import java.math.BigDecimal;
import java.math.MathContext;
+import java.math.RoundingMode;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Arrays;
@@ -985,7 +986,7 @@ public class ShoppingCartItem implements
}
protected void setQuantity(BigDecimal quantity, LocalDispatcher dispatcher, ShoppingCart cart, boolean triggerExternalOps, boolean resetShipGroup, boolean updateProductPrice, boolean skipInventoryChecks) throws CartItemModifyException {
- if (this.quantity == quantity) {
+ if (this.quantity.compareTo(quantity) == 0) {
return;
}
@@ -1112,9 +1113,21 @@ public class ShoppingCartItem implements
if (partyId != null) {
priceContext.put("partyId", partyId);
}
+ // check alternative packaging
+ boolean isAlternativePacking = ProductWorker.isAlternativePacking(delegator, this.productId , this.getParentProductId());
+ BigDecimal pieces = BigDecimal.ONE;
+ if(isAlternativePacking){
+ GenericValue originalProduct = this.getParentProduct();
+ if (originalProduct != null) pieces = new BigDecimal(originalProduct.getLong("piecesIncluded"));
+ priceContext.put("product", originalProduct);
+ this._parentProduct = null;
+ }else{
+ priceContext.put("product", this.getProduct());
+ }
+
priceContext.put("quantity", this.getQuantity());
priceContext.put("amount", this.getSelectedAmount());
- priceContext.put("product", this.getProduct());
+
if (cart.getOrderType().equals("PURCHASE_ORDER")) {
Map priceResult = dispatcher.runSync("calculatePurchasePrice", priceContext);
if (ServiceUtil.isError(priceResult)) {
@@ -1124,8 +1137,13 @@ public class ShoppingCartItem implements
if (!validPriceFound.booleanValue()) {
throw new CartItemModifyException("Could not find a valid price for the product with ID [" + this.getProductId() + "] and supplier with ID [" + partyId + "], not adding to cart.");
}
-
- this.setBasePrice(((BigDecimal) priceResult.get("price")));
+
+ if(isAlternativePacking){
+ this.setBasePrice(((BigDecimal) priceResult.get("price")).divide(pieces, RoundingMode.HALF_UP));
+ }else{
+ this.setBasePrice(((BigDecimal) priceResult.get("price")));
+ }
+
this.setDisplayPrice(this.basePrice);
this.orderItemPriceInfos = (List) priceResult.get("orderItemPriceInfos");
} else {
@@ -1169,21 +1187,41 @@ public class ShoppingCartItem implements
if (Boolean.FALSE.equals(validPriceFound)) {
throw new CartItemModifyException("Could not find a valid price for the product with ID [" + this.getProductId() + "], not adding to cart.");
}
+
+ //set alternative product price
+ if(isAlternativePacking){
+ int decimals = 2;
+ if (priceResult.get("listPrice") != null) {
+ this.listPrice = ((BigDecimal) priceResult.get("listPrice")).divide(pieces, decimals, RoundingMode.HALF_UP);
+ }
- if (priceResult.get("listPrice") != null) {
- this.listPrice = ((BigDecimal) priceResult.get("listPrice"));
- }
+ if (priceResult.get("basePrice") != null) {
+ this.setBasePrice(((BigDecimal) priceResult.get("basePrice")).divide(pieces, decimals, RoundingMode.HALF_UP));
+ }
- if (priceResult.get("basePrice") != null) {
- this.setBasePrice(((BigDecimal) priceResult.get("basePrice")));
- }
+ if (priceResult.get("price") != null) {
+ this.setDisplayPrice(((BigDecimal) priceResult.get("price")).divide(pieces, decimals, RoundingMode.HALF_UP));
+ }
- if (priceResult.get("price") != null) {
- this.setDisplayPrice(((BigDecimal) priceResult.get("price")));
- }
+ if (priceResult.get("specialPromoPrice") != null) {
+ this.setSpecialPromoPrice(((BigDecimal) priceResult.get("specialPromoPrice")).divide(pieces, decimals, RoundingMode.HALF_UP));
+ }
+ }else{
+ if (priceResult.get("listPrice") != null) {
+ this.listPrice = ((BigDecimal) priceResult.get("listPrice"));
+ }
- this.setSpecialPromoPrice((BigDecimal) priceResult.get("specialPromoPrice"));
+ if (priceResult.get("basePrice") != null) {
+ this.setBasePrice(((BigDecimal) priceResult.get("basePrice")));
+ }
+ if (priceResult.get("price") != null) {
+ this.setDisplayPrice(((BigDecimal) priceResult.get("price")));
+ }
+
+ this.setSpecialPromoPrice((BigDecimal) priceResult.get("specialPromoPrice"));
+ }
+
this.orderItemPriceInfos = (List) priceResult.get("orderItemPriceInfos");
// If product is configurable, the price is taken from the configWrapper.
Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java (original)
+++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java Tue Dec 7 10:42:16 2010
@@ -337,7 +337,7 @@ public class ShoppingCartServices {
cartShipInfo.shipTaxAdj.addAll(orh.getOrderHeaderAdjustmentsTax(orderItemShipGroup.getString("shipGroupSeqId")));
}
- List<GenericValue> orderItems = orh.getValidOrderItems();
+ List<GenericValue> orderItems = orh.getOrderItems();
long nextItemSeq = 0;
if (UtilValidate.isNotEmpty(orderItems)) {
for (GenericValue item : orderItems) {
@@ -350,6 +350,16 @@ public class ShoppingCartServices {
// creates survey responses for Gift cards same as last Order created
Map surveyResponseResult = null;
try {
+ long seq = Long.parseLong(orderItemSeqId);
+ if (seq > nextItemSeq) {
+ nextItemSeq = seq;
+ }
+ } catch (NumberFormatException e) {
+ Debug.logError(e, module);
+ return ServiceUtil.returnError(e.getMessage());
+ }
+ if ("ITEM_REJECTED".equals(item.getString("statusId")) || "ITEM_CANCELLED".equals(item.getString("statusId"))) continue;
+ try {
product = delegator.findOne("Product", UtilMisc.toMap("productId", productId), false);
if ("DIGITAL_GOOD".equals(product.getString("productTypeId"))) {
Map<String, Object> surveyResponseMap = FastMap.newInstance();
@@ -372,15 +382,6 @@ public class ShoppingCartServices {
Debug.logError(e.toString(), module);
return ServiceUtil.returnError(e.toString());
}
- try {
- long seq = Long.parseLong(orderItemSeqId);
- if (seq > nextItemSeq) {
- nextItemSeq = seq;
- }
- } catch (NumberFormatException e) {
- Debug.logError(e, module);
- return ServiceUtil.returnError(e.getMessage());
- }
// do not include PROMO items
if (!includePromoItems && item.get("isPromo") != null && "Y".equals(item.getString("isPromo"))) {
@@ -542,6 +543,7 @@ public class ShoppingCartServices {
if (itemAdjustments != null) {
for(GenericValue itemAdjustment : itemAdjustments) {
if ("SALES_TAX".equals(itemAdjustment.get("orderAdjustmentTypeId")) ||
+ "VAT_TAX".equals(itemAdjustment.get("orderAdjustmentTypeId")) ||
"VAT_PRICE_CORRECT".equals(itemAdjustment.get("orderAdjustmentTypeId"))) {
continue;
}
Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java (original)
+++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java Tue Dec 7 10:42:16 2010
@@ -1806,10 +1806,10 @@ public class ProductPromoWorker {
amount = amount.setScale(3, rounding);
GenericValue orderAdjustment = delegator.makeValue("OrderAdjustment",
UtilMisc.toMap("orderAdjustmentTypeId", "PROMOTION_ADJUSTMENT", amountField, amount,
- "productPromoId", productPromoAction.get("productPromoId"),
- "productPromoRuleId", productPromoAction.get("productPromoRuleId"),
- "productPromoActionSeqId", productPromoAction.get("productPromoActionSeqId"),
- "description", getProductPromoDescription((String) productPromoAction.get("productPromoId"), delegator)));
+ "productPromoId", productPromoAction.get("productPromoId"),
+ "productPromoRuleId", productPromoAction.get("productPromoRuleId"),
+ "productPromoActionSeqId", productPromoAction.get("productPromoActionSeqId"),
+ "description", getProductPromoDescription((String) productPromoAction.get("productPromoId"), delegator)));
// if an orderAdjustmentTypeId was included, override the default
if (UtilValidate.isNotEmpty(productPromoAction.getString("orderAdjustmentTypeId"))) {
@@ -1824,10 +1824,10 @@ public class ProductPromoWorker {
amount = amount.setScale(decimals, rounding);
GenericValue orderAdjustment = delegator.makeValue("OrderAdjustment",
UtilMisc.toMap("orderAdjustmentTypeId", "PROMOTION_ADJUSTMENT", amountField, amount,
- "productPromoId", productPromoAction.get("productPromoId"),
- "productPromoRuleId", productPromoAction.get("productPromoRuleId"),
- "productPromoActionSeqId", productPromoAction.get("productPromoActionSeqId"),
- "description", getProductPromoDescription((String) productPromoAction.get("productPromoId"), delegator)));
+ "productPromoId", productPromoAction.get("productPromoId"),
+ "productPromoRuleId", productPromoAction.get("productPromoRuleId"),
+ "productPromoActionSeqId", productPromoAction.get("productPromoActionSeqId"),
+ "description", getProductPromoDescription((String) productPromoAction.get("productPromoId"), delegator)));
// if an orderAdjustmentTypeId was included, override the default
if (UtilValidate.isNotEmpty(productPromoAction.getString("orderAdjustmentTypeId"))) {
Modified: ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy (original)
+++ ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy Tue Dec 7 10:42:16 2010
@@ -26,6 +26,7 @@ import org.ofbiz.product.catalog.*;
import org.ofbiz.product.category.*;
import org.ofbiz.product.product.ProductWorker;
import org.ofbiz.product.product.ProductContentWrapper;
+import org.ofbiz.entity.util.EntityUtil;
contentPathPrefix = CatalogWorker.getContentPathPrefix(request);
catalogName = CatalogWorker.getCatalogName(request);
@@ -54,6 +55,16 @@ if (productId) {
if (productId) {
product = delegator.findByPrimaryKeyCache("Product", [productId : productId]);
+ // first make sure this isn't a virtual-variant that has an associated virtual product, if it does show that instead of the variant
+ if("Y".equals(product.isVirtual) && "Y".equals(product.isVariant)){
+ virtualVariantProductAssocs = delegator.findByAndCache("ProductAssoc", ["productId": productId, "productAssocTypeId": "ALTERNATIVE_PACKAGE"], ["-fromDate"]);
+ virtualVariantProductAssocs = EntityUtil.filterByDate(virtualVariantProductAssocs);
+ if (virtualVariantProductAssocs) {
+ productAssoc = EntityUtil.getFirst(virtualVariantProductAssocs);
+ product = productAssoc.getRelatedOneCache("AssocProduct");
+ }
+ }
+
// first make sure this isn't a variant that has an associated virtual product, if it does show that instead of the variant
virtualProductId = ProductWorker.getVariantVirtualId(product);
if (virtualProductId) {
Modified: ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy (original)
+++ ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy Tue Dec 7 10:42:16 2010
@@ -417,6 +417,50 @@ if (product) {
if (variantPriceMap && variantPriceMap.basePrice) {
variantPriceJS.append(" if (sku == \"" + variant.productId + "\") return \"" + numberFormat.format(variantPriceMap.basePrice) + "\"; ");
}
+
+ // make a list of virtual variants sku with requireAmount
+ virtualVariantsRes = dispatcher.runSync("getAssociatedProducts", [productIdTo : variant.productId, type : "ALTERNATIVE_PACKAGE", checkViewAllow : true, prodCatalogId : currentCatalogId]);
+ virtualVariants = virtualVariantsRes.assocProducts;
+
+ if(virtualVariants){
+ virtualVariants.each { virtualAssoc ->
+ virtual = virtualAssoc.getRelatedOne("MainProduct");
+ // Get price from a virtual product
+ priceContext.product = virtual;
+ if (cart.isSalesOrder()) {
+ // sales order: run the "calculateProductPrice" service
+ virtualPriceMap = dispatcher.runSync("calculateProductPrice", priceContext);
+ BigDecimal calculatedPrice = (BigDecimal)virtualPriceMap.get("price");
+ // Get the minimum quantity for variants if MINIMUM_ORDER_PRICE is set for variants.
+ virtualPriceMap.put("minimumQuantity", ShoppingCart.getMinimumOrderQuantity(delegator, calculatedPrice, virtual.get("productId")));
+ Iterator treeMapIter = variantTree.entrySet().iterator();
+ while (treeMapIter.hasNext()) {
+ Map.Entry entry = treeMapIter.next();
+ if (entry.getValue() instanceof Map) {
+ Iterator entryIter = entry.getValue().entrySet().iterator();
+ while (entryIter.hasNext()) {
+ Map.Entry innerentry = entryIter.next();
+ if (virtual.get("productId").equals(innerentry.getValue().get(0))) {
+ virtualPriceMap.put("variantName", innerentry.getKey());
+ virtualPriceMap.put("secondVariantName", entry.getKey());
+ break;
+ }
+ }
+ } else if (UtilValidate.isNotEmpty(entry.getValue())) {
+ if (virtual.get("productId").equals(entry.getValue().get(0))) {
+ virtualPriceMap.put("variantName", entry.getKey());
+ break;
+ }
+ }
+ }
+ variantPriceList.add(virtualPriceMap);
+ } else {
+ virtualPriceMap = dispatcher.runSync("calculatePurchasePrice", priceContext);
+ }
+ variantPriceJS.append(" if (sku == \"" + virtual.productId + "\") return \"" + numberFormat.format(virtualPriceMap.basePrice) + "\"; ");
+ }
+
+ }
}
amt.append(" } ");
variantPriceJS.append(" } ");
Modified: ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/controller.xml?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/controller.xml (original)
+++ ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/controller.xml Tue Dec 7 10:42:16 2010
@@ -1725,7 +1725,11 @@ under the License.
<response name="error" type="view" value="advancedsearch"/>
</request-map>
-
+ <request-map uri="ProductUomDropDownOnly">
+ <security auth="true" https="true"/>
+ <response name="success" type="view" value="ProductUomDropDownOnly" save-last-view="true"/>
+ </request-map>
+
<!--
These are just examples of reports developed using JasperReport and not really
useful reports. In order to run them you'll have to follow the notes in the
@@ -1920,5 +1924,6 @@ under the License.
<view-map name="SendConfirmationMail" type="screen" page="component://order/widget/ordermgr/OrderViewScreens.xml#SendOrderConfirmation"/>
<view-map name="SendCompletionMail" type="screen" page="component://order/widget/ordermgr/OrderViewScreens.xml#SendOrderCompletion"/>
<view-map name="ReturnHistory" type="screen" page="component://order/widget/ordermgr/OrderReturnScreens.xml#OrderReturnHistory"/>
+ <view-map name="ProductUomDropDownOnly" type="screen" page="component://order/widget/ordermgr/OrderEntryCatalogScreens.xml#ProductUomDropDownOnly"/>
<!-- end of view mappings -->
</site-conf>
Modified: ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/compareproductslist.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/compareproductslist.ftl?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/compareproductslist.ftl (original)
+++ ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/compareproductslist.ftl Tue Dec 7 10:42:16 2010
@@ -18,11 +18,14 @@ under the License.
-->
<div id="productcomparelist" class="screenlet">
<div class="screenlet-title-bar">
- <div class="h3">${uiLabelMap.ProductCompareProducts}</div>
+ <ul>
+ <li class="h3">${uiLabelMap.ProductCompareProducts}</li>
+ </ul>
+ <br class="clear"/>
</div>
<div class="screenlet-body">
-<#assign productCompareList = Static["org.ofbiz.product.product.ProductEvents"].getProductCompareList(request)/>
-<#if productCompareList?has_content>
+ <#assign productCompareList = Static["org.ofbiz.product.product.ProductEvents"].getProductCompareList(request)/>
+ <#if productCompareList?has_content>
<table>
<#list productCompareList as product>
<tr>
@@ -50,4 +53,4 @@ under the License.
</div>
</#if>
</div>
-</div>
+</div>
\ No newline at end of file
Modified: ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/keywordsearch.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/keywordsearch.ftl?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/keywordsearch.ftl (original)
+++ ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/keywordsearch.ftl Tue Dec 7 10:42:16 2010
@@ -21,7 +21,7 @@ under the License.
<br />
<ul>
<#list searchConstraintStrings as searchConstraintString>
- <li><a href="<@o...@ofbizUrl>" class="buttontext">X</a>&nbsp;${searchConstraintString}</li>
+ <li><a href="<@o...@ofbizUrl>" class="buttontext">X</a> ${searchConstraintString}</li>
</#list>
</ul>
<br />
Modified: ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/keywordsearchbox.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/keywordsearchbox.ftl?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/keywordsearchbox.ftl (original)
+++ ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/keywordsearchbox.ftl Tue Dec 7 10:42:16 2010
@@ -19,7 +19,10 @@ under the License.
<div id="keywordsearchbox" class="screenlet">
<div class="screenlet-title-bar">
- <h3>${uiLabelMap.ProductSearchCatalog}</h3>
+ <ul>
+ <li class="h3">${uiLabelMap.ProductSearchCatalog}</li>
+ </ul>
+ <br class="clear"/>
</div>
<div class="screenlet-body">
<form name="keywordsearchform" id="keywordsearchbox_keywordsearchform" method="post" action="<@o...@ofbizUrl>">
Modified: ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl (original)
+++ ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl Tue Dec 7 10:42:16 2010
@@ -171,6 +171,9 @@ ${virtualJavaScript?if_exists}
// using the selected index locate the sku
var sku = document.forms["addform"].elements[name].options[indexSelected].value;
+ // display alternative packaging dropdown
+ ajaxUpdateArea("product_uom", "<@o...@ofbizUrl>", "productId=" + sku);
+
// set the product ID
setAddProductId(sku);
@@ -259,6 +262,18 @@ ${virtualJavaScript?if_exists}
block2.style.display = "none";
}
</#if>
+
+ function displayProductVirtualVariantId(variantId) {
+ document.addform.product_id.value = variantId;
+ var elem = document.getElementById('product_id_display');
+ var txt = document.createTextNode(variantId);
+ if(elem.hasChildNodes()) {
+ elem.replaceChild(txt, elem.firstChild);
+ } else {
+ elem.appendChild(txt);
+ }
+ setVariantPrice(variantId);
+ }
//-->
</script>
@@ -454,6 +469,7 @@ ${virtualJavaScript?if_exists}
</select>
</div>
</#list>
+ <span id="product_uom"></span>
<input type="hidden" name="product_id" value="${product.productId}"/>
<input type="hidden" name="add_product_id" value="NULL"/>
<div>
Modified: ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/order/orderitems.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/order/orderitems.ftl?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/order/orderitems.ftl (original)
+++ ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/order/orderitems.ftl Tue Dec 7 10:42:16 2010
@@ -93,7 +93,7 @@ under the License.
<td align="right">
<div style="font-size: xx-small;">
<b><i>${uiLabelMap.OrderAdjustment}</i>:</b> <b>${localOrderReadHelper.getAdjustmentType(orderItemAdjustment)}</b>
- <#if orderItemAdjustment.description?has_content>: ${orderItemAdjustment.get("description",locale)}</#if>
+ <#if orderItemAdjustment.description?has_content>: ${StringUtil.wrapString(orderItemAdjustment.get("description",locale))}</#if>
<#if orderItemAdjustment.orderAdjustmentTypeId == "SALES_TAX">
<#if orderItemAdjustment.primaryGeoId?has_content>
Modified: ofbiz/branches/jquery/applications/order/widget/ordermgr/OrderEntryCatalogScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/widget/ordermgr/OrderEntryCatalogScreens.xml?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/widget/ordermgr/OrderEntryCatalogScreens.xml (original)
+++ ofbiz/branches/jquery/applications/order/widget/ordermgr/OrderEntryCatalogScreens.xml Tue Dec 7 10:42:16 2010
@@ -288,4 +288,24 @@ under the License.
</widgets>
</section>
</screen>
+
+ <screen name="ProductUomDropDownOnly">
+ <section>
+ <actions>
+ <script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductUomDropDownOnly.groovy"/>
+ </actions>
+ <widgets>
+ <section>
+ <condition>
+ <not><if-empty field="product"/></not>
+ </condition>
+ <widgets>
+ <platform-specific>
+ <html><html-template location="component://order/webapp/ordermgr/entry/catalog/ProductUomDropDownOnly.ftl"/></html>
+ </platform-specific>
+ </widgets>
+ </section>
+ </widgets>
+ </section>
+ </screen>
</screens>
Modified: ofbiz/branches/jquery/applications/party/data/PartyDemoData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/data/PartyDemoData.xml?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/party/data/PartyDemoData.xml (original)
+++ ofbiz/branches/jquery/applications/party/data/PartyDemoData.xml Tue Dec 7 10:42:16 2010
@@ -29,7 +29,7 @@
<PartyRole partyId="DemoEmployee" roleTypeId="EMAIL_ADMIN"/>
<PartyRelationship partyIdFrom="DemoEmployee" roleTypeIdFrom="EMAIL_ADMIN" partyIdTo="Company" roleTypeIdTo="_NA_" fromDate="2000-01-01 00:00:00"/>
- <ContactMech contactMechId="admin" contactMechTypeId="EMAIL_ADDRESS" infoString="ofbiztest@yahoo.com"/>
+ <ContactMech contactMechId="admin" contactMechTypeId="EMAIL_ADDRESS" infoString="ofbiztest@example.com"/>
<PartyContactMech partyId="admin" contactMechId="admin" fromDate="2003-01-01 00:00:00.0" allowSolicitation="Y"/>
<PartyContactMechPurpose contactMechPurposeTypeId="PRIMARY_EMAIL" partyId="admin" contactMechId="admin" fromDate="2003-01-01 00:00:00.0"/>
@@ -40,10 +40,10 @@
<PartyIdentification partyId="DemoSupplier" partyIdentificationTypeId="SIRET" idValue="1234 5678 90123"/>
<!-- email from an unknown party -->
- <CommunicationEvent communicationEventId="9000" communicationEventTypeId="EMAIL_COMMUNICATION" statusId="COM_UNKNOWN_PARTY" contactMechTypeId="EMAIL_ADDRESS" contactMechIdTo="admin" roleTypeIdFrom="_NA_" roleTypeIdTo="_NA_" partyIdTo="admin" entryDate="2008-07-28 13:55:55.827" datetimeStarted="2008-07-28 13:55:19.0" subject="Why i would use the OFBiz system" contentMimeTypeId="text/plain" content="Every time i think of you, only you...you are always on my mind......." note="Sent from: my@email.com; Sent Name from: Jo Easy User; Sent to: ofbiztest@yahoo.com; Delivered-To: ofbiztest@yahoo.com; " fromString="mailinglist@antwebsystems.com" toString="ofbiztest@yahoo.com"/>
+ <CommunicationEvent communicationEventId="9000" communicationEventTypeId="EMAIL_COMMUNICATION" statusId="COM_UNKNOWN_PARTY" contactMechTypeId="EMAIL_ADDRESS" contactMechIdTo="admin" roleTypeIdFrom="_NA_" roleTypeIdTo="_NA_" partyIdTo="admin" entryDate="2008-07-28 13:55:55.827" datetimeStarted="2008-07-28 13:55:19.0" subject="Why i would use the OFBiz system" contentMimeTypeId="text/plain" content="Every time i think of you, only you...you are always on my mind......." note="Sent from: my@email.com; Sent Name from: Jo Easy User; Sent to: ofbiztest@example.com; Delivered-To: ofbiztest@example.com; " fromString="mailinglist@antwebsystems.com" toString="ofbiztest@example.com"/>
<PartyRole partyId="admin" roleTypeId="ADDRESSEE"/>
<CommunicationEventRole communicationEventId="9000" partyId="admin" roleTypeId="ADDRESSEE" contactMechId="admin" statusId="COM_ROLE_CREATED"/>
<!-- new registration notification -->
- <EmailTemplateSetting emailTemplateSettingId="PARTY_REGISTER" bodyScreenLocation="component://party/widget/partymgr/PartyScreens.xml#CreateUserNotification" subject="New Account Created" bccAddress="ofbiztest@yahoo.com" fromAddress="ofbiztest@yahoo.com"/>
+ <EmailTemplateSetting emailTemplateSettingId="PARTY_REGISTER" bodyScreenLocation="component://party/widget/partymgr/PartyScreens.xml#CreateUserNotification" subject="New Account Created" bccAddress="ofbiztest@example.com" fromAddress="ofbiztest@example.com"/>
</entity-engine-xml>
Modified: ofbiz/branches/jquery/applications/party/data/PartyGeoPointData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/data/PartyGeoPointData.xml?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/party/data/PartyGeoPointData.xml (original)
+++ ofbiz/branches/jquery/applications/party/data/PartyGeoPointData.xml Tue Dec 7 10:42:16 2010
@@ -1,52 +1,52 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<entity-engine-xml>
- <!-- GeoPoint for DemoCustomer and other demonstrations (in Orem, Utah, USA) -->
- <GeoPoint
- geoPointId="9000"
- dataSourceId="GEOPT_GOOGLE"
- latitude="40.297264"
- longitude="-111.696625"
- elevation="4756"
- elevationUomId="LEN_ft"
- information="A testing GeoPoint for contactMechId=9015 (DemoCustomer)"
- />
- <!-- GeoPoint for EuroCustomer (in Amsterdam, Netherlands) -->
- <GeoPoint
- geoPointId="9001"
- dataSourceId="GEOPT_GOOGLE"
- latitude="52.350"
- longitude="4.917"
- elevation="-4"
- elevationUomId="LEN_m"
- information="A testing GeoPoint for contactMechId=EUROCUSTOMER (EuroCustomer)"
- />
- <!-- GeoPoint for FrenchCustomer (at Chemin de la Mouline, Poussan, France) -->
- <GeoPoint
- geoPointId="9002"
- dataSourceId="GEOPT_GOOGLE"
- latitude="43.491661995004264"
- longitude="3.6840248107910156"
- elevation="40"
- elevationUomId="LEN_m"
- information="A testing GeoPoint for contactMechId=FRENCHCUSTOMER (FrenchCustomer)"
- />
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<entity-engine-xml>
+ <!-- GeoPoint for DemoCustomer and other demonstrations (in Orem, Utah, USA) -->
+ <GeoPoint
+ geoPointId="9000"
+ dataSourceId="GEOPT_GOOGLE"
+ latitude="40.297264"
+ longitude="-111.696625"
+ elevation="4756"
+ elevationUomId="LEN_ft"
+ information="A testing GeoPoint for contactMechId=9015 (DemoCustomer)"
+ />
+ <!-- GeoPoint for EuroCustomer (in Amsterdam, Netherlands) -->
+ <GeoPoint
+ geoPointId="9001"
+ dataSourceId="GEOPT_GOOGLE"
+ latitude="52.350"
+ longitude="4.917"
+ elevation="-4"
+ elevationUomId="LEN_m"
+ information="A testing GeoPoint for contactMechId=EUROCUSTOMER (EuroCustomer)"
+ />
+ <!-- GeoPoint for FrenchCustomer (at Chemin de la Mouline, Poussan, France) -->
+ <GeoPoint
+ geoPointId="9002"
+ dataSourceId="GEOPT_GOOGLE"
+ latitude="43.491661995004264"
+ longitude="3.6840248107910156"
+ elevation="40"
+ elevationUomId="LEN_m"
+ information="A testing GeoPoint for contactMechId=FRENCHCUSTOMER (FrenchCustomer)"
+ />
</entity-engine-xml>
Modified: ofbiz/branches/jquery/applications/party/entitydef/entitymodel_old.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/entitydef/entitymodel_old.xml?rev=1042964&r1=1042963&r2=1042964&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/party/entitydef/entitymodel_old.xml (original)
+++ ofbiz/branches/jquery/applications/party/entitydef/entitymodel_old.xml Tue Dec 7 10:42:16 2010
@@ -1,55 +1,55 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
- <!-- ========================================================= -->
- <!-- ======================== Defaults ======================= -->
- <!-- ========================================================= -->
- <title>Entity of an Open For Business Project Component</title>
- <description>None</description>
- <version>1.0</version>
- <!-- ========================================================= -->
- <!-- ======================== Data Model ===================== -->
- <!-- The modules in this file are as follows: -->
- <!-- org.ofbiz.party.agreement -->
- <!-- ========================================================= -->
-
- <entity entity-name="OldAgreementWorkEffortAppl" table-name="AGREEMENT_WORKEFFORT_APPL"
- package-name="org.ofbiz.party.agreement" title="Agreement WorkEffort Application Entity">
- <description>NOTE: this entity is deprecated by AgreementWorkEffortApplic</description>
- <field name="agreementId" type="id-ne"></field>
- <field name="agreementItemSeqId" type="id-ne"></field>
- <field name="workEffortId" type="id-ne"></field>
- <prim-key field="agreementId"/>
- <prim-key field="agreementItemSeqId"/>
- <prim-key field="workEffortId"/>
- <relation type="one-nofk" rel-entity-name="Agreement">
- <key-map field-name="agreementId"/>
- </relation>
- <relation type="one" fk-name="AGRMNT_WEA_AITM" rel-entity-name="AgreementItem">
- <key-map field-name="agreementId"/>
- <key-map field-name="agreementItemSeqId"/>
- </relation>
- <relation type="one" fk-name="AGRMNT_WEA_WEFF" rel-entity-name="WorkEffort">
- <key-map field-name="workEffortId"/>
- </relation>
- </entity>
-</entitymodel>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
+ <!-- ========================================================= -->
+ <!-- ======================== Defaults ======================= -->
+ <!-- ========================================================= -->
+ <title>Entity of an Open For Business Project Component</title>
+ <description>None</description>
+ <version>1.0</version>
+ <!-- ========================================================= -->
+ <!-- ======================== Data Model ===================== -->
+ <!-- The modules in this file are as follows: -->
+ <!-- org.ofbiz.party.agreement -->
+ <!-- ========================================================= -->
+
+ <entity entity-name="OldAgreementWorkEffortAppl" table-name="AGREEMENT_WORKEFFORT_APPL"
+ package-name="org.ofbiz.party.agreement" title="Agreement WorkEffort Application Entity">
+ <description>NOTE: this entity is deprecated by AgreementWorkEffortApplic</description>
+ <field name="agreementId" type="id-ne"></field>
+ <field name="agreementItemSeqId" type="id-ne"></field>
+ <field name="workEffortId" type="id-ne"></field>
+ <prim-key field="agreementId"/>
+ <prim-key field="agreementItemSeqId"/>
+ <prim-key field="workEffortId"/>
+ <relation type="one-nofk" rel-entity-name="Agreement">
+ <key-map field-name="agreementId"/>
+ </relation>
+ <relation type="one" fk-name="AGRMNT_WEA_AITM" rel-entity-name="AgreementItem">
+ <key-map field-name="agreementId"/>
+ <key-map field-name="agreementItemSeqId"/>
+ </relation>
+ <relation type="one" fk-name="AGRMNT_WEA_WEFF" rel-entity-name="WorkEffort">
+ <key-map field-name="workEffortId"/>
+ </relation>
+ </entity>
+</entitymodel>