|
Modified: ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java Tue Jun 19 21:36:11 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/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java Tue Jun 19 21:36:11 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/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/eway/EwayServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/eway/EwayServices.java?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/eway/EwayServices.java (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/eway/EwayServices.java Tue Jun 19 21:36:11 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/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java Tue Jun 19 21:36:11 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/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java Tue Jun 19 21:36:11 2012 @@ -127,7 +127,7 @@ public class OrbitalPaymentServices { GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference"); GenericValue creditCard = null; try { - creditCard = delegator.getRelatedOne("CreditCard",orderPaymentPreference); + 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 = delegator.getRelatedOne("CreditCard",orderPaymentPreference); + 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 { - delegator.getRelatedOne("CreditCard",orderPaymentPreference); + 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"))); @@ -631,10 +631,10 @@ public class OrbitalPaymentServices { String shippingRef = ""; try { GenericValue orderHeader = delegator.findOne("OrderHeader", false, UtilMisc.toMap("orderId", orderId)); - GenericValue trackingCodeOrder = EntityUtil.getFirst(orderHeader.getRelated("TrackingCodeOrder")); + GenericValue trackingCodeOrder = EntityUtil.getFirst(orderHeader.getRelated("TrackingCodeOrder", null, null, false)); 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/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java Tue Jun 19 21:36:11 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/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java Tue Jun 19 21:36:11 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/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java Tue Jun 19 21:36:11 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); } @@ -1149,7 +1149,7 @@ public class ValueLinkServices { // get the response answers List<GenericValue> responseAnswers = null; try { - responseAnswers = surveyResponse.getRelated("SurveyResponseAnswer"); + responseAnswers = surveyResponse.getRelated("SurveyResponseAnswer", null, null, false); } catch (GenericEntityException e) { Debug.logError(e, module); return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, @@ -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, @@ -1404,7 +1404,7 @@ public class ValueLinkServices { // get the response answers List<GenericValue> responseAnswers = null; try { - responseAnswers = surveyResponse.getRelated("SurveyResponseAnswer"); + responseAnswers = surveyResponse.getRelated("SurveyResponseAnswer", null, null, false); } catch (GenericEntityException e) { Debug.logError(e, module); return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, @@ -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/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java Tue Jun 19 21:36:11 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/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java Tue Jun 19 21:36:11 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/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java Tue Jun 19 21:36:11 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")); @@ -124,7 +124,7 @@ public class UtilAccounting { } private static void getGlAccountClassChildren(GenericValue glAccountClass, List<String> glAccountClassIds) throws GenericEntityException { glAccountClassIds.add(glAccountClass.getString("glAccountClassId")); - List<GenericValue> glAccountClassChildren = glAccountClass.getRelatedCache("ChildGlAccountClass"); + List<GenericValue> glAccountClassChildren = glAccountClass.getRelated("ChildGlAccountClass", null, null, true); for(GenericValue glAccountClassChild : glAccountClassChildren) { getGlAccountClassChildren(glAccountClassChild, glAccountClassIds); } @@ -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/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/admin/ListInvoiceItemTypesGlAccount.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/admin/ListInvoiceItemTypesGlAccount.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/admin/ListInvoiceItemTypesGlAccount.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/admin/ListInvoiceItemTypesGlAccount.groovy Tue Jun 19 21:36:11 2012 @@ -37,18 +37,18 @@ invoiceItemTypes.each { invoiceItemType remove = " "; glAccounts = null; glAccount = null; - invoiceItemTypeOrgs = invoiceItemType.getRelatedByAnd("InvoiceItemTypeGlAccount", [organizationPartyId : organizationPartyId]); + invoiceItemTypeOrgs = invoiceItemType.getRelated("InvoiceItemTypeGlAccount", [organizationPartyId : organizationPartyId], null, false); overrideGlAccountId = " "; if (invoiceItemTypeOrgs) { invoiceItemTypeOrg = invoiceItemTypeOrgs[0]; overrideGlAccountId = invoiceItemTypeOrg.glAccountId; - glAccounts = invoiceItemTypeOrg.getRelated("GlAccount"); + glAccounts = invoiceItemTypeOrg.getRelated("GlAccount", null, null, false); if (glAccounts) { glAccount = glAccounts[0]; } } else { - glAccount = invoiceItemType.getRelatedOne("DefaultGlAccount"); + glAccount = invoiceItemType.getRelatedOne("DefaultGlAccount", false); } if (glAccount) { Modified: ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/CreateApplicationList.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/CreateApplicationList.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/CreateApplicationList.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/CreateApplicationList.groovy Tue Jun 19 21:36:11 2012 @@ -33,7 +33,7 @@ if (!invoice) return; invoiceApplications = []; // to pass back to the screen with payment applications added // retrieve related applications with null itemnumber -invoiceAppls = invoice.getRelated("PaymentApplication", [invoiceItemSeqId : null], null); +invoiceAppls = invoice.getRelated("PaymentApplication", [invoiceItemSeqId : null], null, false); invoiceAppls.each { invoiceAppl -> itemmap = [:]; itemmap.invoiceId = invoiceAppl.invoiceId; @@ -50,7 +50,7 @@ invoiceAppls.each { invoiceAppl -> // retrieve related applications with an existing itemnumber -invoice.getRelated("InvoiceItem").each { item -> +invoice.getRelated("InvoiceItem", null, null, false).each { item -> BigDecimal itemTotal = null; if (item.amount != null) { if (!item.quantity) { @@ -60,7 +60,7 @@ invoice.getRelated("InvoiceItem").each { } } // get relation payment applications for every item(can be more than 1 per item number) - item.getRelated("PaymentApplication").each { paymentApplication -> + item.getRelated("PaymentApplication", null, null, false).each { paymentApplication -> itemmap = [:]; itemmap.putAll(item); itemmap.total = NumberFormat.getInstance(locale).format(itemTotal); Modified: ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy Tue Jun 19 21:36:11 2012 @@ -67,7 +67,7 @@ if (invoice) { invoice.invoiceMessage = " converted from original with a rate of: " + conversionRate.setScale(8, rounding); } - invoiceItems = invoice.getRelatedOrderBy("InvoiceItem", ["invoiceItemSeqId"]); + invoiceItems = invoice.getRelated("InvoiceItem", null, ["invoiceItemSeqId"], false); invoiceItemsConv = FastList.newInstance(); vatTaxesByType = FastMap.newInstance(); invoiceItems.each { invoiceItem -> @@ -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); @@ -101,8 +101,8 @@ if (invoice) { //*________________this snippet was added for adding Tax ID in invoice header if needed _________________ - sendingTaxInfos = sendingParty.getRelated("PartyTaxAuthInfo"); - billingTaxInfos = billingParty.getRelated("PartyTaxAuthInfo"); + sendingTaxInfos = sendingParty.getRelated("PartyTaxAuthInfo", null, null, false); + billingTaxInfos = billingParty.getRelated("PartyTaxAuthInfo", null, null, false); sendingPartyTaxId = null; billingPartyTaxId = null; @@ -127,7 +127,7 @@ if (invoice) { //________________this snippet was added for adding Tax ID in invoice header if needed _________________*/ - terms = invoice.getRelated("InvoiceTerm"); + terms = invoice.getRelated("InvoiceTerm", null, null, false); context.terms = terms; paymentAppls = delegator.findByAnd("PaymentApplication", [invoiceId : invoiceId], null, false); @@ -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/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/GetInvoiceItemTypes.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/GetInvoiceItemTypes.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/GetInvoiceItemTypes.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/GetInvoiceItemTypes.groovy Tue Jun 19 21:36:11 2012 @@ -75,7 +75,7 @@ if ("SALES_INVOICE".equals(invoice.invoi glAccountOrganizationAndClassList = delegator.findByAnd("GlAccountOrganizationAndClass", [organizationPartyId : invoice.partyId], null, false); } else { map = delegator.findByAnd("InvoiceItemTypeMap", [invoiceTypeId : invoice.invoiceTypeId], null, true); - invoiceItemTypes = EntityUtil.getRelated("InvoiceItemType", map); + invoiceItemTypes = EntityUtil.getRelated("InvoiceItemType", map, null, false); } context.invoiceItemTypes = invoiceItemTypes; Modified: ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/PrintInvoices.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/PrintInvoices.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/PrintInvoices.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/PrintInvoices.groovy Tue Jun 19 21:36:11 2012 @@ -41,7 +41,7 @@ invoiceIds.each { invoiceId -> invoice.invoiceMessage = " converted from original with a rate of: " + conversionRate.setScale(8, rounding); } - invoiceItems = invoice.getRelatedOrderBy("InvoiceItem", ["invoiceItemSeqId"]); + invoiceItems = invoice.getRelated("InvoiceItem", null, ["invoiceItemSeqId"], false); invoiceItemsConv = []; invoiceItems.each { invoiceItem -> if (invoiceItem.amount) { @@ -71,8 +71,8 @@ invoiceIds.each { invoiceId -> invoicesMap.sendingParty = sendingParty; // This snippet was added for adding Tax ID in invoice header if needed - sendingTaxInfos = sendingParty.getRelated("PartyTaxAuthInfo"); - billingTaxInfos = billingParty.getRelated("PartyTaxAuthInfo"); + sendingTaxInfos = sendingParty.getRelated("PartyTaxAuthInfo", null, null, false); + billingTaxInfos = billingParty.getRelated("PartyTaxAuthInfo", null, null, false); sendingPartyTaxId = null; billingPartyTaxId = null; @@ -95,7 +95,7 @@ invoiceIds.each { invoiceId -> invoicesMap.billingPartyTaxId = billingPartyTaxId; } - terms = invoice.getRelated("InvoiceTerm"); + terms = invoice.getRelated("InvoiceTerm", null, null, false); invoicesMap.terms = terms; paymentAppls = delegator.findList("PaymentApplication", EntityCondition.makeCondition([invoiceId : invoiceId]), null, null, null, false); @@ -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/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ManualTx.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ManualTx.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ManualTx.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ManualTx.groovy Tue Jun 19 21:36:11 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/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/payment/PrintChecks.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/payment/PrintChecks.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/payment/PrintChecks.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/payment/PrintChecks.groovy Tue Jun 19 21:36:11 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/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/period/EditCustomTimePeriod.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/period/EditCustomTimePeriod.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/period/EditCustomTimePeriod.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/period/EditCustomTimePeriod.groovy Tue Jun 19 21:36:11 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/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy Tue Jun 19 21:36:11 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/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/reports/SalesInvoiceByProductCategorySummary.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/reports/SalesInvoiceByProductCategorySummary.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/reports/SalesInvoiceByProductCategorySummary.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/reports/SalesInvoiceByProductCategorySummary.groovy Tue Jun 19 21:36:11 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/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/AuthorizeTransaction.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/AuthorizeTransaction.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/AuthorizeTransaction.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/AuthorizeTransaction.groovy Tue Jun 19 21:36:11 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/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/CaptureTransaction.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/CaptureTransaction.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/CaptureTransaction.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/CaptureTransaction.groovy Tue Jun 19 21:36:11 2012 @@ -39,7 +39,7 @@ if (orderPaymentPreferenceId) { } if (orderPaymentPreference) { - paymentMethodType = orderPaymentPreference.getRelatedOneCache("PaymentMethodType"); + paymentMethodType = orderPaymentPreference.getRelatedOne("PaymentMethodType", true); context.paymentMethodType = paymentMethodType; } @@ -49,7 +49,7 @@ if (orderPaymentPreference) { if (orderPaymentPreference) { // we retrieve the captureAmount by looking at the latest authorized gateway response for this orderPaymentPreference - gatewayResponses = orderPaymentPreference.getRelated("PaymentGatewayResponse", ["transactionDate DESC"]); + gatewayResponses = orderPaymentPreference.getRelated("PaymentGatewayResponse", null, ["transactionDate DESC"], false); EntityUtil.filterByCondition(gatewayResponses, EntityCondition.makeCondition("transCodeEnumId", EntityOperator.EQUALS, "PGT_AUTHORIZE")); if (gatewayResponses) { Modified: ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/ViewGatewayResponse.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/ViewGatewayResponse.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/ViewGatewayResponse.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/ViewGatewayResponse.groovy Tue Jun 19 21:36:11 2012 @@ -37,13 +37,13 @@ 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 { // second purpose: grab the latest gateway response of the orderpaymentpreferenceId orderPaymentPreference = delegator.findOne("OrderPaymentPreference", [orderPaymentPreferenceId : orderPaymentPreferenceId], false); - gatewayResponses = orderPaymentPreference.getRelated("PaymentGatewayResponse", ["transactionDate DESC"]); + gatewayResponses = orderPaymentPreference.getRelated("PaymentGatewayResponse", null, ["transactionDate DESC"], false); EntityUtil.filterByCondition(gatewayResponses, EntityCondition.makeCondition("transCodeEnumId", EntityOperator.EQUALS, "PGT_AUTHORIZE")); if (gatewayResponses) { @@ -57,5 +57,5 @@ if (!orderPaymentPreferenceId) { } // get the list of payments associated to gateway response if (context.paymentGatewayResponse) { - context.payments = context.paymentGatewayResponse.getRelated("Payment"); + context.payments = context.paymentGatewayResponse.getRelated("Payment", null, null, false); } Modified: ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl Tue Jun 19 21:36:11 2012 @@ -197,10 +197,10 @@ function getFinAccountTransRunningTotalA <#assign paymentMethodType = delegator.findOne("PaymentMethodType", {"paymentMethodTypeId" : payment.paymentMethodTypeId}, true)> </#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 paymentGroupMembers = Static["org.ofbiz.entity.util.EntityUtil"].filterByDate(payment.getRelated("PaymentGroupMember", null, null, false)?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/branches/20120329_portletWidget/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl Tue Jun 19 21:36:11 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> Modified: ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/invoice/PrintInvoices.fo.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/invoice/PrintInvoices.fo.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/invoice/PrintInvoices.fo.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/invoice/PrintInvoices.fo.ftl Tue Jun 19 21:36:11 2012 @@ -55,7 +55,7 @@ under the License. <fo:table-body> <fo:table-row> <fo:table-cell> - <fo:block number-columns-spanned="2" font-weight="bold">${invoice.getRelatedOne("InvoiceType").get("description",locale)?if_exists}</fo:block> + <fo:block number-columns-spanned="2" font-weight="bold">${invoice.getRelatedOne("InvoiceType", false).get("description",locale)?if_exists}</fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> @@ -184,13 +184,13 @@ under the License. <#assign newShipmentId = ""> <#-- if the item has a description, then use its description. Otherwise, use the description of the invoiceItemType --> <#list invoiceItems as invoiceItem> - <#assign itemType = invoiceItem.getRelatedOne("InvoiceItemType")> - <#assign taxRate = invoiceItem.getRelatedOne("TaxAuthorityRateProduct")?if_exists> - <#assign itemBillings = invoiceItem.getRelated("OrderItemBilling")?if_exists> + <#assign itemType = invoiceItem.getRelatedOne("InvoiceItemType", false)> + <#assign taxRate = invoiceItem.getRelatedOne("TaxAuthorityRateProduct", false)?if_exists> + <#assign itemBillings = invoiceItem.getRelated("OrderItemBilling", null, null, false)?if_exists> <#if itemBillings?has_content> <#assign itemBilling = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(itemBillings)> <#if itemBilling?has_content> - <#assign itemIssuance = itemBilling.getRelatedOne("ItemIssuance")?if_exists> + <#assign itemIssuance = itemBilling.getRelatedOne("ItemIssuance", false)?if_exists> <#if itemIssuance?has_content> <#assign newShipmentId = itemIssuance.shipmentId> </#if> Modified: ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/invoice/invoiceReportHeaderInfo.fo.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/invoice/invoiceReportHeaderInfo.fo.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/invoice/invoiceReportHeaderInfo.fo.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/invoice/invoiceReportHeaderInfo.fo.ftl Tue Jun 19 21:36:11 2012 @@ -23,7 +23,7 @@ under the License. <fo:table-body> <fo:table-row> <fo:table-cell> - <fo:block number-columns-spanned="2" font-weight="bold">${invoice.getRelatedOne("InvoiceType").get("description",locale)}</fo:block> + <fo:block number-columns-spanned="2" font-weight="bold">${invoice.getRelatedOne("InvoiceType", false).get("description",locale)}</fo:block> </fo:table-cell> </fo:table-row> Modified: ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/invoice/invoiceReportItems.fo.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/invoice/invoiceReportItems.fo.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/invoice/invoiceReportItems.fo.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/invoice/invoiceReportItems.fo.ftl Tue Jun 19 21:36:11 2012 @@ -51,7 +51,7 @@ under the License. <fo:table-body> <#list terms as term> - <#assign termType = term.getRelatedOne("TermType")/> + <#assign termType = term.getRelatedOne("TermType", false)/> <fo:table-row> <fo:table-cell> <fo:block font-size ="10pt" font-weight="bold">${termType.description?if_exists} ${term.description?if_exists} ${term.termDays?if_exists} ${term.textValue?if_exists}</fo:block> @@ -95,15 +95,15 @@ under the License. <#assign newShipmentId = ""> <#-- if the item has a description, then use its description. Otherwise, use the description of the invoiceItemType --> <#list invoiceItems as invoiceItem> - <#assign itemType = invoiceItem.getRelatedOne("InvoiceItemType")> + <#assign itemType = invoiceItem.getRelatedOne("InvoiceItemType", false)> <#assign isItemAdjustment = Static["org.ofbiz.entity.util.EntityTypeUtil"].hasParentType(delegator, "InvoiceItemType", "invoiceItemTypeId", itemType.getString("invoiceItemTypeId"), "parentTypeId", "INVOICE_ADJ")/> - <#assign taxRate = invoiceItem.getRelatedOne("TaxAuthorityRateProduct")?if_exists> - <#assign itemBillings = invoiceItem.getRelated("OrderItemBilling")?if_exists> + <#assign taxRate = invoiceItem.getRelatedOne("TaxAuthorityRateProduct", false)?if_exists> + <#assign itemBillings = invoiceItem.getRelated("OrderItemBilling", null, null, false)?if_exists> <#if itemBillings?has_content> <#assign itemBilling = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(itemBillings)> <#if itemBilling?has_content> - <#assign itemIssuance = itemBilling.getRelatedOne("ItemIssuance")?if_exists> + <#assign itemIssuance = itemBilling.getRelatedOne("ItemIssuance", false)?if_exists> <#if itemIssuance?has_content> <#assign newShipmentId = itemIssuance.shipmentId> <#assign issuedDateTime = itemIssuance.issuedDateTime/> Modified: ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/payment/PrintChecks.fo.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/payment/PrintChecks.fo.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/payment/PrintChecks.fo.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/payment/PrintChecks.fo.ftl Tue Jun 19 21:36:11 2012 @@ -46,7 +46,7 @@ by hand from a real template using a rul </#if> <#list payments as payment> - <#assign paymentApplications = payment.getRelated("PaymentApplication")> + <#assign paymentApplications = payment.getRelated("PaymentApplication", null, null, false)> <fo:block font-size="10pt" break-before="page"> <#-- this produces a page break if this block cannot fit on the current page --> <#-- the check: note that the format is fairly precise --> @@ -149,7 +149,7 @@ by hand from a real template using a rul <fo:table-body> <#list paymentApplications as paymentApplication> - <#assign invoice = paymentApplication.getRelatedOne("Invoice")?if_exists> + <#assign invoice = paymentApplication.getRelatedOne("Invoice", false)?if_exists> <fo:table-row> <fo:table-cell padding="3pt"> <fo:block>${payment.effectiveDate?date?string.short}</fo:block> @@ -171,7 +171,7 @@ by hand from a real template using a rul </fo:table-cell> </fo:table-row> <#if invoice.invoiceTypeId?if_exists == "PAYROL_INVOICE"> - <#assign InvoiceItems = invoice.getRelated("InvoiceItem")?if_exists> + <#assign InvoiceItems = invoice.getRelated("InvoiceItem", null, null, false)?if_exists> <#assign PayrolGroups = PayrolGroup?if_exists> <#list PayrolGroups as payrolGroup> <#assign fontSize = "75%"> @@ -181,7 +181,7 @@ by hand from a real template using a rul <#assign sumAmount = 0> <#assign sumSubTotal = 0> <#list InvoiceItems as invoiceItem> - <#assign invoiceItemType = invoiceItem.getRelatedOne("InvoiceItemType")?if_exists> + <#assign invoiceItemType = invoiceItem.getRelatedOne("InvoiceItemType", false)?if_exists> <#assign quantity = 0> <#assign amount = 0> <#assign subTotal = 0> @@ -217,7 +217,7 @@ by hand from a real template using a rul <#assign sumAmount = 0> <#assign sumSubTotal = 0> <#list InvoiceItems as invoiceItem> - <#assign invoiceItemType = invoiceItem.getRelatedOne("InvoiceItemType")?if_exists> + <#assign invoiceItemType = invoiceItem.getRelatedOne("InvoiceItemType", false)?if_exists> <#assign subTotal = 0> <#if invoiceItemType.parentTypeId == payrolGroup.invoiceItemTypeId> <#if invoiceItem.quantity?has_content><#assign quantity = invoiceItem.quantity?if_exists><#else><#assign quantity = 0></#if> @@ -241,7 +241,7 @@ by hand from a real template using a rul <#assign sumAmount = 0> <#assign sumSubTotal = 0> <#list InvoiceItems as invoiceItem> - <#assign invoiceItemType = invoiceItem.getRelatedOne("InvoiceItemType")?if_exists> + <#assign invoiceItemType = invoiceItem.getRelatedOne("InvoiceItemType", false)?if_exists> <#assign subTotal = 0> <#if invoiceItemType.parentTypeId == payrolGroup.invoiceItemTypeId> <#if invoiceItem.quantity?has_content><#assign quantity = invoiceItem.quantity?if_exists><#else><#assign quantity = 0></#if> @@ -345,7 +345,7 @@ by hand from a real template using a rul <fo:table-body> <#list paymentApplications as paymentApplication> - <#assign invoice = paymentApplication.getRelatedOne("Invoice")?if_exists> + <#assign invoice = paymentApplication.getRelatedOne("Invoice", false)?if_exists> <fo:table-row> <fo:table-cell padding="3pt"> <fo:block>${payment.effectiveDate?date?string.short}</fo:block> @@ -367,7 +367,7 @@ by hand from a real template using a rul </fo:table-cell> </fo:table-row> <#if invoice.invoiceTypeId?if_exists == "PAYROL_INVOICE"> - <#assign InvoiceItems = invoice.getRelated("InvoiceItem")?if_exists> + <#assign InvoiceItems = invoice.getRelated("InvoiceItem", null, null, false)?if_exists> <#assign PayrolGroups = PayrolGroup?if_exists> <#list PayrolGroups as payrolGroup> <#assign fontSize = "75%"> @@ -377,7 +377,7 @@ by hand from a real template using a rul <#assign sumAmount = 0> <#assign sumSubTotal = 0> <#list InvoiceItems as invoiceItem> - <#assign invoiceItemType = invoiceItem.getRelatedOne("InvoiceItemType")?if_exists> + <#assign invoiceItemType = invoiceItem.getRelatedOne("InvoiceItemType", false)?if_exists> <#assign quantity = 0> <#assign amount = 0> <#assign subTotal = 0> @@ -413,7 +413,7 @@ by hand from a real template using a rul <#assign sumAmount = 0> <#assign sumSubTotal = 0> <#list InvoiceItems as invoiceItem> - <#assign invoiceItemType = invoiceItem.getRelatedOne("InvoiceItemType")?if_exists> + <#assign invoiceItemType = invoiceItem.getRelatedOne("InvoiceItemType", false)?if_exists> <#assign subTotal = 0> <#if invoiceItemType.parentTypeId == payrolGroup.invoiceItemTypeId> <#if invoiceItem.quantity?has_content><#assign quantity = invoiceItem.quantity?if_exists><#else><#assign quantity = 0></#if> @@ -437,7 +437,7 @@ by hand from a real template using a rul <#assign sumAmount = 0> <#assign sumSubTotal = 0> <#list InvoiceItems as invoiceItem> - <#assign invoiceItemType = invoiceItem.getRelatedOne("InvoiceItemType")?if_exists> + <#assign invoiceItemType = invoiceItem.getRelatedOne("InvoiceItemType", false)?if_exists> <#assign subTotal = 0> <#if invoiceItemType.parentTypeId == payrolGroup.invoiceItemTypeId> <#if invoiceItem.quantity?has_content><#assign quantity = invoiceItem.quantity?if_exists><#else><#assign quantity = 0></#if> Modified: ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/period/EditCustomTimePeriod.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/period/EditCustomTimePeriod.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/period/EditCustomTimePeriod.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/period/EditCustomTimePeriod.ftl Tue Jun 19 21:36:11 2012 @@ -68,7 +68,7 @@ under the License. <select name="parentPeriodId"> <option value=''> </option> <#list allCustomTimePeriods as allCustomTimePeriod> - <#assign allPeriodType = allCustomTimePeriod.getRelatedOneCache("PeriodType")> + <#assign allPeriodType = allCustomTimePeriod.getRelatedOne("PeriodType", true)> <#assign isDefault = false> <#if (currentCustomTimePeriod.parentPeriodId)?exists> <#if currentCustomTimePeriod.customTimePeriodId = allCustomTimePeriod.customTimePeriodId> @@ -77,7 +77,7 @@ under the License. </#if> <option value='${allCustomTimePeriod.customTimePeriodId}'<#if isDefault> selected="selected"</#if>> ${allCustomTimePeriod.organizationPartyId} - <#if allPeriodType != null>${allPeriodType.description}:</#if> + <#if allPeriodType??>${allPeriodType.description}:</#if> ${allCustomTimePeriod.periodNum} [${allCustomTimePeriod.customTimePeriodId}] </option> @@ -157,7 +157,7 @@ under the License. <#assign line = 0> <#list customTimePeriods as customTimePeriod> <#assign line = line + 1> - <#assign periodType = customTimePeriod.getRelatedOneCache("PeriodType")> + <#assign periodType = customTimePeriod.getRelatedOne("PeriodType", true)> <tr> <form method="post" action='<@ofbizUrl>updateCustomTimePeriod</@ofbizUrl>' name='lineForm${line}'> <input type="hidden" name="findOrganizationPartyId" value="${findOrganizationPartyId?if_exists}" /> @@ -168,7 +168,7 @@ under the License. <select name="parentPeriodId"> <option value=''> </option> <#list allCustomTimePeriods as allCustomTimePeriod> - <#assign allPeriodType = allCustomTimePeriod.getRelatedOneCache("PeriodType")> + <#assign allPeriodType = allCustomTimePeriod.getRelatedOne("PeriodType", true)> <#assign isDefault = false> <#if (currentCustomTimePeriod.parentPeriodId)?exists> <#if currentCustomTimePeriod.customTimePeriodId = allCustomTimePeriod.customTimePeriodId> @@ -177,7 +177,7 @@ under the License. </#if> <option value='${allCustomTimePeriod.customTimePeriodId}'<#if isDefault> selected="selected"</#if>> ${allCustomTimePeriod.organizationPartyId} - <#if allPeriodType != null> ${allPeriodType.description}: </#if> + <#if allPeriodType??> ${allPeriodType.description}: </#if> ${allCustomTimePeriod.periodNum} [${allCustomTimePeriod.customTimePeriodId}] </option> @@ -248,7 +248,7 @@ under the License. <select name="parentPeriodId"> <option value=''> </option> <#list allCustomTimePeriods as allCustomTimePeriod> - <#assign allPeriodType = allCustomTimePeriod.getRelatedOneCache("PeriodType")> + <#assign allPeriodType = allCustomTimePeriod.getRelatedOne("PeriodType", true)> <#assign isDefault = false> <#if currentCustomTimePeriod?exists> <#if currentCustomTimePeriod.customTimePeriodId = allCustomTimePeriod.customTimePeriodId> @@ -258,7 +258,7 @@ under the License. <option value="${allCustomTimePeriod.customTimePeriodId}"<#if isDefault> selected="selected"</#if>> ${allCustomTimePeriod.organizationPartyId} <#if (allCustomTimePeriod.parentPeriodId)?exists>Par:${allCustomTimePeriod.parentPeriodId}</#if> - <#if allPeriodType != null> ${allPeriodType.description}:</#if> + <#if allPeriodType??> ${allPeriodType.description}:</#if> ${allCustomTimePeriod.periodNum} [${allCustomTimePeriod.customTimePeriodId}] </option> Modified: ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/AcctgTransEntriesSearchResult.fo.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/AcctgTransEntriesSearchResult.fo.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/AcctgTransEntriesSearchResult.fo.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/AcctgTransEntriesSearchResult.fo.ftl Tue Jun 19 21:36:11 2012 @@ -138,7 +138,7 @@ under the License. <fo:table-cell border="1pt solid" border-width=".1mm"> <fo:block text-align="center" font-size="5pt"> <#if (acctgTransEntry.paymentId)??> - <#assign paymentType = (delegator.findOne("Payment", {"paymentId" : (acctgTransEntry.paymentId)!}, false)).getRelatedOne("PaymentType")/> + <#assign paymentType = (delegator.findOne("Payment", {"paymentId" : (acctgTransEntry.paymentId)!}, false)).getRelatedOne("PaymentType", false)/> ${(acctgTransEntry.paymentId)!}<#if (paymentType?has_content)> -(${(paymentType.description)!})</#if> </#if> </fo:block> Modified: ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/AcctgTransEntriesSearchResultsInvoiceAndPayment.rptdesign URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/AcctgTransEntriesSearchResultsInvoiceAndPayment.rptdesign?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/AcctgTransEntriesSearchResultsInvoiceAndPayment.rptdesign (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/AcctgTransEntriesSearchResultsInvoiceAndPayment.rptdesign Tue Jun 19 21:36:11 2012 @@ -841,7 +841,7 @@ context.put("delegator", delegator); context.put("dispatcher", dispatcher); GroovyUtil.runScriptAtLocation("component://order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy", context); var postalAddress = context.get("postalAddress"); -var country = postalAddress.getRelatedOne("CountryGeo"); +var country = postalAddress.getRelatedOne("CountryGeo", false); var phone = context.get("phone"); var email = context.get("email"); var webSite = context.get("website"); Modified: ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/AcctgTransSearchResult.fo.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/AcctgTransSearchResult.fo.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/AcctgTransSearchResult.fo.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/AcctgTransSearchResult.fo.ftl Tue Jun 19 21:36:11 2012 @@ -119,7 +119,7 @@ under the License. <fo:table-cell border="1pt solid" border-width=".1mm"> <fo:block text-align="center" font-size="5pt"> <#if (acctgTrans.paymentId)??> - <#assign paymentType = (delegator.findOne("Payment", {"paymentId" : (acctgTrans.paymentId)!}, false)).getRelatedOne("PaymentType")/> + <#assign paymentType = (delegator.findOne("Payment", {"paymentId" : (acctgTrans.paymentId)!}, false)).getRelatedOne("PaymentType", false)/> ${(acctgTrans.paymentId)!}<#if (paymentType?has_content)> -(${(paymentType.description)!})</#if> </#if> </fo:block> Modified: ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/BalanceSheet.rptdesign URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/BalanceSheet.rptdesign?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/BalanceSheet.rptdesign (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/BalanceSheet.rptdesign Tue Jun 19 21:36:11 2012 @@ -578,7 +578,7 @@ return true;]]></method> </cell> <cell id="136"> <text-data id="279"> - <expression name="valueExpr">delegator.findOne("PartyAcctgPreference", UtilMisc.toMap("partyId", organizationPartyId), false).getRelatedOne("Uom").getString("description")</expression> + <expression name="valueExpr">delegator.findOne("PartyAcctgPreference", UtilMisc.toMap("partyId", organizationPartyId), false).getRelatedOne("Uom", false).getString("description")</expression> <property name="contentType">html</property> </text-data> </cell> Modified: ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/DepositSlip.fo.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/DepositSlip.fo.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/DepositSlip.fo.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/DepositSlip.fo.ftl Tue Jun 19 21:36:11 2012 @@ -84,7 +84,7 @@ under the License. </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" border="1pt solid" border-width=".1mm"> - <fo:block text-align="right">${paymentMethodType.description?if_exists} <#if creditCard?has_content && creditCard!= null>(${creditCard.cardType?if_exists})</#if></fo:block> + <fo:block text-align="right">${paymentMethodType.description?if_exists} <#if creditCard?has_content && creditCard??>(${creditCard.cardType?if_exists})</#if></fo:block> <#assign creditCard = null/> </fo:table-cell> <fo:table-cell padding="2pt" border="1pt solid" border-width=".1mm"> Modified: ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/IncomeStatement.rptdesign URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/IncomeStatement.rptdesign?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/IncomeStatement.rptdesign (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/IncomeStatement.rptdesign Tue Jun 19 21:36:11 2012 @@ -527,7 +527,7 @@ return true;]]></method> </cell> <cell id="136"> <text-data id="279"> - <expression name="valueExpr">delegator.findOne("PartyAcctgPreference", UtilMisc.toMap("partyId", organizationPartyId), false).getRelatedOne("Uom").getString("description")</expression> + <expression name="valueExpr">delegator.findOne("PartyAcctgPreference", UtilMisc.toMap("partyId", organizationPartyId), false).getRelatedOne("Uom", false).getString("description")</expression> <property name="contentType">html</property> </text-data> </cell> Modified: ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/InvoiceAcctgTransEntry.rptdesign URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/InvoiceAcctgTransEntry.rptdesign?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/InvoiceAcctgTransEntry.rptdesign (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/InvoiceAcctgTransEntry.rptdesign Tue Jun 19 21:36:11 2012 @@ -46,7 +46,7 @@ dateFormatter = new java.text.SimpleDate invoice = delegator.findOne("Invoice", UtilMisc.toMap("invoiceId", invoiceId), false); organizationPartyId = null; -if ("PURCHASE_INVOICE".equals(invoice.get("invoiceTypeId")) || "PURCHASE_INVOICE".equals(invoice.getRelatedOne("InvoiceType").get("parentTypeId"))) { +if ("PURCHASE_INVOICE".equals(invoice.get("invoiceTypeId")) || "PURCHASE_INVOICE".equals(invoice.getRelatedOne("InvoiceType", false).get("parentTypeId"))) { organizationPartyId = invoice.get("partyId"); } else { organizationPartyId = invoice.get("partyIdFrom"); @@ -523,12 +523,12 @@ return true;]]></method> <method name="fetch"><![CDATA[if (countOfRow >= 1) return false; row["invoiceId"] = invoice.get("invoiceId"); row["description"] = invoice.get("description"); -row["invoiceTypeDescription"] = invoice.getRelatedOne("InvoiceType").get("description"); -row["statusDescription"] = invoice.getRelatedOne("StatusItem").get("description"); +row["invoiceTypeDescription"] = invoice.getRelatedOne("InvoiceType", false).get("description"); +row["statusDescription"] = invoice.getRelatedOne("StatusItem", false).get("description"); row["invoiceDate"] = invoice.get("invoiceDate"); var partyId = null; -if ("PURCHASE_INVOICE".equals(invoice.get("invoiceTypeId")) || "PURCHASE_INVOICE".equals(invoice.getRelatedOne("InvoiceType").get("parentTypeId"))) { +if ("PURCHASE_INVOICE".equals(invoice.get("invoiceTypeId")) || "PURCHASE_INVOICE".equals(invoice.getRelatedOne("InvoiceType", false).get("parentTypeId"))) { partyId = invoice.get("partyIdFrom"); } else { partyId = invoice.get("partyId"); Modified: ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/PaymentAcctgTransEntry.rptdesign URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/PaymentAcctgTransEntry.rptdesign?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/PaymentAcctgTransEntry.rptdesign (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/PaymentAcctgTransEntry.rptdesign Tue Jun 19 21:36:11 2012 @@ -42,7 +42,7 @@ dateFormatter = new java.text.SimpleDate payment = delegator.findOne("Payment", UtilMisc.toMap("paymentId", paymentId), false); organizationPartyId = null; -if ("DISBURSEMENT".equals(payment.get("paymentTypeId")) || "DISBURSEMENT".equals(payment.getRelatedOne("PaymentType").get("parentTypeId"))) { +if ("DISBURSEMENT".equals(payment.get("paymentTypeId")) || "DISBURSEMENT".equals(payment.getRelatedOne("PaymentType", false).get("parentTypeId"))) { organizationPartyId = payment.get("partyIdFrom"); } else { organizationPartyId = payment.get("partyIdTo"); @@ -500,12 +500,12 @@ return true;]]></method> <method name="fetch"><![CDATA[if (countOfRow >= 1) return false; row["paymentId"] = payment.get("paymentId"); row["comments"] = payment.get("comments"); -row["paymentTypeDescription"] = payment.getRelatedOne("PaymentType").get("description"); -row["statusDescription"] = payment.getRelatedOne("StatusItem").get("description"); +row["paymentTypeDescription"] = payment.getRelatedOne("PaymentType", false).get("description"); +row["statusDescription"] = payment.getRelatedOne("StatusItem", false).get("description"); row["effectiveDate"] = payment.get("effectiveDate"); var partyId = null; -if ("RECEIPT".equals(payment.get("paymentTypeId")) || "RECEIPT".equals(payment.getRelatedOne("PaymentType").get("parentTypeId"))) { +if ("RECEIPT".equals(payment.get("paymentTypeId")) || "RECEIPT".equals(payment.getRelatedOne("PaymentType", false).get("parentTypeId"))) { partyId = payment.get("partyIdFrom"); } else { partyId = payment.get("partyIdTo"); Modified: ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/TrialBalance.rptdesign URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/TrialBalance.rptdesign?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/TrialBalance.rptdesign (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/accounting/reports/TrialBalance.rptdesign Tue Jun 19 21:36:11 2012 @@ -395,7 +395,7 @@ this.text = dateFormatter.format(fromDat </cell> <cell id="136"> <text-data id="279"> - <expression name="valueExpr">delegator.findOne("PartyAcctgPreference", UtilMisc.toMap("partyId", organizationPartyId), false).getRelatedOne("Uom").getString("description")</expression> + <expression name="valueExpr">delegator.findOne("PartyAcctgPreference", UtilMisc.toMap("partyId", organizationPartyId), false).getRelatedOne("Uom", false).getString("description")</expression> <property name="contentType">html</property> </text-data> </cell> Modified: ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl Tue Jun 19 21:36:11 2012 @@ -193,7 +193,7 @@ function runAction() { <#list invoices as invoice> <#assign invoicePaymentInfoList = dispatcher.runSync("getInvoicePaymentInfoList", Static["org.ofbiz.base.util.UtilMisc"].toMap("invoiceId", invoice.invoiceId, "userLogin", userLogin))/> <#assign invoicePaymentInfo = invoicePaymentInfoList.get("invoicePaymentInfoList").get(0)?if_exists> - <#assign statusItem = invoice.getRelatedOneCache("StatusItem")> + <#assign statusItem = invoice.getRelatedOne("StatusItem", true)> <tr valign="middle"<#if alt_row> class="alternate-row"</#if>> <td><a class="buttontext" href="<@ofbizUrl>invoiceOverview?invoiceId=${invoice.invoiceId}</@ofbizUrl>">${invoice.get("invoiceId")}</a></td> <td>${invoice.invoiceTypeDesc?default(invoice.invoiceTypeId)}</td> |
| Free forum by Nabble | Edit this page |
