Author: jacopoc
Date: Thu Mar 8 02:43:41 2007
New Revision: 516004
URL:
http://svn.apache.org/viewvc?view=rev&rev=516004Log:
Fixed bug where expired cc cards associated to a billing address, prevented the billing address to be updated.
Modified:
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentMethodServices.xml
Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentMethodServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentMethodServices.xml?view=diff&rev=516004&r1=516003&r2=516004==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentMethodServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentMethodServices.xml Thu Mar 8 02:43:41 2007
@@ -80,11 +80,17 @@
<find-by-and entity-name="CreditCard" map-name="lookupMap" list-name="creditCards"/>
<iterate entry-name="creditCard" list-name="creditCards">
- <set-service-fields service-name="updateCreditCard" map-name="creditCard" to-map-name="uccMap"/>
- <set field="uccMap.contactMechId" from-field="parameters.contactMechId"/>
- <set field="uccMap.partyId" from-field="parameters.partyId"/>
- <!-- use the service so it will expire the old card and create a new one; don't break on error since this is a background process, just get whatever we can done... -->
- <call-service service-name="updateCreditCard" in-map-name="uccMap" break-on-error="false"/>
+ <!-- UtilValidate.isDateAfterToday((String) context.get("expireDate")) -->
+ <call-class-method class-name="org.ofbiz.base.util.UtilValidate" method-name="isDateAfterToday" ret-field-name="isNotExpired">
+ <field field-name="creditCard.expireDate"/>
+ </call-class-method>
+ <if-compare field-name="isNotExpired" operator="equals" type="Boolean" value="true">
+ <set-service-fields service-name="updateCreditCard" map-name="creditCard" to-map-name="uccMap"/>
+ <set field="uccMap.contactMechId" from-field="parameters.contactMechId"/>
+ <set field="uccMap.partyId" from-field="parameters.partyId"/>
+ <!-- use the service so it will expire the old card and create a new one; don't break on error since this is a background process, just get whatever we can done... -->
+ <call-service service-name="updateCreditCard" in-map-name="uccMap" break-on-error="false"/>
+ </if-compare>
</iterate>
<find-by-and entity-name="EftAccount" map-name="lookupMap" list-name="eftAccounts"/>