You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2012/05/29 06:11:45 UTC
svn commit: r1343479 [1/2] - in /ofbiz/trunk/applications/accounting:
src/org/ofbiz/accounting/finaccount/ src/org/ofbiz/accounting/invoice/
src/org/ofbiz/accounting/payment/
src/org/ofbiz/accounting/thirdparty/authorizedotnet/
src/org/ofbiz/accounting...
Author: doogie
Date: Tue May 29 04:11:43 2012
New Revision: 1343479
URL: http://svn.apache.org/viewvc?rev=1343479&view=rev
Log:
DEPRECATION: applications/accounting: getRelatedOne variants replaced with a getRelatedOne variant that takes a boolean useCache parameter.
Modified:
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/eway/EwayServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/ListInvoiceItemTypesGlAccount.groovy
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/PrintInvoices.groovy
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ManualTx.groovy
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/PrintChecks.groovy
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/period/EditCustomTimePeriod.groovy
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/SalesInvoiceByProductCategorySummary.groovy
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/AuthorizeTransaction.groovy
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/CaptureTransaction.groovy
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/ViewGatewayResponse.groovy
ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl
ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl
ofbiz/trunk/applications/accounting/webapp/accounting/invoice/PrintInvoices.fo.ftl
ofbiz/trunk/applications/accounting/webapp/accounting/invoice/invoiceReportHeaderInfo.fo.ftl
ofbiz/trunk/applications/accounting/webapp/accounting/invoice/invoiceReportItems.fo.ftl
ofbiz/trunk/applications/accounting/webapp/accounting/payment/PrintChecks.fo.ftl
ofbiz/trunk/applications/accounting/webapp/accounting/period/EditCustomTimePeriod.ftl
ofbiz/trunk/applications/accounting/webapp/accounting/reports/AcctgTransEntriesSearchResult.fo.ftl
ofbiz/trunk/applications/accounting/webapp/accounting/reports/AcctgTransEntriesSearchResultsInvoiceAndPayment.rptdesign
ofbiz/trunk/applications/accounting/webapp/accounting/reports/AcctgTransSearchResult.fo.ftl
ofbiz/trunk/applications/accounting/webapp/accounting/reports/BalanceSheet.rptdesign
ofbiz/trunk/applications/accounting/webapp/accounting/reports/IncomeStatement.rptdesign
ofbiz/trunk/applications/accounting/webapp/accounting/reports/InvoiceAcctgTransEntry.rptdesign
ofbiz/trunk/applications/accounting/webapp/accounting/reports/PaymentAcctgTransEntry.rptdesign
ofbiz/trunk/applications/accounting/webapp/accounting/reports/TrialBalance.rptdesign
ofbiz/trunk/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java Tue May 29 04:11:43 2012
@@ -355,7 +355,7 @@ public class FinAccountPaymentServices {
// get the financial account
GenericValue finAccount;
try {
- finAccount = finAccountAuth.getRelatedOne("FinAccount");
+ finAccount = finAccountAuth.getRelatedOne("FinAccount", false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(e.getMessage());
@@ -733,7 +733,7 @@ public class FinAccountPaymentServices {
// look up the type -- determine auto-replenish is active
GenericValue finAccountType;
try {
- finAccountType = finAccount.getRelatedOne("FinAccountType");
+ finAccountType = finAccount.getRelatedOne("FinAccountType", false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(e.getMessage());
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java Tue May 29 04:11:43 2012
@@ -62,7 +62,7 @@ public class FinAccountProductServices {
// the order header for store info
GenericValue orderHeader;
try {
- orderHeader = orderItem.getRelatedOne("OrderHeader");
+ orderHeader = orderItem.getRelatedOne("OrderHeader", false);
} catch (GenericEntityException e) {
Debug.logError(e, "Unable to get OrderHeader from OrderItem", module);
return ServiceUtil.returnError(UtilProperties.getMessage(resourceOrderError,
@@ -152,7 +152,7 @@ public class FinAccountProductServices {
if (billToParty != null) {
try {
- party = billToParty.getRelatedOne("Party");
+ party = billToParty.getRelatedOne("Party", false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
}
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java Tue May 29 04:11:43 2012
@@ -389,7 +389,7 @@ public class FinAccountServices {
// make sure there is an order available to refund
if (orderId != null && orderItemSeqId != null) {
GenericValue orderHeader = delegator.findOne("OrderHeader", UtilMisc.toMap("orderId",orderId), false);
- GenericValue productStore = orderHeader.getRelatedOne("ProductStore");
+ GenericValue productStore = orderHeader.getRelatedOne("ProductStore", false);
GenericValue orderItem = delegator.findOne("OrderItem", UtilMisc.toMap("orderId", orderId, "orderItemSeqId", orderItemSeqId), false);
if (!"ITEM_CANCELLED".equals(orderItem.getString("statusId"))) {
@@ -449,7 +449,7 @@ public class FinAccountServices {
// get the return item
GenericValue returnItem = delegator.findOne("ReturnItem",
UtilMisc.toMap("returnId", returnId, "returnItemSeqId", returnItemSeqId), false);
- GenericValue response = returnItem.getRelatedOne("ReturnItemResponse");
+ GenericValue response = returnItem.getRelatedOne("ReturnItemResponse", false);
if (response == null) {
throw new GeneralException("No return response found for: " + returnItem.getPrimaryKey());
}
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java Tue May 29 04:11:43 2012
@@ -210,7 +210,7 @@ public class InvoiceServices {
BigDecimal invoiceSubTotal = ZERO;
BigDecimal invoiceQuantity = ZERO;
- GenericValue billingAccount = orderHeader.getRelatedOne("BillingAccount");
+ GenericValue billingAccount = orderHeader.getRelatedOne("BillingAccount", false);
String billingAccountId = billingAccount != null ? billingAccount.getString("billingAccountId") : null;
Timestamp invoiceDate = (Timestamp)context.get("eventDate");
@@ -333,7 +333,7 @@ public class InvoiceServices {
// for purchase orders, the pay to address is the BILLING_LOCATION of the vendor
GenericValue billFromVendor = orh.getPartyFromRole("BILL_FROM_VENDOR");
if (billFromVendor != null) {
- List<GenericValue> billingContactMechs = billFromVendor.getRelatedOne("Party").getRelatedByAnd("PartyContactMechPurpose", UtilMisc.toMap("contactMechPurposeTypeId", "BILLING_LOCATION"));
+ List<GenericValue> billingContactMechs = billFromVendor.getRelatedOne("Party", false).getRelatedByAnd("PartyContactMechPurpose", UtilMisc.toMap("contactMechPurposeTypeId", "BILLING_LOCATION"));
if (UtilValidate.isNotEmpty(billingContactMechs)) {
payToAddress = EntityUtil.getFirst(billingContactMechs);
}
@@ -372,9 +372,9 @@ public class InvoiceServices {
}
if (orderItem == null && itemIssuance != null) {
- orderItem = itemIssuance.getRelatedOne("OrderItem");
+ orderItem = itemIssuance.getRelatedOne("OrderItem", false);
} else if ((orderItem == null) && (shipmentReceipt != null)) {
- orderItem = shipmentReceipt.getRelatedOne("OrderItem");
+ orderItem = shipmentReceipt.getRelatedOne("OrderItem", false);
} else if ((orderItem == null) && (itemIssuance == null) && (shipmentReceipt == null)) {
Debug.logError("Cannot create invoice when orderItem, itemIssuance, and shipmentReceipt are all null", module);
return ServiceUtil.returnError(UtilProperties.getMessage(resource,
@@ -382,7 +382,7 @@ public class InvoiceServices {
}
GenericValue product = null;
if (orderItem.get("productId") != null) {
- product = orderItem.getRelatedOne("Product");
+ product = orderItem.getRelatedOne("Product", false);
}
// get some quantities
@@ -580,7 +580,7 @@ public class InvoiceServices {
// represent an organization override for the payToPartyId
if (UtilValidate.isNotEmpty(adj.getString("productPromoId"))) {
try {
- GenericValue productPromo = adj.getRelatedOne("ProductPromo");
+ GenericValue productPromo = adj.getRelatedOne("ProductPromo", false);
if (UtilValidate.isNotEmpty(productPromo.getString("overrideOrgPartyId"))) {
createInvoiceItemAdjContext.put("overrideOrgPartyId", productPromo.getString("overrideOrgPartyId"));
}
@@ -1170,7 +1170,7 @@ public class InvoiceServices {
GenericValue orderItemBilling = EntityUtil.getFirst(orderItemBillings);
GenericValue invoice = null;
try {
- invoice = orderItemBilling.getRelatedOne("Invoice");
+ invoice = orderItemBilling.getRelatedOne("Invoice", false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(e.getMessage());
@@ -1273,7 +1273,7 @@ public class InvoiceServices {
Iterator<GenericValue> itemsIter = items.iterator();
while (itemsIter.hasNext()) {
GenericValue item = itemsIter.next();
- GenericValue inventoryItem = item.getRelatedOne("InventoryItem");
+ GenericValue inventoryItem = item.getRelatedOne("InventoryItem", false);
GenericValue ownerPartyRole = delegator.findOne("PartyRole", UtilMisc.toMap("partyId", inventoryItem.getString("ownerPartyId"), "roleTypeId", "INTERNAL_ORGANIZATIO"), true);
if (UtilValidate.isEmpty(ownerPartyRole)) {
itemsIter.remove();
@@ -1391,7 +1391,7 @@ public class InvoiceServices {
List<GenericValue> billed = null;
BigDecimal orderedQty = null;
try {
- orderItem = issue.getEntityName().equals("OrderItem") ? issue : issue.getRelatedOne("OrderItem");
+ orderItem = issue.getEntityName().equals("OrderItem") ? issue : issue.getRelatedOne("OrderItem", false);
// total ordered
orderedQty = orderItem.getBigDecimal("quantity");
@@ -1400,7 +1400,7 @@ public class InvoiceServices {
// Override the issueQty with the quantity from the purchase order item
GenericValue orderItemAssoc = EntityUtil.getFirst(EntityUtil.filterByAnd(orderItemAssocs, UtilMisc.toMap("orderId", issue.getString("orderId"), "orderItemSeqId", issue.getString("orderItemSeqId"))));
- GenericValue purchaseOrderItem = orderItemAssoc.getRelatedOne("ToOrderItem");
+ GenericValue purchaseOrderItem = orderItemAssoc.getRelatedOne("ToOrderItem", false);
orderItem.set("quantity", purchaseOrderItem.getBigDecimal("quantity"));
issueQty = purchaseOrderItem.getBigDecimal("quantity");
}
@@ -1550,7 +1550,7 @@ public class InvoiceServices {
GenericValue payToParty = orh.getBillFromParty();
GenericValue destinationContactMech = null;
try {
- destinationContactMech = shipment.getRelatedOne("DestinationPostalAddress");
+ destinationContactMech = shipment.getRelatedOne("DestinationPostalAddress", false);
} catch (GenericEntityException e) {
Debug.logError(e, "Trouble calling createInvoicesFromShipment service; invoice not created for shipment " + shipmentId, module);
return ServiceUtil.returnError(UtilProperties.getMessage(resource,
@@ -1911,14 +1911,14 @@ public class InvoiceServices {
// we need the related return item and product
GenericValue returnItem = null;
if (shipmentReceiptFound) {
- returnItem = item.getRelatedOneCache("ReturnItem");
+ returnItem = item.getRelatedOne("ReturnItem", true);
} else if (itemIssuanceFound) {
- GenericValue shipmentItem = item.getRelatedOneCache("ShipmentItem");
+ GenericValue shipmentItem = item.getRelatedOne("ShipmentItem", true);
GenericValue returnItemShipment = EntityUtil.getFirst(shipmentItem.getRelated("ReturnItemShipment"));
- returnItem = returnItemShipment.getRelatedOneCache("ReturnItem");
+ returnItem = returnItemShipment.getRelatedOne("ReturnItem", true);
}
if (returnItem == null) continue; // Just to prevent NPE
- GenericValue product = returnItem.getRelatedOneCache("Product");
+ GenericValue product = returnItem.getRelatedOne("Product", true);
// extract the return price as a big decimal for convenience
BigDecimal returnPrice = returnItem.getBigDecimal("returnPrice");
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java Tue May 29 04:11:43 2012
@@ -190,7 +190,7 @@ public class InvoiceWorker {
*/
public static GenericValue getBillToParty(GenericValue invoice) {
try {
- GenericValue billToParty = invoice.getRelatedOne("Party");
+ GenericValue billToParty = invoice.getRelatedOne("Party", false);
if (billToParty != null) {
return billToParty;
}
@@ -210,7 +210,7 @@ public class InvoiceWorker {
GenericValue role = EntityUtil.getFirst(billToRoles);
GenericValue party = null;
try {
- party = role.getRelatedOne("Party");
+ party = role.getRelatedOne("Party", false);
} catch (GenericEntityException e) {
Debug.logError(e, "Trouble getting Party from InvoiceRole", module);
}
@@ -223,7 +223,7 @@ public class InvoiceWorker {
/** Convenience method to obtain the bill from party for an invoice. Note that invoice.partyIdFrom is the bill from party. */
public static GenericValue getBillFromParty(GenericValue invoice) {
try {
- return invoice.getRelatedOne("FromParty");
+ return invoice.getRelatedOne("FromParty", false);
} catch (GenericEntityException e) {
Debug.logError(e, "Trouble getting FromParty from Invoice", module);
}
@@ -253,7 +253,7 @@ public class InvoiceWorker {
GenericValue role = EntityUtil.getFirst(sendFromRoles);
GenericValue party = null;
try {
- party = role.getRelatedOne("Party");
+ party = role.getRelatedOne("Party", false);
} catch (GenericEntityException e) {
Debug.logError(e, "Trouble getting Party from InvoiceRole", module);
}
@@ -320,14 +320,14 @@ public class InvoiceWorker {
GenericValue contactMech = null;
if (UtilValidate.isNotEmpty(locations)) {
try {
- contactMech = locations.get(0).getRelatedOne("ContactMech");
+ contactMech = locations.get(0).getRelatedOne("ContactMech", false);
} catch (GenericEntityException e) {
Debug.logError(e, "Trouble getting Contact for contactMechId: " + locations.get(0).getString("contactMechId"), module);
}
if (contactMech != null && contactMech.getString("contactMechTypeId").equals("POSTAL_ADDRESS")) {
try {
- postalAddress = contactMech.getRelatedOne("PostalAddress");
+ postalAddress = contactMech.getRelatedOne("PostalAddress", false);
return postalAddress;
} catch (GenericEntityException e) {
Debug.logError(e, "Trouble getting PostalAddress for contactMechId: " + contactMech.getString("contactMechId"), module);
@@ -521,7 +521,7 @@ public class InvoiceWorker {
if (UtilValidate.isEmpty(conversionRate)) {
List<GenericValue> paymentAppls = invoice.getRelated("PaymentApplication");
for (GenericValue paymentAppl : paymentAppls) {
- GenericValue payment = paymentAppl.getRelatedOne("Payment");
+ GenericValue payment = paymentAppl.getRelatedOne("Payment", false);
if (UtilValidate.isNotEmpty(payment.getBigDecimal("actualCurrencyAmount"))) {
if (UtilValidate.isEmpty(conversionRate)) {
conversionRate = payment.getBigDecimal("amount").divide(payment.getBigDecimal("actualCurrencyAmount"),new MathContext(100)).setScale(decimals,rounding);
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java Tue May 29 04:11:43 2012
@@ -85,7 +85,7 @@ public class BillingAccountWorker {
if (billingAccountRoleList.size() > 0) {
BigDecimal totalAvailable = BigDecimal.ZERO;
for(GenericValue billingAccountRole : billingAccountRoleList) {
- GenericValue billingAccountVO = billingAccountRole.getRelatedOne("BillingAccount");
+ GenericValue billingAccountVO = billingAccountRole.getRelatedOne("BillingAccount", false);
// skip accounts that have thruDate < nowTimestamp
java.sql.Timestamp thruDate = billingAccountVO.getTimestamp("thruDate");
@@ -255,7 +255,7 @@ public class BillingAccountWorker {
for (Iterator<GenericValue> pAi = paymentAppls.iterator(); pAi.hasNext();) {
GenericValue paymentAppl = pAi.next();
BigDecimal amountApplied = paymentAppl.getBigDecimal("amountApplied");
- GenericValue invoice = paymentAppl.getRelatedOne("Invoice");
+ GenericValue invoice = paymentAppl.getRelatedOne("Invoice", false);
if (invoice != null) {
// make sure the invoice has not been canceled and it is not a "Customer return invoice"
if (!"CUST_RTN_INVOICE".equals(invoice.getString("invoiceTypeId")) && !"INVOICE_CANCELLED".equals(invoice.getString("statusId"))) {
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java Tue May 29 04:11:43 2012
@@ -389,7 +389,7 @@ public class GiftCertificateServices {
String finAccountAuthId = authTransaction.getString("referenceNum");
try {
GenericValue finAccountAuth = delegator.findOne("FinAccountAuth", UtilMisc.toMap("finAccountAuthId", finAccountAuthId), false);
- GenericValue giftCard = finAccountAuth.getRelatedOne("FinAccount");
+ GenericValue giftCard = finAccountAuth.getRelatedOne("FinAccount", false);
// make sure authorization has not expired
Timestamp authExpiration = finAccountAuth.getTimestamp("thruDate");
if ((authExpiration != null) && (authExpiration.before(UtilDateTime.nowTimestamp()))) {
@@ -634,7 +634,7 @@ public class GiftCertificateServices {
// get the GiftCard VO
GenericValue giftCard = null;
try {
- giftCard = paymentPref.getRelatedOne("GiftCard");
+ giftCard = paymentPref.getRelatedOne("GiftCard", false);
} catch (GenericEntityException e) {
Debug.logError(e, "Unable to get GiftCard from OrderPaymentPreference", module);
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
@@ -700,7 +700,7 @@ public class GiftCertificateServices {
// the order header for store info
GenericValue orderHeader = null;
try {
- orderHeader = orderItem.getRelatedOne("OrderHeader");
+ orderHeader = orderItem.getRelatedOne("OrderHeader", false);
} catch (GenericEntityException e) {
Debug.logError(e, "Unable to get OrderHeader from OrderItem",module);
return ServiceUtil.returnError(UtilProperties.getMessage(resourceOrderError,
@@ -743,7 +743,7 @@ public class GiftCertificateServices {
// the product entity needed for information
GenericValue product = null;
try {
- product = orderItem.getRelatedOne("Product");
+ product = orderItem.getRelatedOne("Product", false);
} catch (GenericEntityException e) {
Debug.logError(e, "Unable to get Product from OrderItem", module);
}
@@ -802,7 +802,7 @@ public class GiftCertificateServices {
for(GenericValue answer : responseAnswers) {
GenericValue question = null;
try {
- question = answer.getRelatedOne("SurveyQuestion");
+ question = answer.getRelatedOne("SurveyQuestion", false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
@@ -955,7 +955,7 @@ public class GiftCertificateServices {
// the order header for store info
GenericValue orderHeader = null;
try {
- orderHeader = orderItem.getRelatedOne("OrderHeader");
+ orderHeader = orderItem.getRelatedOne("OrderHeader", false);
} catch (GenericEntityException e) {
Debug.logError(e, "Unable to get OrderHeader from OrderItem",module);
return ServiceUtil.returnError(UtilProperties.getMessage(resourceOrderError,
@@ -1038,7 +1038,7 @@ public class GiftCertificateServices {
for(GenericValue answer : responseAnswers) {
GenericValue question = null;
try {
- question = answer.getRelatedOne("SurveyQuestion");
+ question = answer.getRelatedOne("SurveyQuestion", false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(UtilProperties.getMessage(resourceOrderError,
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java Tue May 29 04:11:43 2012
@@ -130,7 +130,7 @@ public class PaymentGatewayServices {
try {
orderPaymentPreference = delegator.findOne("OrderPaymentPreference",
UtilMisc.toMap("orderPaymentPreferenceId", orderPaymentPreferenceId), false);
- orderHeader = orderPaymentPreference.getRelatedOne("OrderHeader");
+ orderHeader = orderPaymentPreference.getRelatedOne("OrderHeader", false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(UtilProperties.getMessage(resource,
@@ -217,7 +217,7 @@ public class PaymentGatewayServices {
if (!needsNsfRetry) {
// is this an auto-order?
if (UtilValidate.isNotEmpty(orderHeader.getString("autoOrderShoppingListId"))) {
- GenericValue productStore = orderHeader.getRelatedOne("ProductStore");
+ GenericValue productStore = orderHeader.getRelatedOne("ProductStore", false);
// according to the store should we try other cards?
if ("Y".equals(productStore.getString("autoOrderCcTryOtherCards"))) {
// get other credit cards for the bill to party
@@ -495,7 +495,7 @@ public class PaymentGatewayServices {
processContext.put("customerIpAddress", visit.getString("clientIpAddress"));
}
- GenericValue productStore = orderHeader.getRelatedOne("ProductStore");
+ GenericValue productStore = orderHeader.getRelatedOne("ProductStore", false);
processContext.put("userLogin", userLogin);
processContext.put("orderId", orh.getOrderId());
@@ -634,7 +634,7 @@ public class PaymentGatewayServices {
String payToPartyId = "Company"; // default value
GenericValue productStore = null;
try {
- productStore = orderHeader.getRelatedOne("ProductStore");
+ productStore = orderHeader.getRelatedOne("ProductStore", false);
} catch (GenericEntityException e) {
Debug.logError(e, "Unable to get ProductStore from OrderHeader", module);
return null;
@@ -650,31 +650,31 @@ public class PaymentGatewayServices {
private static String getBillingInformation(OrderReadHelper orh, GenericValue paymentPreference, Map<String, Object> toContext) throws GenericEntityException {
// gather the payment related objects.
String paymentMethodTypeId = paymentPreference.getString("paymentMethodTypeId");
- GenericValue paymentMethod = paymentPreference.getRelatedOne("PaymentMethod");
+ GenericValue paymentMethod = paymentPreference.getRelatedOne("PaymentMethod", false);
if (paymentMethod != null && "CREDIT_CARD".equals(paymentMethodTypeId)) {
// type credit card
- GenericValue creditCard = paymentMethod.getRelatedOne("CreditCard");
- GenericValue billingAddress = creditCard.getRelatedOne("PostalAddress");
+ GenericValue creditCard = paymentMethod.getRelatedOne("CreditCard", false);
+ GenericValue billingAddress = creditCard.getRelatedOne("PostalAddress", false);
toContext.put("creditCard", creditCard);
toContext.put("billingAddress", billingAddress);
} else if (paymentMethod != null && "EFT_ACCOUNT".equals(paymentMethodTypeId)) {
// type eft
- GenericValue eftAccount = paymentMethod.getRelatedOne("EftAccount");
- GenericValue billingAddress = eftAccount.getRelatedOne("PostalAddress");
+ GenericValue eftAccount = paymentMethod.getRelatedOne("EftAccount", false);
+ GenericValue billingAddress = eftAccount.getRelatedOne("PostalAddress", false);
toContext.put("eftAccount", eftAccount);
toContext.put("billingAddress", billingAddress);
} else if (paymentMethod != null && "GIFT_CARD".equals(paymentMethodTypeId)) {
// type gift card
- GenericValue giftCard = paymentMethod.getRelatedOne("GiftCard");
+ GenericValue giftCard = paymentMethod.getRelatedOne("GiftCard", false);
toContext.put("giftCard", giftCard);
- GenericValue orderHeader = paymentPreference.getRelatedOne("OrderHeader");
+ GenericValue orderHeader = paymentPreference.getRelatedOne("OrderHeader", false);
List<GenericValue> orderItems = orderHeader.getRelated("OrderItem");
toContext.put("orderId", orderHeader.getString("orderId"));
toContext.put("orderItems", orderItems);
} else if ("FIN_ACCOUNT".equals(paymentMethodTypeId)) {
toContext.put("finAccountId", paymentPreference.getString("finAccountId"));
} else if ("EXT_PAYPAL".equals(paymentMethodTypeId)) {
- GenericValue payPalPaymentMethod = paymentMethod.getRelatedOne("PayPalPaymentMethod");
+ GenericValue payPalPaymentMethod = paymentMethod.getRelatedOne("PayPalPaymentMethod", false);
toContext.put("payPalPaymentMethod", payPalPaymentMethod);
} else {
// add other payment types here; i.e. gift cards, etc.
@@ -687,7 +687,7 @@ public class PaymentGatewayServices {
GenericValue billToPersonOrGroup = orh.getBillToParty();
GenericValue billToEmail = null;
- Collection<GenericValue> emails = ContactHelper.getContactMech(billToPersonOrGroup.getRelatedOne("Party"), "PRIMARY_EMAIL", "EMAIL_ADDRESS", false);
+ Collection<GenericValue> emails = ContactHelper.getContactMech(billToPersonOrGroup.getRelatedOne("Party", false), "PRIMARY_EMAIL", "EMAIL_ADDRESS", false);
if (UtilValidate.isNotEmpty(emails)) {
billToEmail = emails.iterator().next();
@@ -1547,7 +1547,7 @@ public class PaymentGatewayServices {
GenericValue orderPaymentPreference = EntityUtil.getFirst(orderPaymentPreferences);
// Check the productStore setting to see if we need to do this explicitly
- GenericValue productStore = order.getRelatedOne("ProductStore");
+ GenericValue productStore = order.getRelatedOne("ProductStore", false);
if (productStore.getString("manualAuthIsCapture") == null || (! productStore.getString("manualAuthIsCapture").equalsIgnoreCase("Y"))) {
String responseId = delegator.getNextSeqId("PaymentGatewayResponse");
GenericValue pgResponse = delegator.makeValue("PaymentGatewayResponse");
@@ -1606,7 +1606,7 @@ public class PaymentGatewayServices {
break;
}
GenericValue paymentApplication = paymentApplicationsIt.next();
- GenericValue payment = paymentApplication.getRelatedOne("Payment");
+ GenericValue payment = paymentApplication.getRelatedOne("Payment", false);
if (payment.getString("paymentPreferenceId") != null) {
// if the payment is reserved for a specific OrderPaymentPreference,
// we don't use it.
@@ -1912,7 +1912,7 @@ public class PaymentGatewayServices {
GenericValue paymentMethod = delegator.findOne("PaymentMethod", UtilMisc.toMap("paymentMethodId", paymentMethodId), false);
GenericValue creditCard = null;
if (paymentMethod != null && "CREDIT_CARD".equals(paymentMethod.getString("paymentMethodTypeId"))) {
- creditCard = paymentMethod.getRelatedOne("CreditCard");
+ creditCard = paymentMethod.getRelatedOne("CreditCard", false);
}
// create the PaymentGatewayResponse
@@ -2037,9 +2037,9 @@ public class PaymentGatewayServices {
boolean needsNsfRetry = false;
if (Boolean.TRUE.equals(processContext.get("resultNsf"))) {
// only track this for auto-orders, since we will only not fail and re-try on those
- GenericValue orderHeader = orderPaymentPreference.getRelatedOne("OrderHeader");
+ GenericValue orderHeader = orderPaymentPreference.getRelatedOne("OrderHeader", false);
if (UtilValidate.isNotEmpty(orderHeader.getString("autoOrderShoppingListId"))) {
- GenericValue productStore = orderHeader.getRelatedOne("ProductStore");
+ GenericValue productStore = orderHeader.getRelatedOne("ProductStore", false);
if ("Y".equals(productStore.getString("autoOrderCcTryLaterNsf"))) {
// one last condition: make sure there have been less than ProductStore.autoOrderCcTryLaterMax
// PaymentGatewayResponse records with the same orderPaymentPreferenceId and paymentMethodId (just in case it has changed)
@@ -2132,7 +2132,7 @@ public class PaymentGatewayServices {
// lookup the order header
OrderReadHelper orh = null;
try {
- GenericValue orderHeader = paymentPreference.getRelatedOne("OrderHeader");
+ GenericValue orderHeader = paymentPreference.getRelatedOne("OrderHeader", false);
if (orderHeader != null)
orh = new OrderReadHelper(orderHeader);
} catch (GenericEntityException e) {
@@ -2417,7 +2417,7 @@ public class PaymentGatewayServices {
GenericValue orderHeader = null;
try {
- orderHeader = paymentPref.getRelatedOne("OrderHeader");
+ orderHeader = paymentPref.getRelatedOne("OrderHeader", false);
} catch (GenericEntityException e) {
Debug.logError(e, "Cannot get OrderHeader from OrderPaymentPreference", module);
return ServiceUtil.returnError(UtilProperties.getMessage(resource,
@@ -2853,7 +2853,7 @@ public class PaymentGatewayServices {
GenericValue paymentMethod = null;
try {
- paymentMethod = orderPaymentPreference.getRelatedOne("PaymentMethod");
+ paymentMethod = orderPaymentPreference.getRelatedOne("PaymentMethod", false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
}
@@ -2861,7 +2861,7 @@ public class PaymentGatewayServices {
if (paymentMethod != null && paymentMethod.getString("paymentMethodTypeId").equals("CREDIT_CARD")) {
GenericValue creditCard = null;
try {
- creditCard = paymentMethod.getRelatedOne("CreditCard");
+ creditCard = paymentMethod.getRelatedOne("CreditCard", false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
}
@@ -3022,7 +3022,7 @@ public class PaymentGatewayServices {
// get the billToParty object
GenericValue billToParty;
try {
- billToParty = paymentMethod.getRelatedOne("Party");
+ billToParty = paymentMethod.getRelatedOne("Party", false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(e.getMessage());
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java Tue May 29 04:11:43 2012
@@ -69,13 +69,13 @@ public class PaymentWorker {
paymentMethodValueMaps.add(valueMap);
valueMap.put("paymentMethod", paymentMethod);
if ("CREDIT_CARD".equals(paymentMethod.getString("paymentMethodTypeId"))) {
- GenericValue creditCard = paymentMethod.getRelatedOne("CreditCard");
+ GenericValue creditCard = paymentMethod.getRelatedOne("CreditCard", false);
if (creditCard != null) valueMap.put("creditCard", creditCard);
} else if ("GIFT_CARD".equals(paymentMethod.getString("paymentMethodTypeId"))) {
- GenericValue giftCard = paymentMethod.getRelatedOne("GiftCard");
+ GenericValue giftCard = paymentMethod.getRelatedOne("GiftCard", false);
if (giftCard != null) valueMap.put("giftCard", giftCard);
} else if ("EFT_ACCOUNT".equals(paymentMethod.getString("paymentMethodTypeId"))) {
- GenericValue eftAccount = paymentMethod.getRelatedOne("EftAccount");
+ GenericValue eftAccount = paymentMethod.getRelatedOne("EftAccount", false);
if (eftAccount != null) valueMap.put("eftAccount", eftAccount);
}
}
@@ -239,9 +239,9 @@ public class PaymentWorker {
paymentApplication = delegator.findOne("PaymentApplication", UtilMisc.toMap("paymentApplicationId", paymentApplicationId), false);
appliedAmount = paymentApplication.getBigDecimal("amountApplied");
if (paymentApplication.get("paymentId") != null) {
- GenericValue payment = paymentApplication.getRelatedOne("Payment");
+ GenericValue payment = paymentApplication.getRelatedOne("Payment", false);
if (paymentApplication.get("invoiceId") != null && payment.get("actualCurrencyAmount") != null && payment.get("actualCurrencyUomId") != null) {
- GenericValue invoice = paymentApplication.getRelatedOne("Invoice");
+ GenericValue invoice = paymentApplication.getRelatedOne("Invoice", false);
if (payment.getString("actualCurrencyUomId").equals(invoice.getString("currencyUomId"))) {
appliedAmount = appliedAmount.multiply(payment.getBigDecimal("amount")).divide(payment.getBigDecimal("actualCurrencyAmount"),new MathContext(100));
}
@@ -283,7 +283,7 @@ public class PaymentWorker {
BigDecimal amountApplied = paymentApplication.getBigDecimal("amountApplied");
// check currency invoice and if different convert amount applied for display
if (actual.equals(Boolean.FALSE) && paymentApplication.get("invoiceId") != null && payment.get("actualCurrencyAmount") != null && payment.get("actualCurrencyUomId") != null) {
- GenericValue invoice = paymentApplication.getRelatedOne("Invoice");
+ GenericValue invoice = paymentApplication.getRelatedOne("Invoice", false);
if (payment.getString("actualCurrencyUomId").equals(invoice.getString("currencyUomId"))) {
amountApplied = amountApplied.multiply(payment.getBigDecimal("amount")).divide(payment.getBigDecimal("actualCurrencyAmount"),new MathContext(100));
}
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java Tue May 29 04:11:43 2012
@@ -107,7 +107,7 @@ public class AIMPaymentServices {
GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference");
GenericValue creditCard = null;
try {
- creditCard = delegator.getRelatedOne("CreditCard",orderPaymentPreference);
+ creditCard = delegator.getRelatedOne("CreditCard",orderPaymentPreference, false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(UtilProperties.getMessage(resource,
@@ -155,7 +155,7 @@ public class AIMPaymentServices {
GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference");
GenericValue creditCard = null;
try {
- creditCard = delegator.getRelatedOne("CreditCard", orderPaymentPreference);
+ creditCard = delegator.getRelatedOne("CreditCard", orderPaymentPreference, false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(UtilProperties.getMessage(resource,
@@ -499,13 +499,13 @@ public class AIMPaymentServices {
// sometimes the ccAuthCapture interface is used, in which case the creditCard is passed directly
GenericValue creditCard = (GenericValue) params.get("creditCard");
if (creditCard == null || ! (opp.get("paymentMethodId").equals(creditCard.get("paymentMethodId")))) {
- creditCard = opp.getRelatedOne("CreditCard");
+ creditCard = opp.getRelatedOne("CreditCard", false);
}
AIMRequest.put("x_First_Name", UtilFormatOut.checkNull(creditCard.getString("firstNameOnCard")));
AIMRequest.put("x_Last_Name", UtilFormatOut.checkNull(creditCard.getString("lastNameOnCard")));
AIMRequest.put("x_Company", UtilFormatOut.checkNull(creditCard.getString("companyNameOnCard")));
if (UtilValidate.isNotEmpty(creditCard.getString("contactMechId"))) {
- GenericValue address = creditCard.getRelatedOne("PostalAddress");
+ GenericValue address = creditCard.getRelatedOne("PostalAddress", false);
if (address != null) {
AIMRequest.put("x_Address", UtilFormatOut.checkNull(address.getString("address1")));
AIMRequest.put("x_City", UtilFormatOut.checkNull(address.getString("city")));
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java Tue May 29 04:11:43 2012
@@ -789,7 +789,7 @@ public class CCPaymentServices {
String countryGeoId = address.getString("countryGeoId");
if (UtilValidate.isNotEmpty(countryGeoId)) {
try {
- GenericValue countryGeo = address.getRelatedOneCache("CountryGeo");
+ GenericValue countryGeo = address.getRelatedOne("CountryGeo", true);
UtilXml.addChildElementValue(addressElement, "Country", countryGeo.getString("geoSecCode"), document);
} catch (GenericEntityException gee) {
Debug.logInfo(gee, "Error finding related Geo for countryGeoId: " + countryGeoId, module);
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java Tue May 29 04:11:43 2012
@@ -504,7 +504,7 @@ public class IcsPaymentServices {
GenericValue item = (GenericValue) orderItem;
GenericValue product = null;
try {
- product = item.getRelatedOne("Product");
+ product = item.getRelatedOne("Product", false);
} catch (GenericEntityException e) {
Debug.logError(e, "ERROR: Unable to get Product from OrderItem, not passing info to CyberSource");
}
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/eway/EwayServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/eway/EwayServices.java?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/eway/EwayServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/eway/EwayServices.java Tue May 29 04:11:43 2012
@@ -126,7 +126,7 @@ public class EwayServices {
// credit card used for transaction
GenericValue cc = null;
try {
- cc = delegator.getRelatedOne("CreditCard", paymentPref);
+ cc = delegator.getRelatedOne("CreditCard", paymentPref, false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(UtilProperties.getMessage(resource,
@@ -191,7 +191,7 @@ public class EwayServices {
// credit card used for transaction
GenericValue cc = null;
try {
- cc = delegator.getRelatedOne("CreditCard", paymentPref);
+ cc = delegator.getRelatedOne("CreditCard", paymentPref, false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(UtilProperties.getMessage(resource,
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java Tue May 29 04:11:43 2012
@@ -350,7 +350,7 @@ public class RitaServices {
Locale locale = (Locale) context.get("locale");
GenericValue orderHeader = null;
try {
- orderHeader = orderPaymentPreference.getRelatedOne("OrderHeader");
+ orderHeader = orderPaymentPreference.getRelatedOne("OrderHeader", false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(UtilProperties.getMessage(resourceOrder,
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java Tue May 29 04:11:43 2012
@@ -127,7 +127,7 @@ public class OrbitalPaymentServices {
GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference");
GenericValue creditCard = null;
try {
- creditCard = orderPaymentPreference.getRelatedOne("CreditCard");
+ creditCard = orderPaymentPreference.getRelatedOne("CreditCard", false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(UtilProperties.getMessage(resource,
@@ -173,7 +173,7 @@ public class OrbitalPaymentServices {
GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference");
GenericValue creditCard = null;
try {
- creditCard = orderPaymentPreference.getRelatedOne("CreditCard");
+ creditCard = orderPaymentPreference.getRelatedOne("CreditCard", false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(UtilProperties.getMessage(resource,
@@ -218,7 +218,7 @@ public class OrbitalPaymentServices {
GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference");
try {
- orderPaymentPreference.getRelatedOne("CreditCard");
+ orderPaymentPreference.getRelatedOne("CreditCard", false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(UtilProperties.getMessage(resource,
@@ -339,13 +339,13 @@ public class OrbitalPaymentServices {
// sometimes the ccAuthCapture interface is used, in which case the creditCard is passed directly
creditCard = (GenericValue) params.get("creditCard");
if (creditCard == null || ! (opp.get("paymentMethodId").equals(creditCard.get("paymentMethodId")))) {
- creditCard = opp.getRelatedOne("CreditCard");
+ creditCard = opp.getRelatedOne("CreditCard", false);
}
}
request.setFieldValue("AVSname", "Demo Customer");
if (UtilValidate.isNotEmpty(creditCard.getString("contactMechId"))) {
- GenericValue address = creditCard.getRelatedOne("PostalAddress");
+ GenericValue address = creditCard.getRelatedOne("PostalAddress", false);
if (address != null) {
request.setFieldValue("AVSaddress1", UtilFormatOut.checkNull(address.getString("address1")));
request.setFieldValue("AVScity", UtilFormatOut.checkNull(address.getString("city")));
@@ -403,7 +403,7 @@ public class OrbitalPaymentServices {
request.setFieldValue("PCDestName", UtilFormatOut.checkNull(creditCard.getString("firstNameOnCard") + creditCard.getString("lastNameOnCard")));
if (UtilValidate.isNotEmpty(creditCard.getString("contactMechId"))) {
- GenericValue address = creditCard.getRelatedOne("PostalAddress");
+ GenericValue address = creditCard.getRelatedOne("PostalAddress", false);
if (address != null) {
request.setFieldValue("PCOrderNum", UtilFormatOut.checkNull(orderId));
request.setFieldValue("PCDestAddress1", UtilFormatOut.checkNull(address.getString("address1")));
@@ -634,7 +634,7 @@ public class OrbitalPaymentServices {
GenericValue trackingCodeOrder = EntityUtil.getFirst(orderHeader.getRelated("TrackingCodeOrder"));
GenericValue trackingCode = null;
if (UtilValidate.isNotEmpty(trackingCodeOrder)) {
- trackingCode = trackingCodeOrder.getRelatedOne("TrackingCode");
+ trackingCode = trackingCodeOrder.getRelatedOne("TrackingCode", false);
}
if (UtilValidate.isNotEmpty(trackingCode) && UtilValidate.isNotEmpty(trackingCode.getString("description"))) {
// get tracking code description and provide it into shipping reference.
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java Tue May 29 04:11:43 2012
@@ -678,8 +678,8 @@ public class PayPalServices {
GenericValue payPalPaymentSetting = getPaymentMethodGatewayPayPal(dctx, context, null);
GenericValue payPalPaymentMethod = null;
try {
- payPalPaymentMethod = paymentPref.getRelatedOne("PaymentMethod");
- payPalPaymentMethod = payPalPaymentMethod.getRelatedOne("PayPalPaymentMethod");
+ payPalPaymentMethod = paymentPref.getRelatedOne("PaymentMethod", false);
+ payPalPaymentMethod = payPalPaymentMethod.getRelatedOne("PayPalPaymentMethod", false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(e.getMessage());
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java Tue May 29 04:11:43 2012
@@ -74,7 +74,7 @@ public class SagePayPaymentServices {
GenericValue creditCard = (GenericValue) context.get("creditCard");
if (creditCard == null || !(opp.get("paymentMethodId").equals(creditCard.get("paymentMethodId")))) {
- creditCard = opp.getRelatedOne("CreditCard");
+ creditCard = opp.getRelatedOne("CreditCard", false);
}
securityCode = opp.getString("securityCode");
@@ -303,7 +303,7 @@ public class SagePayPaymentServices {
Debug.logInfo("SagePay ccRefund captureTransaction : " + captureTransaction, module);
GenericValue creditCard = null;
try {
- creditCard = delegator.getRelatedOne("CreditCard", orderPaymentPreference);
+ creditCard = delegator.getRelatedOne("CreditCard", orderPaymentPreference, false);
} catch (GenericEntityException e) {
Debug.logError(e, "Error getting CreditCard for OrderPaymentPreference : " + orderPaymentPreference, module);
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "AccountingPaymentUnableToGetCCInfo", locale) + " " + orderPaymentPreference);
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java Tue May 29 04:11:43 2012
@@ -909,7 +909,7 @@ public class ValueLinkServices {
// get the GiftCard VO
GenericValue giftCard = null;
try {
- giftCard = paymentPref.getRelatedOne("GiftCard");
+ giftCard = paymentPref.getRelatedOne("GiftCard", false);
} catch (GenericEntityException e) {
Debug.logError("Unable to get GiftCard from OrderPaymentPreference", module);
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
@@ -974,7 +974,7 @@ public class ValueLinkServices {
// get the GiftCard VO
GenericValue giftCard = null;
try {
- giftCard = paymentPref.getRelatedOne("GiftCard");
+ giftCard = paymentPref.getRelatedOne("GiftCard", false);
} catch (GenericEntityException e) {
Debug.logError("Unable to get GiftCard from OrderPaymentPreference", module);
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
@@ -1039,7 +1039,7 @@ public class ValueLinkServices {
// the order header for store info
GenericValue orderHeader = null;
try {
- orderHeader = orderItem.getRelatedOne("OrderHeader");
+ orderHeader = orderItem.getRelatedOne("OrderHeader", false);
} catch (GenericEntityException e) {
Debug.logError(e, "Unable to get OrderHeader from OrderItem",module);
return ServiceUtil.returnError(UtilProperties.getMessage(resourceOrder,
@@ -1093,7 +1093,7 @@ public class ValueLinkServices {
// the product entity needed for information
GenericValue product = null;
try {
- product = orderItem.getRelatedOne("Product");
+ product = orderItem.getRelatedOne("Product", false);
} catch (GenericEntityException e) {
Debug.logError("Unable to get Product from OrderItem", module);
}
@@ -1162,7 +1162,7 @@ public class ValueLinkServices {
for(GenericValue answer : responseAnswers) {
GenericValue question = null;
try {
- question = answer.getRelatedOne("SurveyQuestion");
+ question = answer.getRelatedOne("SurveyQuestion", false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
@@ -1333,7 +1333,7 @@ public class ValueLinkServices {
// the order header for store info
GenericValue orderHeader = null;
try {
- orderHeader = orderItem.getRelatedOne("OrderHeader");
+ orderHeader = orderItem.getRelatedOne("OrderHeader", false);
} catch (GenericEntityException e) {
Debug.logError(e, "Unable to get OrderHeader from OrderItem",module);
return ServiceUtil.returnError(UtilProperties.getMessage(resourceOrder,
@@ -1417,7 +1417,7 @@ public class ValueLinkServices {
for(GenericValue answer : responseAnswers) {
GenericValue question = null;
try {
- question = answer.getRelatedOne("SurveyQuestion");
+ question = answer.getRelatedOne("SurveyQuestion", false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java Tue May 29 04:11:43 2012
@@ -524,11 +524,11 @@ public class PayflowPro {
parameterMap.put("SHIPTOSTREET2", StringUtils.left(shippingAddress.getString("address2"), 30));
parameterMap.put("SHIPTOCITY", StringUtils.left(shippingAddress.getString("city"), 40));
if (shippingAddress.getString("stateProvinceGeoId") != null && !"_NA_".equals(shippingAddress.getString("stateProvinceGeoId"))) {
- GenericValue stateProvinceGeo = shippingAddress.getRelatedOne("StateProvinceGeo");
+ GenericValue stateProvinceGeo = shippingAddress.getRelatedOne("StateProvinceGeo", false);
parameterMap.put("SHIPTOSTATE", StringUtils.left(stateProvinceGeo.getString("geoCode"), 40));
}
parameterMap.put("SHIPTOZIP", StringUtils.left(shippingAddress.getString("postalCode"), 16));
- GenericValue countryGeo = shippingAddress.getRelatedOne("CountryGeo");
+ GenericValue countryGeo = shippingAddress.getRelatedOne("CountryGeo", false);
parameterMap.put("SHIPTOCOUNTRY", StringUtils.left(countryGeo.getString("geoCode"), 2));
}
}
@@ -613,8 +613,8 @@ public class PayflowPro {
String configString = "payment.properties";
GenericValue payPalPaymentMethod = null;
try {
- payPalPaymentMethod = paymentPref.getRelatedOne("PaymentMethod");
- payPalPaymentMethod = payPalPaymentMethod.getRelatedOne("PayPalPaymentMethod");
+ payPalPaymentMethod = paymentPref.getRelatedOne("PaymentMethod", false);
+ payPalPaymentMethod = payPalPaymentMethod.getRelatedOne("PayPalPaymentMethod", false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(e.getMessage());
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java Tue May 29 04:11:43 2012
@@ -126,7 +126,7 @@ public class WorldPayEvents {
String country = "";
if (contactAddress != null) {
try {
- countryGeo = contactAddress.getRelatedOne("CountryGeo");
+ countryGeo = contactAddress.getRelatedOne("CountryGeo", false);
if (countryGeo != null) {
country = countryGeo.getString("geoCode");
}
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java Tue May 29 04:11:43 2012
@@ -107,7 +107,7 @@ public class UtilAccounting {
}
}
public static BigDecimal getNetBalance(GenericValue account) throws GenericEntityException {
- GenericValue glAccount = account.getRelatedOne("GlAccount");
+ GenericValue glAccount = account.getRelatedOne("GlAccount", false);
BigDecimal balance = BigDecimal.ZERO;
if (isDebitAccount(glAccount)) {
balance = account.getBigDecimal("postedDebits").subtract(account.getBigDecimal("postedCredits"));
@@ -145,7 +145,7 @@ public class UtilAccounting {
}
// otherwise, we have to go to the grandparent (recurse)
- return isPaymentTypeRecurse(paymentType.getRelatedOne("ParentPaymentType"), inputTypeId);
+ return isPaymentTypeRecurse(paymentType.getRelatedOne("ParentPaymentType", false), inputTypeId);
}
@@ -158,7 +158,7 @@ public class UtilAccounting {
return false;
}
- GenericValue paymentType = payment.getRelatedOneCache("PaymentType");
+ GenericValue paymentType = payment.getRelatedOne("PaymentType", true);
if (paymentType == null) {
throw new GenericEntityException("Cannot find PaymentType for paymentId " + payment.getString("paymentId"));
}
@@ -207,7 +207,7 @@ public class UtilAccounting {
}
// otherwise, we have to go to the grandparent (recurse)
- return isAccountClassClass(glAccountClass.getRelatedOneCache("ParentGlAccountClass"), parentGlAccountClassId);
+ return isAccountClassClass(glAccountClass.getRelatedOne("ParentGlAccountClass", true), parentGlAccountClassId);
}
/**
@@ -219,7 +219,7 @@ public class UtilAccounting {
return false;
}
- GenericValue glAccountClass = glAccount.getRelatedOneCache("GlAccountClass");
+ GenericValue glAccountClass = glAccount.getRelatedOne("GlAccountClass", true);
if (glAccountClass == null) {
throw new GenericEntityException("Cannot find GlAccountClass for glAccountId " + glAccount.getString("glAccountId"));
}
@@ -276,7 +276,7 @@ public class UtilAccounting {
}
// otherwise, we have to go to the grandparent (recurse)
- return isInvoiceTypeRecurse(invoiceType.getRelatedOne("ParentInvoiceType"), inputTypeId);
+ return isInvoiceTypeRecurse(invoiceType.getRelatedOne("ParentInvoiceType", false), inputTypeId);
}
/**
@@ -288,7 +288,7 @@ public class UtilAccounting {
return false;
}
- GenericValue invoiceType = invoice.getRelatedOneCache("InvoiceType");
+ GenericValue invoiceType = invoice.getRelatedOne("InvoiceType", true);
if (invoiceType == null) {
throw new GenericEntityException("Cannot find InvoiceType for invoiceId " + invoice.getString("invoiceId"));
}
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/ListInvoiceItemTypesGlAccount.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/ListInvoiceItemTypesGlAccount.groovy?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/ListInvoiceItemTypesGlAccount.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/ListInvoiceItemTypesGlAccount.groovy Tue May 29 04:11:43 2012
@@ -48,7 +48,7 @@ invoiceItemTypes.each { invoiceItemType
glAccount = glAccounts[0];
}
} else {
- glAccount = invoiceItemType.getRelatedOne("DefaultGlAccount");
+ glAccount = invoiceItemType.getRelatedOne("DefaultGlAccount", false);
}
if (glAccount) {
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy Tue May 29 04:11:43 2012
@@ -75,7 +75,7 @@ if (invoice) {
invoiceItemsConv.add(invoiceItem);
// get party tax id for VAT taxes: they are required in invoices by EU
// also create a map with tax grand total amount by VAT tax: it is also required in invoices by UE
- taxRate = invoiceItem.getRelatedOne("TaxAuthorityRateProduct");
+ taxRate = invoiceItem.getRelatedOne("TaxAuthorityRateProduct", false);
if (taxRate && "VAT_TAX".equals(taxRate.taxAuthorityRateTypeId)) {
taxInfos = EntityUtil.filterByDate(delegator.findByAnd("PartyTaxAuthInfo", [partyId : billingParty.partyId, taxAuthGeoId : taxRate.taxAuthGeoId, taxAuthPartyId : taxRate.taxAuthPartyId], null, false), invoice.invoiceDate);
taxInfo = EntityUtil.getFirst(taxInfos);
@@ -140,7 +140,7 @@ if (invoice) {
}
context.orders = orders;
- invoiceStatus = invoice.getRelatedOne("StatusItem");
+ invoiceStatus = invoice.getRelatedOne("StatusItem", false);
context.invoiceStatus = invoiceStatus;
edit = parameters.editInvoice;
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/PrintInvoices.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/PrintInvoices.groovy?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/PrintInvoices.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/PrintInvoices.groovy Tue May 29 04:11:43 2012
@@ -108,7 +108,7 @@ invoiceIds.each { invoiceId ->
}
invoicesMap.orders = orders;
- invoiceStatus = invoice.getRelatedOne("StatusItem");
+ invoiceStatus = invoice.getRelatedOne("StatusItem", false);
invoicesMap.invoiceStatus = invoiceStatus;
edit = parameters.editInvoice;
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ManualTx.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ManualTx.groovy?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ManualTx.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ManualTx.groovy Tue May 29 04:11:43 2012
@@ -57,24 +57,24 @@ if (paymentMethodId) {
paymentMethodTypeId = paymentMethod.paymentMethodTypeId;
// party information
- party = paymentMethod.getRelatedOne("Party");
+ party = paymentMethod.getRelatedOne("Party", false);
if (party && "PERSON".equals(party.partyTypeId)) {
- person = party.getRelatedOne("Person");
+ person = party.getRelatedOne("Person", false);
context.person = person;
} else if (party && "PARTY_GROUP".equals(party.partyTypeId)) {
- partyGroup = party.getRelatedOne("PartyGroup");
+ partyGroup = party.getRelatedOne("PartyGroup", false);
context.partyGroup = partyGroup;
}
// method info + address
- creditCard = paymentMethod.getRelatedOne("CreditCard");
+ creditCard = paymentMethod.getRelatedOne("CreditCard", false);
context.put("creditCard", creditCard);
if (creditCard) {
- postalAddress = creditCard.getRelatedOne("PostalAddress");
+ postalAddress = creditCard.getRelatedOne("PostalAddress", false);
context.postalFields = postalAddress;
}
- giftCard = paymentMethod.getRelatedOne("GiftCard");
+ giftCard = paymentMethod.getRelatedOne("GiftCard", false);
context.giftCard = giftCard;
// todo add support for eft account
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/PrintChecks.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/PrintChecks.groovy?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/PrintChecks.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/PrintChecks.groovy Tue May 29 04:11:43 2012
@@ -62,6 +62,6 @@ selected.each { row ->
paymentGroupMembers = EntityUtil.filterByDate(delegator.findList("PaymentGroupMember", EntityCondition.makeCondition("paymentGroupId", EntityOperator.EQUALS, parameters.paymentGroupId), null, null, null, false));
//in the case of a multiple payments, paymentId List is supplied.
paymentGroupMembers.each { paymentGropupMember->
- payments.add(paymentGropupMember.getRelatedOne("Payment"));
+ payments.add(paymentGropupMember.getRelatedOne("Payment", false));
}
context.payments = payments;
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/period/EditCustomTimePeriod.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/period/EditCustomTimePeriod.groovy?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/period/EditCustomTimePeriod.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/period/EditCustomTimePeriod.groovy Tue May 29 04:11:43 2012
@@ -38,7 +38,7 @@ if (currentCustomTimePeriod) {
context.currentCustomTimePeriod = currentCustomTimePeriod;
}
-currentPeriodType = currentCustomTimePeriod ? currentCustomTimePeriod.getRelatedOneCache("PeriodType") : null;
+currentPeriodType = currentCustomTimePeriod ? currentCustomTimePeriod.getRelatedOne("PeriodType", true) : null;
if (currentPeriodType) {
context.currentPeriodType = currentPeriodType;
}
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy Tue May 29 04:11:43 2012
@@ -414,7 +414,7 @@ Map netIncomeResult = dispatcher.runSync
BigDecimal netIncome = (BigDecimal)netIncomeResult.totalNetIncome;
GenericValue retainedEarningsAccount = delegator.findOne("GlAccountTypeDefault", UtilMisc.toMap("glAccountTypeId", "RETAINED_EARNINGS", "organizationPartyId", organizationPartyId), true);
if (retainedEarningsAccount) {
- GenericValue retainedEarningsGlAccount = retainedEarningsAccount.getRelatedOne("GlAccount");
+ GenericValue retainedEarningsGlAccount = retainedEarningsAccount.getRelatedOne("GlAccount", false);
transactionTotalsMap.put(retainedEarningsGlAccount.glAccountId, UtilMisc.toMap("glAccountId", retainedEarningsGlAccount.glAccountId,"accountName", retainedEarningsGlAccount.accountName, "accountCode", retainedEarningsGlAccount.accountCode, "balance", netIncome));
}
accountBalanceList = UtilMisc.sortMaps(transactionTotalsMap.values().asList(), UtilMisc.toList("accountCode"));
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/SalesInvoiceByProductCategorySummary.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/SalesInvoiceByProductCategorySummary.groovy?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/SalesInvoiceByProductCategorySummary.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/SalesInvoiceByProductCategorySummary.groovy Tue May 29 04:11:43 2012
@@ -44,13 +44,13 @@ productCategoryList = FastList.newInstan
productMemberList.each { productMember ->
if (!productIdSet.contains(productMember.productId)) {
- productList.add(productMember.getRelatedOneCache("Product"));
+ productList.add(productMember.getRelatedOne("Product", true));
}
productIdSet.add(productMember.productId);
}
categoryRollupList.each { categoryRollup ->
if (!productCategoryIdSet.contains(categoryRollup.productCategoryId)) {
- productCategoryList.add(categoryRollup.getRelatedOneCache("CurrentProductCategory"));
+ productCategoryList.add(categoryRollup.getRelatedOne("CurrentProductCategory", true));
}
productCategoryIdSet.add(categoryRollup.productCategoryId);
}
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/AuthorizeTransaction.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/AuthorizeTransaction.groovy?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/AuthorizeTransaction.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/AuthorizeTransaction.groovy Tue May 29 04:11:43 2012
@@ -42,7 +42,7 @@ if (orderPaymentPreferenceId) {
}
if (orderPaymentPreference) {
- paymentMethodType = orderPaymentPreference.getRelatedOneCache("PaymentMethodType");
+ paymentMethodType = orderPaymentPreference.getRelatedOne("PaymentMethodType", true);
context.paymentMethodType = paymentMethodType;
context.overrideAmount = orderPaymentPreference.getBigDecimal("maxAmount");
}
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/CaptureTransaction.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/CaptureTransaction.groovy?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/CaptureTransaction.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/CaptureTransaction.groovy Tue May 29 04:11:43 2012
@@ -39,7 +39,7 @@ if (orderPaymentPreferenceId) {
}
if (orderPaymentPreference) {
- paymentMethodType = orderPaymentPreference.getRelatedOneCache("PaymentMethodType");
+ paymentMethodType = orderPaymentPreference.getRelatedOne("PaymentMethodType", true);
context.paymentMethodType = paymentMethodType;
}
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/ViewGatewayResponse.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/ViewGatewayResponse.groovy?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/ViewGatewayResponse.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/ViewGatewayResponse.groovy Tue May 29 04:11:43 2012
@@ -37,7 +37,7 @@ orderPaymentPreferenceId = context.order
// first purpose: retrieve orderId and paymentPreferenceId
if (!orderPaymentPreferenceId) {
paymentGatewayResponse = context.paymentGatewayResponse;
- orderPaymentPreference = paymentGatewayResponse.getRelatedOne("OrderPaymentPreference");
+ orderPaymentPreference = paymentGatewayResponse.getRelatedOne("OrderPaymentPreference", false);
context.orderId = orderPaymentPreference.orderId;
context.orderPaymentPreferenceId = orderPaymentPreference.orderPaymentPreferenceId;
} else {
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl Tue May 29 04:11:43 2012
@@ -198,9 +198,9 @@ function getFinAccountTransRunningTotalA
</#if>
<#if payment?has_content>
<#assign paymentGroupMembers = Static["org.ofbiz.entity.util.EntityUtil"].filterByDate(payment.getRelated("PaymentGroupMember")?if_exists) />
- <#assign fromParty = payment.getRelatedOne("FromParty")?if_exists />
+ <#assign fromParty = payment.getRelatedOne("FromParty", false)?if_exists />
<#assign fromPartyName = delegator.findOne("PartyNameView", {"partyId" : fromParty.partyId}, true) />
- <#assign toParty = payment.getRelatedOne("ToParty")?if_exists />
+ <#assign toParty = payment.getRelatedOne("ToParty", false)?if_exists />
<#assign toPartyName = delegator.findOne("PartyNameView", {"partyId" : toParty.partyId}, true) />
<#if paymentGroupMembers?has_content>
<#assign paymentGroupMember = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(paymentGroupMembers) />
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl?rev=1343479&r1=1343478&r2=1343479&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl Tue May 29 04:11:43 2012
@@ -43,7 +43,7 @@ under the License.
<#if currentGlReconciliation.statusId?exists>
<tr>
<td><span class="label">${uiLabelMap.CommonStatus}</span></td>
- <#assign currentStatus = currentGlReconciliation.getRelatedOneCache("StatusItem")>
+ <#assign currentStatus = currentGlReconciliation.getRelatedOne("StatusItem", true)>
<td>${currentStatus.description?if_exists}</td>
</tr>
</#if>
@@ -88,7 +88,7 @@ under the License.
<#if previousGlReconciliation.statusId?exists>
<tr>
<td><span class="label">${uiLabelMap.CommonStatus}</span></td>
- <#assign previousStatus = previousGlReconciliation.getRelatedOneCache("StatusItem")>
+ <#assign previousStatus = previousGlReconciliation.getRelatedOne("StatusItem", true)>
<td>${previousStatus.description?if_exists}</td>
</tr>
</#if>