Author: jonesde
Date: Fri May 29 06:47:32 2009
New Revision: 779867
URL:
http://svn.apache.org/viewvc?rev=779867&view=revLog:
Added finAccountTransId to ReturnItemResponse entity to keep track of when store credit is used there; This is a tough decision. Right now we have ReturnItemResponse that is used for all ReturnItems as they are processed, and we also have the FinAccountTrans that refers to whatever triggered the transaction. However, I don't like circular references... If there was a natural one-to-many relationship in a certain direction it would help break the tie, but realistically these should be a one-to-one relationship. Unfortunately this means for the FinAccount we have to do a lookup on the ReturnItemResponse entity to see if it came from a return. For now I guess that's the best option.
Modified:
ofbiz/trunk/applications/order/entitydef/entitymodel.xml
Modified: ofbiz/trunk/applications/order/entitydef/entitymodel.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/entitydef/entitymodel.xml?rev=779867&r1=779866&r2=779867&view=diff==============================================================================
--- ofbiz/trunk/applications/order/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/order/entitydef/entitymodel.xml Fri May 29 06:47:32 2009
@@ -2489,6 +2489,7 @@
<field name="replacementOrderId" type="id"></field>
<field name="paymentId" type="id"></field>
<field name="billingAccountId" type="id"></field>
+ <field name="finAccountTransId" type="id"></field>
<field name="responseAmount" type="currency-amount"></field>
<field name="responseDate" type="date-time"></field>
<prim-key field="returnItemResponseId"/>
@@ -2504,6 +2505,9 @@
<relation type="one" fk-name="RTN_PAY_BACT" rel-entity-name="BillingAccount">
<key-map field-name="billingAccountId"/>
</relation>
+ <relation type="one" fk-name="RTN_PAY_FINACTTX" rel-entity-name="FinAccountTrans">
+ <key-map field-name="finAccountTransId"/>
+ </relation>
</entity>
<entity entity-name="ReturnItemType"
package-name="org.ofbiz.order.return"