svn commit: r729414 - in /ofbiz/trunk/applications: accounting/data/ accounting/src/org/ofbiz/accounting/invoice/ ecommerce/data/

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

svn commit: r729414 - in /ofbiz/trunk/applications: accounting/data/ accounting/src/org/ofbiz/accounting/invoice/ ecommerce/data/

hansbak-2
Author: hansbak
Date: Thu Dec 25 02:57:34 2008
New Revision: 729414

URL: http://svn.apache.org/viewvc?rev=729414&view=rev
Log:
added some demo data to show the invoices in different currencies and some error correction

Modified:
    ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml
    ofbiz/trunk/applications/accounting/data/DemoOrganizationData.xml
    ofbiz/trunk/applications/accounting/data/PaymentsInvoices.xml
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java
    ofbiz/trunk/applications/ecommerce/data/DemoOrderPeopleData.xml

Modified: ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml?rev=729414&r1=729413&r2=729414&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml (original)
+++ ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml Thu Dec 25 02:57:34 2008
@@ -335,4 +335,6 @@
     <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6008" periodTypeId="FISCAL_QUARTER" fromDate="2008-07-01" thruDate="2008-10-01" isClosed="N" periodNum="3" periodName="2008/Q3" parentPeriodId="6005"/>
     <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6009" periodTypeId="FISCAL_QUARTER" fromDate="2008-10-01" thruDate="2009-01-01" isClosed="N" periodNum="4" periodName="2008/Q4" parentPeriodId="6005"/>
 
+    <UomConversionDated uomId="USD" uomIdTo="EUR" fromDate="2001-01-01 00:00:00.0" conversionFactor="0.7"/><!-- to convert demo invoice -->
+
 </entity-engine-xml>

Modified: ofbiz/trunk/applications/accounting/data/DemoOrganizationData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/DemoOrganizationData.xml?rev=729414&r1=729413&r2=729414&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/data/DemoOrganizationData.xml (original)
+++ ofbiz/trunk/applications/accounting/data/DemoOrganizationData.xml Thu Dec 25 02:57:34 2008
@@ -64,8 +64,8 @@
     <PartyRelationship partyIdFrom="Company" partyIdTo="TESTING" partyRelationshipTypeId="GROUP_ROLLUP" roleTypeIdFrom="_NA_" roleTypeIdTo="_NA_" fromDate="2001-05-13 00:00:00.000"/>
     
     <!-- demo rates -->
-    <RateAmount organizationPartyId="Company" rateTypeId="STANDARD" rateCurrencyUomId="USD" periodTypeId="RATE_HOUR" workEffortId="_NA_" partyId="_NA_" emplPositionTypeId="_NA_" fromDate="2000-01-01 00:00:00.000" rateAmount="95.0" />
-    <RateAmount organizationPartyId="Company" rateTypeId="DISCOUNTED" rateCurrencyUomId="USD" periodTypeId="RATE_HOUR" workEffortId="_NA_" partyId="_NA_" emplPositionTypeId="_NA_" fromDate="2000-01-01 00:00:00.000" rateAmount="55.0"/>
-    <RateAmount organizationPartyId="Company" rateTypeId="OVERTIME" rateCurrencyUomId="USD" periodTypeId="RATE_HOUR" workEffortId="_NA_" partyId="_NA_" emplPositionTypeId="_NA_" fromDate="2000-01-01 00:00:00.000" rateAmount="125.0"/>
+    <RateAmount rateTypeId="STANDARD" rateCurrencyUomId="USD" periodTypeId="RATE_HOUR" workEffortId="_NA_" partyId="_NA_" emplPositionTypeId="_NA_" fromDate="2000-01-01 00:00:00.000" rateAmount="95.0" />
+    <RateAmount rateTypeId="DISCOUNTED" rateCurrencyUomId="USD" periodTypeId="RATE_HOUR" workEffortId="_NA_" partyId="_NA_" emplPositionTypeId="_NA_" fromDate="2000-01-01 00:00:00.000" rateAmount="55.0"/>
+    <RateAmount rateTypeId="OVERTIME" rateCurrencyUomId="USD" periodTypeId="RATE_HOUR" workEffortId="_NA_" partyId="_NA_" emplPositionTypeId="_NA_" fromDate="2000-01-01 00:00:00.000" rateAmount="125.0"/>
     
 </entity-engine-xml>

Modified: ofbiz/trunk/applications/accounting/data/PaymentsInvoices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/PaymentsInvoices.xml?rev=729414&r1=729413&r2=729414&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/data/PaymentsInvoices.xml (original)
+++ ofbiz/trunk/applications/accounting/data/PaymentsInvoices.xml Thu Dec 25 02:57:34 2008
@@ -32,17 +32,31 @@
     <Payment paymentId="demo10010" paymentTypeId="CUSTOMER_REFUND" paymentMethodTypeId="EXT_BILLACT" partyIdFrom="TESTING" partyIdTo="AcctBuyer" statusId="PMNT_SENT" effectiveDate="2006-04-25 13:11:05.94" amount="20.0" currencyUomId="USD" lastUpdatedStamp="2006-04-25 13:12:57.445" lastUpdatedTxStamp="2006-04-25 13:12:57.33" createdStamp="2006-04-25 13:11:05.941" createdTxStamp="2006-04-25 13:11:05.941"/>
 
     <Invoice invoiceId="demo10000" invoiceTypeId="SALES_INVOICE" partyIdFrom="TESTING" partyId="AcctBuyer" statusId="INVOICE_IN_PROCESS" invoiceDate="2006-04-25 12:46:27.122" description="This is the first invoice number t AcctBuyer" currencyUomId="USD" lastUpdatedStamp="2006-04-25 12:46:27.426" lastUpdatedTxStamp="2006-04-25 12:46:27.426" createdStamp="2006-04-25 12:46:27.426" createdTxStamp="2006-04-25 12:46:27.426"/>
-    <Invoice invoiceId="demo10001" invoiceTypeId="PURCHASE_INVOICE" partyIdFrom="AcctBigSupplier" partyId="TESTING" statusId="INVOICE_IN_PROCESS" invoiceDate="2006-04-25 12:50:50.655" description="Another invoice" currencyUomId="USD" lastUpdatedStamp="2006-04-25 12:50:50.665" lastUpdatedTxStamp="2006-04-25 12:50:50.538" createdStamp="2006-04-25 12:50:50.665" createdTxStamp="2006-04-25 12:50:50.538"/>
-    <Invoice invoiceId="demo10002" invoiceTypeId="SALES_INVOICE" partyIdFrom="TESTING" partyId="AcctBuyer" statusId="INVOICE_SENT" invoiceDate="2006-04-25 12:54:07.011" description="Another sales invoice" currencyUomId="USD" lastUpdatedStamp="2006-04-25 12:55:44.189" lastUpdatedTxStamp="2006-04-25 12:55:44.058" createdStamp="2006-04-25 12:54:07.018" createdTxStamp="2006-04-25 12:54:06.97"/>
     <InvoiceItem invoiceId="demo10000" invoiceItemSeqId="00001" invoiceItemTypeId="INV_SPROD_ITEM" uomId="USD" taxableFlag="Y" amount="20.0" description="this was e service for a product" lastUpdatedStamp="2006-04-25 12:47:16.599" lastUpdatedTxStamp="2006-04-25 12:47:16.48" createdStamp="2006-04-25 12:47:16.599" createdTxStamp="2006-04-25 12:47:16.48"/>
     <InvoiceItem invoiceId="demo10000" invoiceItemSeqId="00002" invoiceItemTypeId="INV_PROD_ITEM" uomId="USD" taxableFlag="Y" amount="269.99" description="Big Gizmo w/ Legs" lastUpdatedStamp="2006-04-25 12:48:07.529" lastUpdatedTxStamp="2006-04-25 12:48:07.443" createdStamp="2006-04-25 12:47:49.766" createdTxStamp="2006-04-25 12:47:49.401"/>
     <InvoiceItem invoiceId="demo10000" invoiceItemSeqId="00003" invoiceItemTypeId="INV_SALES_TAX" uomId="USD" taxableFlag="Y" amount="33.55" description="sales tax" lastUpdatedStamp="2006-04-25 12:49:06.04" lastUpdatedTxStamp="2006-04-25 12:49:06.038" createdStamp="2006-04-25 12:49:06.04" createdTxStamp="2006-04-25 12:49:06.038"/>
+    <Invoice invoiceId="demo10001" invoiceTypeId="PURCHASE_INVOICE" partyIdFrom="AcctBigSupplier" partyId="TESTING" statusId="INVOICE_IN_PROCESS" invoiceDate="2006-04-25 12:50:50.655" description="Another invoice" currencyUomId="USD" lastUpdatedStamp="2006-04-25 12:50:50.665" lastUpdatedTxStamp="2006-04-25 12:50:50.538" createdStamp="2006-04-25 12:50:50.665" createdTxStamp="2006-04-25 12:50:50.538"/>
     <InvoiceItem invoiceId="demo10001" invoiceItemSeqId="00001" invoiceItemTypeId="PINV_WE_ITEM" uomId="USD" taxableFlag="Y" amount="33.99" description="Service received" lastUpdatedStamp="2006-04-25 12:51:29.251" lastUpdatedTxStamp="2006-04-25 12:51:29.197" createdStamp="2006-04-25 12:51:29.251" createdTxStamp="2006-04-25 12:51:29.197"/>
     <InvoiceItem invoiceId="demo10001" invoiceItemSeqId="00002" invoiceItemTypeId="PINV_SURCHARGE_ADJ" uomId="USD" taxableFlag="Y" amount="2.44" description="Service received" lastUpdatedStamp="2006-04-25 12:52:19.907" lastUpdatedTxStamp="2006-04-25 12:52:19.826" createdStamp="2006-04-25 12:52:19.907" createdTxStamp="2006-04-25 12:52:19.826"/>
+    <Invoice invoiceId="demo10002" invoiceTypeId="SALES_INVOICE" partyIdFrom="TESTING" partyId="AcctBuyer" statusId="INVOICE_SENT" invoiceDate="2006-04-25 12:54:07.011" description="Another sales invoice" currencyUomId="USD" lastUpdatedStamp="2006-04-25 12:55:44.189" lastUpdatedTxStamp="2006-04-25 12:55:44.058" createdStamp="2006-04-25 12:54:07.018" createdTxStamp="2006-04-25 12:54:06.97"/>
     <InvoiceItem invoiceId="demo10002" invoiceItemSeqId="00001" invoiceItemTypeId="INV_DPROD_ITEM" uomId="USD" taxableFlag="Y" amount="1.0" description="Add more money to your card!" lastUpdatedStamp="2006-04-25 12:54:37.473" lastUpdatedTxStamp="2006-04-25 12:54:37.373" createdStamp="2006-04-25 12:54:37.473" createdTxStamp="2006-04-25 12:54:37.373"/>
     <InvoiceItem invoiceId="demo10002" invoiceItemSeqId="00002" invoiceItemTypeId="INV_DPROD_ITEM" uomId="USD" taxableFlag="Y" amount="55.99" description="A digital gizmo: can be downloaded immediately after purchase." lastUpdatedStamp="2006-04-25 12:55:27.232" lastUpdatedTxStamp="2006-04-25 12:55:27.092" createdStamp="2006-04-25 12:55:27.232" createdTxStamp="2006-04-25 12:55:27.092"/>
     <InvoiceStatus statusId="INVOICE_IN_PROCESS" invoiceId="demo10000" statusDate="2006-04-25 12:46:27.122" lastUpdatedStamp="2006-04-25 12:46:27.492" lastUpdatedTxStamp="2006-04-25 12:46:27.426" createdStamp="2006-04-25 12:46:27.492" createdTxStamp="2006-04-25 12:46:27.426"/>
     <InvoiceStatus statusId="INVOICE_IN_PROCESS" invoiceId="demo10001" statusDate="2006-04-25 12:50:50.655" lastUpdatedStamp="2006-04-25 12:50:50.67" lastUpdatedTxStamp="2006-04-25 12:50:50.538" createdStamp="2006-04-25 12:50:50.67" createdTxStamp="2006-04-25 12:50:50.538"/>
     <InvoiceStatus statusId="INVOICE_IN_PROCESS" invoiceId="demo10002" statusDate="2006-04-25 12:54:07.011" lastUpdatedStamp="2006-04-25 12:54:07.024" lastUpdatedTxStamp="2006-04-25 12:54:06.97" createdStamp="2006-04-25 12:54:07.024" createdTxStamp="2006-04-25 12:54:06.97"/>
     <InvoiceStatus statusId="INVOICE_SENT" invoiceId="demo10002" statusDate="2006-04-25 12:55:44.228" lastUpdatedStamp="2006-04-25 12:55:44.228" lastUpdatedTxStamp="2006-04-25 12:55:44.058" createdStamp="2006-04-25 12:55:44.228" createdTxStamp="2006-04-25 12:55:44.058"/>
+
+    <Party partyId="EuroCustomer"/><!-- more data added in party component -->
+    <Invoice invoiceId="demo11000" invoiceTypeId="SALES_INVOICE" partyIdFrom="TESTING" partyId="EuroCustomer" statusId="INVOICE_APPROVED" invoiceDate="2006-04-25 12:46:27.122" description="This is the first invoice number to Eurocustomer with currency in euro" currencyUomId="EUR" lastUpdatedStamp="2006-04-25 12:46:27.426" lastUpdatedTxStamp="2006-04-25 12:46:27.426" createdStamp="2006-04-25 12:46:27.426" createdTxStamp="2006-04-25 12:46:27.426"/>
+    <InvoiceItem invoiceId="demo11000" invoiceItemSeqId="00001" invoiceItemTypeId="INV_SPROD_ITEM" uomId="USD" taxableFlag="Y" amount="20.0" description="this was e service for a product" lastUpdatedStamp="2006-04-25 12:47:16.599" lastUpdatedTxStamp="2006-04-25 12:47:16.48" createdStamp="2006-04-25 12:47:16.599" createdTxStamp="2006-04-25 12:47:16.48"/>
+    <InvoiceStatus statusId="INVOICE_IN_PROCESS" invoiceId="demo11000" statusDate="2006-04-25 12:46:27.122" lastUpdatedStamp="2006-04-25 12:46:27.492" lastUpdatedTxStamp="2006-04-25 12:46:27.426" createdStamp="2006-04-25 12:46:27.492" createdTxStamp="2006-04-25 12:46:27.426"/>
+    <InvoiceStatus statusId="INVOICE_APPROVED" invoiceId="demo11000" statusDate="2006-04-25 12:46:27.122" lastUpdatedStamp="2006-04-25 12:46:27.492" lastUpdatedTxStamp="2006-04-25 12:46:27.426" createdStamp="2006-04-25 12:46:27.492" createdTxStamp="2006-04-25 12:46:27.426"/>
+    <Invoice invoiceId="demo11001" invoiceTypeId="SALES_INVOICE" partyIdFrom="TESTING" partyId="EuroCustomer" statusId="INVOICE_APPROVED" invoiceDate="2006-04-25 12:46:27.122" description="This is the first invoice number to Eurocustomer with currency in euro" currencyUomId="EUR" lastUpdatedStamp="2006-04-25 12:46:27.426" lastUpdatedTxStamp="2006-04-25 12:46:27.426" createdStamp="2006-04-25 12:46:27.426" createdTxStamp="2006-04-25 12:46:27.426"/>
+    <InvoiceItem invoiceId="demo11001" invoiceItemSeqId="00001" invoiceItemTypeId="INV_SPROD_ITEM" uomId="USD" taxableFlag="Y" amount="543.23" description="this was e service for a product" lastUpdatedStamp="2006-04-25 12:47:16.599" lastUpdatedTxStamp="2006-04-25 12:47:16.48" createdStamp="2006-04-25 12:47:16.599" createdTxStamp="2006-04-25 12:47:16.48"/>
+    <InvoiceStatus statusId="INVOICE_IN_PROCESS" invoiceId="demo11001" statusDate="2006-04-25 12:46:27.122" lastUpdatedStamp="2006-04-25 12:46:27.492" lastUpdatedTxStamp="2006-04-25 12:46:27.426" createdStamp="2006-04-25 12:46:27.492" createdTxStamp="2006-04-25 12:46:27.426"/>
+    <InvoiceStatus statusId="INVOICE_APPROVED" invoiceId="demo11001" statusDate="2006-04-25 12:46:27.122" lastUpdatedStamp="2006-04-25 12:46:27.492" lastUpdatedTxStamp="2006-04-25 12:46:27.426" createdStamp="2006-04-25 12:46:27.492" createdTxStamp="2006-04-25 12:46:27.426"/>
+    <Payment paymentId="demo10001" paymentTypeId="CUSTOMER_PAYMENT" paymentMethodTypeId="EFT_ACCOUNT" partyIdFrom="EuroCustomer" partyIdTo="TESTING" statusId="PMNT_RECEIVED" effectiveDate="2006-04-25 12:56:54.292" amount="820.97" currencyUomId="USD" actualCurrencyAmount="543.23" actualCurrencyUomId="EUR"/>
+    <PaymentApplication paymentApplicationId="demo11000" paymentId="demo10001" invoiceId="demo11001" amountApplied="543.23"/>      
+
+
 </entity-engine-xml>

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java?rev=729414&r1=729413&r2=729414&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java Thu Dec 25 02:57:34 2008
@@ -554,17 +554,23 @@
      try {
      GenericValue party  = delegator.findByPrimaryKey("PartyAcctgPreference", UtilMisc.toMap("partyId", invoice.getString("partyIdFrom")));
      if (UtilValidate.isEmpty(party) || party.getString("baseCurrencyUomId").equals(invoice.getString("currencyUomId"))) {
-     party  = delegator.findByPrimaryKey("PartyAccntgPreferences", UtilMisc.toMap("partyId", invoice.getString("partyId")));
+     party  = delegator.findByPrimaryKey("PartyAcctgPreference", UtilMisc.toMap("partyId", invoice.getString("partyId")));
      }
-     if (party.getString("baseCurrencyUomId").equals(invoice.getString("currencyUomId"))) {
-     return BigDecimal.ONE;  // organization party has the same currency so conversion not required.
+     if (UtilValidate.isNotEmpty(party) && party.getString("baseCurrencyUomId") != null) {
+   otherCurrencyUomId = new String(party.getString("baseCurrencyUomId"));
      } else {
-     otherCurrencyUomId = new String(invoice.getString("currencyUomId"));
+     otherCurrencyUomId = new String(UtilProperties.getPropertyValue("general", "currency.uom.id.default"));
+     }
+     if (otherCurrencyUomId == null) {
+     otherCurrencyUomId = "USD"; // final default
      }
      } catch (GenericEntityException e) {
      Debug.logError(e, "Trouble getting database records....", module);            
      }
-
+ if (invoice.getString("currencyUomId").equals(otherCurrencyUomId)) {
+ return BigDecimal.ONE;  // organization party has the same currency so conversion not required.
+ }
+
      try {
      // check if the invoice is posted and get the conversion from there
      List acctgTransEntries = invoice.getRelated("AcctgTrans");

Modified: ofbiz/trunk/applications/ecommerce/data/DemoOrderPeopleData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/data/DemoOrderPeopleData.xml?rev=729414&r1=729413&r2=729414&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/data/DemoOrderPeopleData.xml (original)
+++ ofbiz/trunk/applications/ecommerce/data/DemoOrderPeopleData.xml Thu Dec 25 02:57:34 2008
@@ -119,7 +119,7 @@
     <UserLogin partyId="DemoCustomer" userLoginId="DemoCustomer"/>
     <PartyRole partyId="DemoCustomer" roleTypeId="CUSTOMER"/>
     <PartyRole partyId="DemoCustomer" roleTypeId="BILL_TO_CUSTOMER"/>
-
+    
     <ContactMech contactMechId="9015" contactMechTypeId="POSTAL_ADDRESS"/>
     <PostalAddress contactMechId="9015" toName="Demo Customer" address1="2004 Factory Blvd" city="Orem" stateProvinceGeoId="UT" postalCode="84057" countryGeoId="USA"/>
     <PartyContactMech partyId="DemoCustomer" contactMechId="9015" fromDate="2001-05-13 00:00:00.000" allowSolicitation="Y"/>
@@ -142,4 +142,29 @@
     <PaymentMethod paymentMethodId="9015" paymentMethodTypeId="CREDIT_CARD" partyId="DemoCustomer" fromDate="2001-05-13 00:00:00.000"/>
     <CreditCard paymentMethodId="9015" cardType="Visa" cardNumber="4111111111111111" expireDate="02/2011" companyNameOnCard=""
         titleOnCard="" firstNameOnCard="DEMO" middleNameOnCard="" lastNameOnCard="CUSTOMER" suffixOnCard="" contactMechId="9015"/>
+    <!-- EuroCustomer want invoices in euro -->
+    <Party partyId="EuroCustomer" partyTypeId="PERSON" statusId="PARTY_ENABLED" preferredCurrencyUomId="EUR"/>
+    <Person partyId="EuroCustomer" firstName="Demo" lastName="Customer"/>
+    <UserLogin partyId="EuroCustomer" userLoginId="EuroCustomer"/>
+    <PartyRole partyId="EuroCustomer" roleTypeId="CUSTOMER"/>
+    <PartyRole partyId="EuroCustomer" roleTypeId="BILL_TO_CUSTOMER"/>
+    
+    <ContactMech contactMechId="EUROCUSTOMER" contactMechTypeId="POSTAL_ADDRESS"/>
+    <PostalAddress contactMechId="EUROCUSTOMER" toName="Euro Customer" address1="Prinsengracht 3" city="Amsterdam" postalCode="1000BD" countryGeoId="NLD"/>
+    <PartyContactMech partyId="DemoCustomer" contactMechId="EUROCUSTOMER" fromDate="2001-05-13 00:00:00.000" allowSolicitation="Y"/>
+    <PartyContactMechPurpose partyId="DemoCustomer" contactMechId="EUROCUSTOMER" contactMechPurposeTypeId="BILLING_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
+    <PartyContactMechPurpose partyId="DemoCustomer" contactMechId="EUROCUSTOMER" contactMechPurposeTypeId="SHIPPING_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
+    <PartyContactMechPurpose partyId="DemoCustomer" contactMechId="EUROCUSTOMER" contactMechPurposeTypeId="GENERAL_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
+    <PostalAddress contactMechId="EUROCUSTOMER" toName="Demo Customer" address1="2004 Factory Blvd" city="Orem" stateProvinceGeoId="UT" postalCode="84057" countryGeoId="USA"/>
+    <PartyContactMech partyId="EuroCustomer" contactMechId="EUROCUSTOMER" fromDate="2001-05-13 00:00:00.000" allowSolicitation="Y"/>
+    <PartyContactMechPurpose partyId="EuroCustomer" contactMechId="EUROCUSTOMER" contactMechPurposeTypeId="BILLING_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
+    <PartyContactMechPurpose partyId="EuroCustomer" contactMechId="EUROCUSTOMER" contactMechPurposeTypeId="SHIPPING_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
+    <PartyContactMechPurpose partyId="EuroCustomer" contactMechId="EUROCUSTOMER" contactMechPurposeTypeId="GENERAL_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
+    <ContactMech contactMechId="EURO01" contactMechTypeId="EMAIL_ADDRESS" infoString="[hidden email]"/>
+    <PartyContactMech partyId="DemoCustomer" contactMechId="EURO01" fromDate="2001-05-13 00:00:00.000" allowSolicitation="Y"/>
+    <PartyContactMechPurpose partyId="DemoCustomer" contactMechId="EURO01" contactMechPurposeTypeId="PRIMARY_EMAIL" fromDate="2001-05-13 00:00:00.000"/>
+    
+    <PaymentMethod paymentMethodId="EUROCUSTOMER" paymentMethodTypeId="CREDIT_CARD" partyId="EuroCustomer" fromDate="2001-05-13 00:00:00.000"/>
+    <CreditCard paymentMethodId="EUROCUSTOMER" cardType="Visa" cardNumber="4111111111111111" expireDate="02/2011" companyNameOnCard=""
+        titleOnCard="" firstNameOnCard="DEMO" middleNameOnCard="" lastNameOnCard="CUSTOMER" suffixOnCard="" contactMechId="EUROCUSTOMER"/>
 </entity-engine-xml>