You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mo...@apache.org on 2008/11/18 15:32:12 UTC
svn commit: r718617 -
/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy
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