svn commit: r830048 - in /ofbiz/trunk/applications/accounting: data/DemoFinAccountData.xml entitydef/entitymodel.xml

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

svn commit: r830048 - in /ofbiz/trunk/applications/accounting: data/DemoFinAccountData.xml entitydef/entitymodel.xml

apatel-2
Author: apatel
Date: Tue Oct 27 03:36:47 2009
New Revision: 830048

URL: http://svn.apache.org/viewvc?rev=830048&view=rev
Log:
Add relationship from PaymentMethod to FinAccount entity. A finAccount can have zero or more related PaymentMethods.
When making Disbursements using PaymentMethods owned by InternalOrganization, we can create FinAccountTransaction. In reconciliation process user can then add FinAccountTransactions to reconciliation.
In next step we need to improve service creating disbursements to fetch finAccountId from PaymentMethod and put in context to enable finAccountTransaction eca services to create finaccounttransactions.

Modified:
    ofbiz/trunk/applications/accounting/data/DemoFinAccountData.xml
    ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml

Modified: ofbiz/trunk/applications/accounting/data/DemoFinAccountData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/DemoFinAccountData.xml?rev=830048&r1=830047&r2=830048&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/data/DemoFinAccountData.xml (original)
+++ ofbiz/trunk/applications/accounting/data/DemoFinAccountData.xml Tue Oct 27 03:36:47 2009
@@ -22,17 +22,17 @@
     <FinAccount finAccountId="SC_CHECKING" finAccountTypeId="BANK_ACCOUNT" statusId="FNACT_ACTIVE" finAccountName="Standard Chartered" finAccountCode="1247854852147" finAccountPin="1234"
             currencyUomId="USD" organizationPartyId="Company" ownerPartyId="Company" postToGlAccountId="111100" isRefundable="Y" replenishLevel="0.00" actualBalance="0.00" availableBalance="0.00"/>
     <FinAccountStatus finAccountId="SC_CHECKING" statusId="FNACT_ACTIVE" statusDate="2009-04-01 00:00:01.000"/>
-    <PaymentMethod paymentMethodId="SC_CHECKING" paymentMethodTypeId="COMPANY_CHECK"  partyId="Company" description="Checking Account at Standard Chartered Bank" glAccountId="111100" fromDate="2009-04-01 00:00:00.000"/>
+    <PaymentMethod paymentMethodId="SC_CHECKING" paymentMethodTypeId="COMPANY_CHECK"  partyId="Company" description="Checking Account at Standard Chartered Bank" glAccountId="111100" finAccountId="SC_CHECKING" fromDate="2009-04-01 00:00:00.000"/>
     <EftAccount paymentMethodId="SC_CHECKING" bankName="Standard Chartered Bank" routingNumber="307075259" accountType="Checking" accountNumber="316253011064226" contactMechId="9000" />
     <FinAccount finAccountId="ABN_CHECKING" finAccountTypeId="BANK_ACCOUNT" statusId="FNACT_ACTIVE" finAccountName="ABN AMRO" finAccountCode="6577852521447" finAccountPin="1234" currencyUomId="USD"
             organizationPartyId="Company" ownerPartyId="Company" postToGlAccountId="111100" isRefundable="Y" replenishLevel="0.00" actualBalance="0.00" availableBalance="0.00"/>
     <FinAccountStatus finAccountId="ABN_CHECKING" statusId="FNACT_ACTIVE" statusDate="2009-04-01 00:00:01.000"/>
-    <PaymentMethod paymentMethodId="ABN_CHECKING" paymentMethodTypeId="COMPANY_CHECK"  partyId="Company" description="Checking Account at ABN AMRO Bank" glAccountId="111100" fromDate="2009-04-01 00:00:00.000"/>
+    <PaymentMethod paymentMethodId="ABN_CHECKING" paymentMethodTypeId="COMPANY_CHECK"  partyId="Company" description="Checking Account at ABN AMRO Bank" glAccountId="111100" finAccountId="ABN_CHECKING" fromDate="2009-04-01 00:00:00.000"/>
     <EftAccount paymentMethodId="ABN_CHECKING" bankName="ABN AMRO Bank" routingNumber="222371863" accountType="Checking" accountNumber="427253011064227" contactMechId="9000"/>
     <FinAccount finAccountId="AMEX_01" finAccountTypeId="CREDIT_CARD_ACCOUNT" statusId="FNACT_ACTIVE" finAccountName="Corporate AMEX " finAccountCode="378282246310005" finAccountPin="9876" currencyUomId="USD"
             organizationPartyId="Company" ownerPartyId="Company" postToGlAccountId="231000" isRefundable="Y" replenishLevel="0.00" actualBalance="0.00" availableBalance="0.00"/>
     <FinAccountStatus finAccountId="AMEX_01" statusId="FNACT_ACTIVE" statusDate="2009-04-01 00:00:01.000"/>
-    <PaymentMethod paymentMethodId="AMEX_01" paymentMethodTypeId="CREDIT_CARD" partyId="Company" glAccountId="231000" fromDate="2009-04-01 00:00:00.000"/>
+    <PaymentMethod paymentMethodId="AMEX_01" paymentMethodTypeId="CREDIT_CARD" partyId="Company" glAccountId="231000" finAccountId="AMEX_01" fromDate="2009-04-01 00:00:00.000"/>
     <CreditCard paymentMethodId="AMEX_01" cardType="AmericanExpress" cardNumber="378282246310005" expireDate="02/2020" companyNameOnCard="Your Company Name"
         titleOnCard="" firstNameOnCard="Smart" middleNameOnCard="" lastNameOnCard="Guy" suffixOnCard="" contactMechId="9000"/>
 

Modified: ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml?rev=830048&r1=830047&r2=830048&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml Tue Oct 27 03:36:47 2009
@@ -2864,6 +2864,7 @@
       <field name="paymentMethodTypeId" type="id"></field>
       <field name="partyId" type="id-ne"></field>
       <field name="glAccountId" type="id-ne"></field>
+      <field name="finAccountId" type="id-ne"></field>
       <field name="description" type="description"></field>
       <field name="fromDate" type="date-time"></field>
       <field name="thruDate" type="date-time"></field>
@@ -2877,6 +2878,9 @@
       <relation type="one" fk-name="PAYMETH_GLACCT" rel-entity-name="GlAccount">
         <key-map field-name="glAccountId"/>
       </relation>
+      <relation type="one" fk-name="PAYMETH_FINACCT" rel-entity-name="FinAccount">
+        <key-map field-name="finAccountId"/>
+      </relation>
     </entity>
   <view-entity entity-name="PaymentMethodAndCreditCard"
     package-name="org.ofbiz.accounting.payment"