svn commit: r718617 - /ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy

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

svn commit: r718617 - /ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy

mor-2
Author: mor
Date: Tue Nov 18 06:32:12 2008
New Revision: 718617

URL: http://svn.apache.org/viewvc?rev=718617&view=rev
Log:
Fixed an error on One Page Checkout - Thanks to Jacques for reporting on dev mailing list

Modified:
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy?rev=718617&r1=718616&r2=718617&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy Tue Nov 18 06:32:12 2008
@@ -42,33 +42,33 @@
         if (billToCountryProvinceGeo) {
             context.billToCountryProvinceGeo = billToCountryProvinceGeo.geoName;
         }
+        
+        creditCards = [];
+        paymentMethod = EntityUtil.getFirst(EntityUtil.filterByDate(delegator.findList("PaymentMethod", EntityCondition.makeCondition([partyId : party.partyId]), null, ["fromDate"], null, false)));
+        if (paymentMethod) {
+            creditCard = paymentMethod.getRelatedOne("CreditCard");
+            if (creditCard) {
+                context.paymentMethodTypeId = "CREDIT_CARD";
+                context.cardNumber = creditCard.cardNumber;
+                context.paymentMethodId = creditCard.paymentMethodId;
+                context.firstNameOnCard = creditCard.firstNameOnCard;
+                context.lastNameOnCard = creditCard.lastNameOnCard;
+                context.expMonth = (creditCard.expireDate).substring(0, 2);
+                context.expYear = (creditCard.expireDate).substring(3);
+           }
+        }
+        if (shipToContactMechId) {
+            if (billToContactMechId && billToContactMechId.equals(shipToContactMechId)) {
+                context.useShippingAddressForBilling = "Y";
+            }
+        }
     }
     
- billToContactMechList = ContactHelper.getContactMech(party, "PHONE_BILLING", "TELECOM_NUMBER", false)
- if (billToContactMechList) {
+    billToContactMechList = ContactHelper.getContactMech(party, "PHONE_BILLING", "TELECOM_NUMBER", false)
+    if (billToContactMechList) {
         billToTelecomNumber = (EntityUtil.getFirst(billToContactMechList)).getRelatedOne("TelecomNumber");
         pcm = EntityUtil.getFirst(billToTelecomNumber.getRelated("PartyContactMech"));
         context.billToTelecomNumber = billToTelecomNumber;
         context.billToExtension = pcm.extension;
     }
-    
-    creditCards = [];
-    paymentMethod = EntityUtil.getFirst(EntityUtil.filterByDate(delegator.findList("PaymentMethod", EntityCondition.makeCondition([partyId : party.partyId]), null, ["fromDate"], null, false)));
-    if (paymentMethod) {
-        creditCard = paymentMethod.getRelatedOne("CreditCard");
-        if (creditCard) {
-            context.paymentMethodTypeId = "CREDIT_CARD";
-            context.cardNumber = creditCard.cardNumber;
-            context.paymentMethodId = creditCard.paymentMethodId;
-            context.firstNameOnCard = creditCard.firstNameOnCard;
-            context.lastNameOnCard = creditCard.lastNameOnCard;
-            context.expMonth = (creditCard.expireDate).substring(0, 2);
-            context.expYear = (creditCard.expireDate).substring(3);
-       }
-    }
-    if (shipToContactMechId) {
-        if (billToContactMechId && billToContactMechId.equals(shipToContactMechId)) {
-            context.useShippingAddressForBilling = "Y";
-        }
-    }    
 }
\ No newline at end of file