Author: doogie
Date: Mon May 14 21:00:14 2012 New Revision: 1338404 URL: http://svn.apache.org/viewvc?rev=1338404&view=rev Log: DEPRECATION: applications/accounting: findByAnd variants replaced with findByAnd that takes a boolean useCache parameter. Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.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/PaymentMethodServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/period/PeriodServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/GetInvoiceItemTypes.groovy ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/OrderListInvoiceItem.groovy ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/order/BillingAccountOrders.groovy ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/BillingAccounts.groovy ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ManualTx.groovy ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/period/EditCustomTimePeriod.groovy ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CostCenters.groovy ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/SalesInvoiceByProductCategorySummary.groovy ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java?rev=1338404&r1=1338403&r2=1338404&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java Mon May 14 21:00:14 2012 @@ -97,30 +97,30 @@ public class AgreementServices { // Collect agreementItems applicable to this orderItem/returnItem // TODO: partyIds should be part of this query! - List<GenericValue> agreementItems = delegator.findByAndCache("AgreementItemAndProductAppl", UtilMisc.toMap( + List<GenericValue> agreementItems = delegator.findByAnd("AgreementItemAndProductAppl", UtilMisc.toMap( "productId", productId, - "agreementItemTypeId", "AGREEMENT_COMMISSION")); + "agreementItemTypeId", "AGREEMENT_COMMISSION"), null, true); // Try the first available virtual product if this is a variant product if (agreementItems.size() == 0) { - List<GenericValue> productAssocs = delegator.findByAndCache("ProductAssoc", UtilMisc.toMap( + List<GenericValue> productAssocs = delegator.findByAnd("ProductAssoc", UtilMisc.toMap( "productIdTo", productId, - "productAssocTypeId", "PRODUCT_VARIANT")); + "productAssocTypeId", "PRODUCT_VARIANT"), null, true); productAssocs = EntityUtil.filterByDate(productAssocs); if (productAssocs.size() > 0) { GenericEntity productAssoc = EntityUtil.getFirst(productAssocs); - agreementItems = delegator.findByAndCache("AgreementItemAndProductAppl", UtilMisc.toMap( + agreementItems = delegator.findByAnd("AgreementItemAndProductAppl", UtilMisc.toMap( "productId", productAssoc.getString("productId"), - "agreementItemTypeId", "AGREEMENT_COMMISSION")); + "agreementItemTypeId", "AGREEMENT_COMMISSION"), null, true); } } // this is not very efficient if there were many agreementItems = EntityUtil.filterByDate(agreementItems); for (GenericValue agreementItem : agreementItems) { - List<GenericValue> terms = delegator.findByAndCache("AgreementTerm", UtilMisc.toMap( + List<GenericValue> terms = delegator.findByAnd("AgreementTerm", UtilMisc.toMap( "agreementId", agreementItem.getString("agreementId"), "agreementItemSeqId", agreementItem.getString("agreementItemSeqId"), - "invoiceItemTypeId", invoiceItemTypeId)); + "invoiceItemTypeId", invoiceItemTypeId), null, true); if (terms.size() > 0) { BigDecimal commission = ZERO; BigDecimal min = new BigDecimal("-1e12"); // Limit to 1 trillion commission 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=1338404&r1=1338403&r2=1338404&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 Mon May 14 21:00:14 2012 @@ -73,7 +73,7 @@ public class FinAccountProductServices { GenericValue featureAndAppl; try { List<GenericValue> featureAndAppls = delegator.findByAnd("ProductFeatureAndAppl", UtilMisc.toMap("productId", productId, - "productFeatureTypeId", "TYPE", "productFeatureApplTypeId", "STANDARD_FEATURE")); + "productFeatureTypeId", "TYPE", "productFeatureApplTypeId", "STANDARD_FEATURE"), null, false); featureAndAppls = EntityUtil.filterByDate(featureAndAppls); featureAndAppl = EntityUtil.getFirst(featureAndAppls); } catch (GenericEntityException e) { 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=1338404&r1=1338403&r2=1338404&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 Mon May 14 21:00:14 2012 @@ -100,7 +100,7 @@ public class FinAccountServices { if (finAccountId != null) { creditAccount = delegator.findOne("FinAccount", UtilMisc.toMap("finAccountId", finAccountId), false); } else { - List<GenericValue> creditAccounts = delegator.findByAnd("FinAccount", lookupMap, UtilMisc.toList("-fromDate")); + List<GenericValue> creditAccounts = delegator.findByAnd("FinAccount", lookupMap, UtilMisc.toList("-fromDate"), false); creditAccount = EntityUtil.getFirst(EntityUtil.filterByDate(creditAccounts)); } 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=1338404&r1=1338403&r2=1338404&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 Mon May 14 21:00:14 2012 @@ -115,7 +115,7 @@ public class InvoiceServices { LocalDispatcher dispatcher = dctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); try { - List<GenericValue> orderItems = delegator.findByAnd("OrderItem", UtilMisc.toMap("orderId", (String) context.get("orderId")), UtilMisc.toList("orderItemSeqId")); + List<GenericValue> orderItems = delegator.findByAnd("OrderItem", UtilMisc.toMap("orderId", (String) context.get("orderId")), UtilMisc.toList("orderItemSeqId"), false); if (orderItems.size() > 0) { context.put("billItems", orderItems); } @@ -479,7 +479,7 @@ public class InvoiceServices { } if ("ItemIssuance".equals(currentValue.getEntityName())) { - List<GenericValue> shipmentItemBillings = delegator.findByAnd("ShipmentItemBilling", UtilMisc.toMap("shipmentId", currentValue.get("shipmentId"))); + List<GenericValue> shipmentItemBillings = delegator.findByAnd("ShipmentItemBilling", UtilMisc.toMap("shipmentId", currentValue.get("shipmentId")), null, false); if (UtilValidate.isEmpty(shipmentItemBillings)) { // create the ShipmentItemBilling record @@ -1077,7 +1077,7 @@ public class InvoiceServices { String invoicePerShipment = null; try { - orderShipments = delegator.findByAnd("OrderShipment", UtilMisc.toMap("shipmentId", shipmentId)); + orderShipments = delegator.findByAnd("OrderShipment", UtilMisc.toMap("shipmentId", shipmentId), null, false); } catch (GenericEntityException e) { return ServiceUtil.returnError(e.getMessage()); } @@ -1158,7 +1158,7 @@ public class InvoiceServices { List<GenericValue> orderItemBillings = FastList.newInstance(); try { - orderItemBillings = delegator.findByAnd("OrderItemBilling", billFields); + orderItemBillings = delegator.findByAnd("OrderItemBilling", billFields, null, false); } catch (GenericEntityException e) { Debug.logError(e, "Problem looking up OrderItemBilling records for " + billFields, module); return ServiceUtil.returnError(UtilProperties.getMessage(resource, @@ -1606,7 +1606,7 @@ public class InvoiceServices { // If part of the order was paid via credit card, try to charge it for the additional shipping List<GenericValue> orderPaymentPreferences = null; try { - orderPaymentPreferences = delegator.findByAnd("OrderPaymentPreference", UtilMisc.toMap("orderId", orderId, "paymentMethodTypeId", "CREDIT_CARD")); + orderPaymentPreferences = delegator.findByAnd("OrderPaymentPreference", UtilMisc.toMap("orderId", orderId, "paymentMethodTypeId", "CREDIT_CARD"), null, false); } catch (GenericEntityException e) { Debug.logError(e, "Problem getting OrderPaymentPreference records", module); return ServiceUtil.returnError(UtilProperties.getMessage(resource, @@ -1695,7 +1695,7 @@ public class InvoiceServices { List<GenericValue> shipmentItemBillings = null; String shipmentId = shipmentIds.get(0); try { - shipmentItemBillings = delegator.findByAnd("ShipmentItemBilling", UtilMisc.toMap("shipmentId", shipmentId)); + shipmentItemBillings = delegator.findByAnd("ShipmentItemBilling", UtilMisc.toMap("shipmentId", shipmentId), null, false); } catch (GenericEntityException e) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "AccountingProblemGettingShipmentItemBilling", locale)); @@ -1792,7 +1792,7 @@ public class InvoiceServices { if (item.getEntityName().equals("ShipmentReceipt")) { returnId = item.getString("returnId"); } else if (item.getEntityName().equals("ItemIssuance")) { - GenericValue returnItemShipment = EntityUtil.getFirst(delegator.findByAnd("ReturnItemShipment", UtilMisc.toMap("shipmentId", item.getString("shipmentId"), "shipmentItemSeqId", item.getString("shipmentItemSeqId")))); + GenericValue returnItemShipment = EntityUtil.getFirst(delegator.findByAnd("ReturnItemShipment", UtilMisc.toMap("shipmentId", item.getString("shipmentId"), "shipmentItemSeqId", item.getString("shipmentItemSeqId")), null, false)); returnId = returnItemShipment.getString("returnId"); returnItemSeqId = returnItemShipment.getString("returnItemSeqId"); } @@ -1801,9 +1801,9 @@ public class InvoiceServices { List<GenericValue> billings = null; if (item.getEntityName().equals("ShipmentReceipt")) { billings = delegator.findByAnd("ReturnItemBilling", UtilMisc.toMap("shipmentReceiptId", item.getString("receiptId"), "returnId", returnId, - "returnItemSeqId", item.get("returnItemSeqId"))); + "returnItemSeqId", item.get("returnItemSeqId")), null, false); } else if (item.getEntityName().equals("ItemIssuance")) { - billings = delegator.findByAnd("ReturnItemBilling", UtilMisc.toMap("returnId", returnId, "returnItemSeqId", returnItemSeqId)); + billings = delegator.findByAnd("ReturnItemBilling", UtilMisc.toMap("returnId", returnId, "returnItemSeqId", returnItemSeqId), null, false); } // if there are billings, we have already billed the item, so skip it if (UtilValidate.isNotEmpty(billings)) continue; @@ -2147,7 +2147,7 @@ public class InvoiceServices { // Get the payment applications that can be used to pay the invoice List<GenericValue> paymentAppl = null; try { - paymentAppl = delegator.findByAnd("PaymentAndApplication", UtilMisc.toMap("invoiceId", invoiceId)); + paymentAppl = delegator.findByAnd("PaymentAndApplication", UtilMisc.toMap("invoiceId", invoiceId), null, false); // For each payment application, select only those that are RECEIVED or SENT based on whether the payment is a RECEIPT or DISBURSEMENT respectively for (Iterator<GenericValue> iter = paymentAppl.iterator(); iter.hasNext();) { GenericValue payment = iter.next(); @@ -3049,7 +3049,7 @@ public class InvoiceServices { // get the invoice items List<GenericValue> invoiceItems = null; try { - invoiceItems = delegator.findByAnd("InvoiceItem", UtilMisc.toMap("invoiceId", invoiceId)); + invoiceItems = delegator.findByAnd("InvoiceItem", UtilMisc.toMap("invoiceId", invoiceId), null, false); } catch (GenericEntityException e) { return ServiceUtil.returnError(e.getMessage()); } @@ -3193,7 +3193,7 @@ public class InvoiceServices { BigDecimal invoicedTotal = ZERO; List<GenericValue> invoicedAdjustments = null; try { - invoicedAdjustments = delegator.findByAnd("OrderAdjustmentBilling", UtilMisc.toMap("orderAdjustmentId", orderAdjustment.getString("orderAdjustmentId"))); + invoicedAdjustments = delegator.findByAnd("OrderAdjustmentBilling", UtilMisc.toMap("orderAdjustmentId", orderAdjustment.getString("orderAdjustmentId")), null, false); } catch (GenericEntityException e) { Debug.logError(e, "Accounting trouble calling calculateInvoicedAdjustmentTotal service", module); return ServiceUtil.returnError(UtilProperties.getMessage(resource, @@ -3234,7 +3234,7 @@ public class InvoiceServices { "billingAccountId", paymentApplication.get("billingAccountId"), "paymentId", paymentApplication.get("paymentId"), "toPaymentId", paymentApplication.get("toPaymentId"), - "taxAuthGeoId", paymentApplication.get("taxAuthGeoId"))); + "taxAuthGeoId", paymentApplication.get("taxAuthGeoId")), null, false); } catch (GenericEntityException e) { return ServiceUtil.returnError(e.getMessage()); } 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=1338404&r1=1338403&r2=1338404&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 Mon May 14 21:00:14 2012 @@ -114,7 +114,7 @@ public class InvoiceWorker { /** Method to get the taxable invoice item types as a List of invoiceItemTypeIds. These are identified in Enumeration with enumTypeId TAXABLE_INV_ITM_TY. */ public static List<String> getTaxableInvoiceItemTypeIds(Delegator delegator) throws GenericEntityException { List<String> typeIds = FastList.newInstance(); - List<GenericValue> invoiceItemTaxTypes = delegator.findByAndCache("Enumeration", UtilMisc.toMap("enumTypeId", "TAXABLE_INV_ITM_TY")); + List<GenericValue> invoiceItemTaxTypes = delegator.findByAnd("Enumeration", UtilMisc.toMap("enumTypeId", "TAXABLE_INV_ITM_TY"), null, true); for (GenericValue invoiceItemTaxType : invoiceItemTaxTypes) { typeIds.add(invoiceItemTaxType.getString("enumId")); } @@ -302,7 +302,7 @@ public class InvoiceWorker { destinationPartyId = invoice.getString("partyId"); try { locations = EntityUtil.filterByDate(delegator.findByAnd("PartyContactMechPurpose", - UtilMisc.toMap("partyId", destinationPartyId, "contactMechPurposeTypeId", contactMechPurposeTypeId))); + UtilMisc.toMap("partyId", destinationPartyId, "contactMechPurposeTypeId", contactMechPurposeTypeId), null, false)); } catch (GenericEntityException e) { Debug.logError("Trouble getting contact party purpose list", module); } @@ -310,7 +310,7 @@ public class InvoiceWorker { if (UtilValidate.isEmpty(locations)) { try { locations = EntityUtil.filterByDate(delegator.findByAnd("PartyContactMechPurpose", - UtilMisc.toMap("partyId", destinationPartyId, "contactMechPurposeTypeId", "GENERAL_LOCATION"))); + UtilMisc.toMap("partyId", destinationPartyId, "contactMechPurposeTypeId", "GENERAL_LOCATION"), null, false)); } catch (GenericEntityException e) { Debug.logError("Trouble getting contact party purpose list", module); } @@ -535,7 +535,7 @@ public class InvoiceWorker { } // use the dated conversion entity if (UtilValidate.isEmpty(conversionRate)) { - List<GenericValue> rates = EntityUtil.filterByDate(delegator.findByAnd("UomConversionDated", UtilMisc.toMap("uomIdTo", invoice.getString("currencyUomId"), "uomId", otherCurrencyUomId)), invoice.getTimestamp("invoiceDate")); + List<GenericValue> rates = EntityUtil.filterByDate(delegator.findByAnd("UomConversionDated", UtilMisc.toMap("uomIdTo", invoice.getString("currencyUomId"), "uomId", otherCurrencyUomId), null, false), invoice.getTimestamp("invoiceDate")); if (UtilValidate.isNotEmpty(rates)) { conversionRate = (BigDecimal.ONE).divide((rates.get(0)).getBigDecimal("conversionFactor"), new MathContext(100)).setScale(decimals,rounding); } else { 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=1338404&r1=1338403&r2=1338404&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 Mon May 14 21:00:14 2012 @@ -159,7 +159,7 @@ public class BillingAccountWorker { balance = maxAmount != null ? balance.subtract(maxAmount) : balance; } - List<GenericValue> paymentAppls = delegator.findByAnd("PaymentApplication", UtilMisc.toMap("billingAccountId", billingAccountId)); + List<GenericValue> paymentAppls = delegator.findByAnd("PaymentApplication", UtilMisc.toMap("billingAccountId", billingAccountId), null, false); // TODO: cancelled payments? for (Iterator<GenericValue> pAi = paymentAppls.iterator(); pAi.hasNext();) { GenericValue paymentAppl = pAi.next(); @@ -251,7 +251,7 @@ public class BillingAccountWorker { BigDecimal balance = ZERO; // search through all PaymentApplications and add the amount that was applied to invoice and subtract the amount applied from payments - List<GenericValue> paymentAppls = delegator.findByAnd("PaymentApplication", UtilMisc.toMap("billingAccountId", billingAccountId)); + List<GenericValue> paymentAppls = delegator.findByAnd("PaymentApplication", UtilMisc.toMap("billingAccountId", billingAccountId), null, false); for (Iterator<GenericValue> pAi = paymentAppls.iterator(); pAi.hasNext();) { GenericValue paymentAppl = pAi.next(); BigDecimal amountApplied = paymentAppl.getBigDecimal("amountApplied"); 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=1338404&r1=1338403&r2=1338404&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 Mon May 14 21:00:14 2012 @@ -773,7 +773,7 @@ public class GiftCertificateServices { Map<String, Object> fields = UtilMisc.<String, Object>toMap("orderId", orderId, "orderItemSeqId", orderItem.get("orderItemSeqId"), "surveyId", surveyId); List<String> order = UtilMisc.toList("-responseDate"); - List<GenericValue> responses = delegator.findByAnd("SurveyResponse", fields, order); + List<GenericValue> responses = delegator.findByAnd("SurveyResponse", fields, order, false); // there should be only one surveyResponse = EntityUtil.getFirst(responses); } catch (GenericEntityException e) { @@ -1013,7 +1013,7 @@ public class GiftCertificateServices { Map<String, Object> fields = UtilMisc.toMap("orderId", orderId, "orderItemSeqId", orderItem.get("orderItemSeqId"), "surveyId", surveyId); List<String> order = UtilMisc.toList("-responseDate"); - List<GenericValue> responses = delegator.findByAnd("SurveyResponse", fields, order); + List<GenericValue> responses = delegator.findByAnd("SurveyResponse", fields, order, false); // there should be only one surveyResponse = EntityUtil.getFirst(responses); } catch (GenericEntityException e) { 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=1338404&r1=1338403&r2=1338404&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 Mon May 14 21:00:14 2012 @@ -232,7 +232,7 @@ public class PaymentGatewayServices { if (UtilValidate.isNotEmpty(billToPartyId)) { otherPaymentMethodAndCreditCardList = delegator.findByAnd("PaymentMethodAndCreditCard", - UtilMisc.toMap("partyId", billToPartyId, "paymentMethodTypeId", "CREDIT_CARD")); + UtilMisc.toMap("partyId", billToPartyId, "paymentMethodTypeId", "CREDIT_CARD"), null, false); otherPaymentMethodAndCreditCardList = EntityUtil.filterByDate(otherPaymentMethodAndCreditCardList, true); } @@ -338,11 +338,11 @@ public class PaymentGatewayServices { // get the payments to auth Map<String, String> lookupMap = UtilMisc.toMap("orderId", orderId, "statusId", "PAYMENT_NOT_AUTH"); List<String> orderList = UtilMisc.toList("maxAmount"); - paymentPrefs = delegator.findByAnd("OrderPaymentPreference", lookupMap, orderList); + paymentPrefs = delegator.findByAnd("OrderPaymentPreference", lookupMap, orderList, false); if (reAuth) { lookupMap.put("orderId", orderId); lookupMap.put("statusId", "PAYMENT_AUTHORIZED"); - paymentPrefs.addAll(delegator.findByAnd("OrderPaymentPreference", lookupMap, orderList)); + paymentPrefs.addAll(delegator.findByAnd("OrderPaymentPreference", lookupMap, orderList, false)); } } catch (GenericEntityException gee) { Debug.logError(gee, "Problems getting the order information", module); @@ -1186,11 +1186,11 @@ public class PaymentGatewayServices { // get the payment prefs Map<String, String> lookupMap = UtilMisc.toMap("orderId", orderId, "statusId", "PAYMENT_AUTHORIZED"); List<String> orderList = UtilMisc.toList("-maxAmount"); - paymentPrefs = delegator.findByAnd("OrderPaymentPreference", lookupMap, orderList); + paymentPrefs = delegator.findByAnd("OrderPaymentPreference", lookupMap, orderList, false); if (UtilValidate.isNotEmpty(billingAccountId)) { lookupMap = UtilMisc.toMap("orderId", orderId, "paymentMethodTypeId", "EXT_BILLACT", "statusId", "PAYMENT_NOT_RECEIVED"); - paymentPrefsBa = delegator.findByAnd("OrderPaymentPreference", lookupMap, orderList); + paymentPrefsBa = delegator.findByAnd("OrderPaymentPreference", lookupMap, orderList, false); } } catch (GenericEntityException gee) { Debug.logError(gee, "Problems getting entity record(s), see stack trace", module); @@ -1542,7 +1542,7 @@ public class PaymentGatewayServices { "orderId", orderId), locale)); } // See if there's an orderPaymentPreference - there should be only one OPP for EXT_BILLACT per order - List<GenericValue> orderPaymentPreferences = delegator.findByAnd("OrderPaymentPreference", UtilMisc.toMap("orderId", orderId, "paymentMethodTypeId", "EXT_BILLACT")); + List<GenericValue> orderPaymentPreferences = delegator.findByAnd("OrderPaymentPreference", UtilMisc.toMap("orderId", orderId, "paymentMethodTypeId", "EXT_BILLACT"), null, false); if (orderPaymentPreferences.size() > 0) { GenericValue orderPaymentPreference = EntityUtil.getFirst(orderPaymentPreferences); @@ -2300,7 +2300,7 @@ public class PaymentGatewayServices { String orderId = paymentPreference.getString("orderId"); List<GenericValue> orl = null; try { - orl = delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", orderId, "roleTypeId", "BILL_TO_CUSTOMER")); + orl = delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", orderId, "roleTypeId", "BILL_TO_CUSTOMER"), null, false); } catch (GenericEntityException e) { Debug.logError(e, module); } Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentMethodServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentMethodServices.java?rev=1338404&r1=1338403&r2=1338404&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentMethodServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentMethodServices.java Mon May 14 21:00:14 2012 @@ -214,7 +214,7 @@ public class PaymentMethodServices { try { List<GenericValue> allPCMPs = EntityUtil.filterByDate(delegator.findByAnd("PartyContactMechPurpose", - UtilMisc.toMap("partyId", partyId, "contactMechId", contactMechId, "contactMechPurposeTypeId", contactMechPurposeTypeId), null), true); + UtilMisc.toMap("partyId", partyId, "contactMechId", contactMechId, "contactMechPurposeTypeId", contactMechPurposeTypeId), null, false), true); tempVal = EntityUtil.getFirst(allPCMPs); } catch (GenericEntityException e) { @@ -388,7 +388,7 @@ public class PaymentMethodServices { try { List<GenericValue> allPCMPs = EntityUtil.filterByDate(delegator.findByAnd("PartyContactMechPurpose", - UtilMisc.toMap("partyId", partyId, "contactMechId", contactMechId, "contactMechPurposeTypeId", contactMechPurposeTypeId), null), true); + UtilMisc.toMap("partyId", partyId, "contactMechId", contactMechId, "contactMechPurposeTypeId", contactMechPurposeTypeId), null, false), true); tempVal = EntityUtil.getFirst(allPCMPs); } catch (GenericEntityException e) { @@ -728,7 +728,7 @@ public class PaymentMethodServices { try { List<GenericValue> allPCMPs = EntityUtil.filterByDate(delegator.findByAnd("PartyContactMechPurpose", UtilMisc.toMap("partyId", partyId, "contactMechId", contactMechId, - "contactMechPurposeTypeId", contactMechPurposeTypeId), null), true); + "contactMechPurposeTypeId", contactMechPurposeTypeId), null, false), true); tempVal = EntityUtil.getFirst(allPCMPs); } catch (GenericEntityException e) { @@ -856,7 +856,7 @@ public class PaymentMethodServices { try { List<GenericValue> allPCMPs = EntityUtil.filterByDate(delegator.findByAnd("PartyContactMechPurpose", UtilMisc.toMap("partyId", partyId, "contactMechId", contactMechId, - "contactMechPurposeTypeId",contactMechPurposeTypeId), null), true); + "contactMechPurposeTypeId",contactMechPurposeTypeId), null, false), true); tempVal = EntityUtil.getFirst(allPCMPs); } catch (GenericEntityException e) { Debug.logWarning(e.getMessage(), module); 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=1338404&r1=1338403&r2=1338404&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 Mon May 14 21:00:14 2012 @@ -59,7 +59,7 @@ public class PaymentWorker { public static List<Map<String, GenericValue>> getPartyPaymentMethodValueMaps(Delegator delegator, String partyId, Boolean showOld) { List<Map<String, GenericValue>> paymentMethodValueMaps = FastList.newInstance(); try { - List<GenericValue> paymentMethods = delegator.findByAnd("PaymentMethod", UtilMisc.toMap("partyId", partyId)); + List<GenericValue> paymentMethods = delegator.findByAnd("PaymentMethod", UtilMisc.toMap("partyId", partyId), null, false); if (!showOld) paymentMethods = EntityUtil.filterByDate(paymentMethods, true); @@ -160,7 +160,7 @@ public class PaymentWorker { try { paymentAddresses = delegator.findByAnd("PartyContactMechPurpose", UtilMisc.toMap("partyId", partyId, "contactMechPurposeTypeId", "PAYMENT_LOCATION"), - UtilMisc.toList("-fromDate")); + UtilMisc.toList("-fromDate"), false); paymentAddresses = EntityUtil.filterByDate(paymentAddresses); } catch (GenericEntityException e) { Debug.logError(e, "Trouble getting PartyContactMechPurpose entity list", module); Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/period/PeriodServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/period/PeriodServices.java?rev=1338404&r1=1338403&r2=1338404&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/period/PeriodServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/period/PeriodServices.java Mon May 14 21:00:14 2012 @@ -83,7 +83,7 @@ public class PeriodServices { if ((periodTypeId != null) && !(periodTypeId.equals(""))) { findParams.put("periodTypeId", periodTypeId); } - List<GenericValue> timePeriods = delegator.findByAnd("CustomTimePeriod", findParams, UtilMisc.toList("fromDate ASC")); + List<GenericValue> timePeriods = delegator.findByAnd("CustomTimePeriod", findParams, UtilMisc.toList("fromDate ASC"), false); if ((timePeriods != null) && (timePeriods.size() > 0) && (timePeriods.get(0).get("fromDate") != null)) { lastClosedDate = UtilDateTime.toTimestamp(timePeriods.get(0).getDate("fromDate")); } else { Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java?rev=1338404&r1=1338403&r2=1338404&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java Mon May 14 21:00:14 2012 @@ -430,7 +430,7 @@ public class TaxAuthorityServices { Map<String, String> priceFindMap = UtilMisc.toMap("productId", product.getString("productId"), "taxAuthPartyId", taxAuthPartyId, "taxAuthGeoId", taxAuthGeoId, "productPricePurposeId", "PURCHASE"); - List<GenericValue> productPriceList = delegator.findByAnd("ProductPrice", priceFindMap, UtilMisc.toList("-fromDate")); + List<GenericValue> productPriceList = delegator.findByAnd("ProductPrice", priceFindMap, UtilMisc.toList("-fromDate"), false); productPriceList = EntityUtil.filterByDate(productPriceList, true); productPrice = (productPriceList != null && productPriceList.size() > 0) ? productPriceList.get(0): null; //Debug.logInfo("=================== productId=" + product.getString("productId"), module); @@ -469,7 +469,7 @@ public class TaxAuthorityServices { // look for PartyRelationship with partyRelationshipTypeId=GROUP_ROLLUP, the partyIdTo is the group member, so the partyIdFrom is the groupPartyId Set<String> billToPartyIdSet = FastSet.newInstance(); billToPartyIdSet.add(billToPartyId); - List<GenericValue> partyRelationshipList = EntityUtil.filterByDate(delegator.findByAndCache("PartyRelationship", UtilMisc.toMap("partyIdTo", billToPartyId, "partyRelationshipTypeId", "GROUP_ROLLUP")), true); + List<GenericValue> partyRelationshipList = EntityUtil.filterByDate(delegator.findByAnd("PartyRelationship", UtilMisc.toMap("partyIdTo", billToPartyId, "partyRelationshipTypeId", "GROUP_ROLLUP"), null, true), true); for(GenericValue partyRelationship : partyRelationshipList) { billToPartyIdSet.add(partyRelationship.getString("partyIdFrom")); } @@ -560,9 +560,9 @@ public class TaxAuthorityServices { // if no exceptions were found for the current; try the parent if (!foundExemption) { // try the "parent" TaxAuthority - List<GenericValue> taxAuthorityAssocList = delegator.findByAndCache("TaxAuthorityAssoc", + List<GenericValue> taxAuthorityAssocList = delegator.findByAnd("TaxAuthorityAssoc", UtilMisc.toMap("toTaxAuthGeoId", taxAuthGeoId, "toTaxAuthPartyId", taxAuthPartyId, "taxAuthorityAssocTypeId", "EXEMPT_INHER"), - UtilMisc.toList("-fromDate")); + UtilMisc.toList("-fromDate"), true); taxAuthorityAssocList = EntityUtil.filterByDate(taxAuthorityAssocList, true); GenericValue taxAuthorityAssoc = EntityUtil.getFirst(taxAuthorityAssocList); // Debug.logInfo("Parent assoc to " + taxAuthGeoId + " : " + taxAuthorityAssoc, module); 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=1338404&r1=1338403&r2=1338404&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 Mon May 14 21:00:14 2012 @@ -364,7 +364,7 @@ public class RitaServices { Timestamp orderDate = orderHeader.getTimestamp("orderDate"); GenericValue terminalState = null; try { - List<GenericValue> states = delegator.findByAnd("PosTerminalState", UtilMisc.toMap("posTerminalId", terminalId)); + List<GenericValue> states = delegator.findByAnd("PosTerminalState", UtilMisc.toMap("posTerminalId", terminalId), null, false); states = EntityUtil.filterByDate(states, UtilDateTime.nowTimestamp(), "openedDate", "closedDate", true); terminalState = EntityUtil.getFirst(states); } catch (GenericEntityException e) { Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java?rev=1338404&r1=1338403&r2=1338404&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Mon May 14 21:00:14 2012 @@ -408,7 +408,7 @@ public class PayPalEvents { List <GenericValue> paymentPrefs = null; try { Map <String, String> paymentFields = UtilMisc.toMap("orderId", orderId, "statusId", "PAYMENT_NOT_RECEIVED"); - paymentPrefs = delegator.findByAnd("OrderPaymentPreference", paymentFields); + paymentPrefs = delegator.findByAnd("OrderPaymentPreference", paymentFields, null, false); } catch (GenericEntityException e) { Debug.logError(e, "Cannot get payment preferences for order #" + orderId, module); return false; 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=1338404&r1=1338403&r2=1338404&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 Mon May 14 21:00:14 2012 @@ -1107,7 +1107,7 @@ public class ValueLinkServices { try { Map<String, Object> fields = UtilMisc.toMap("productId", product.get("productId"), "productFeatureTypeId", "TYPE"); List<String> order = UtilMisc.toList("-fromDate"); - List<GenericValue> featureAppls = delegator.findByAndCache("ProductFeatureAndAppl", fields, order); + List<GenericValue> featureAppls = delegator.findByAnd("ProductFeatureAndAppl", fields, order, true); featureAppls = EntityUtil.filterByDate(featureAppls); typeFeature = EntityUtil.getFirst(featureAppls); } catch (GenericEntityException e) { @@ -1137,7 +1137,7 @@ public class ValueLinkServices { Map<String, Object> fields = UtilMisc.<String, Object>toMap("orderId", orderId, "orderItemSeqId", orderItem.get("orderItemSeqId"), "surveyId", surveyId); List<String> order = UtilMisc.toList("-responseDate"); - List<GenericValue> responses = delegator.findByAnd("SurveyResponse", fields, order); + List<GenericValue> responses = delegator.findByAnd("SurveyResponse", fields, order, false); // there should be only one surveyResponse = EntityUtil.getFirst(responses); } catch (GenericEntityException e) { @@ -1392,7 +1392,7 @@ public class ValueLinkServices { Map<String, Object> fields = UtilMisc.toMap("orderId", orderId, "orderItemSeqId", orderItem.get("orderItemSeqId"), "surveyId", surveyId); List<String> order = UtilMisc.toList("-responseDate"); - List<GenericValue> responses = delegator.findByAnd("SurveyResponse", fields, order); + List<GenericValue> responses = delegator.findByAnd("SurveyResponse", fields, order, false); // there should be only one surveyResponse = EntityUtil.getFirst(responses); } catch (GenericEntityException e) { 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=1338404&r1=1338403&r2=1338404&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 Mon May 14 21:00:14 2012 @@ -111,8 +111,8 @@ public class WorldPayEvents { List<GenericValue> addresses = null; List<GenericValue> shippingAddresses = null; try { - addresses = delegator.findByAnd("OrderContactMech", UtilMisc.toMap("orderId", orderId, "contactMechPurposeTypeId", "BILLING_LOCATION")); - shippingAddresses = delegator.findByAnd("OrderContactMech", UtilMisc.toMap("orderId", orderId, "contactMechPurposeTypeId", "SHIPPING_LOCATION")); + addresses = delegator.findByAnd("OrderContactMech", UtilMisc.toMap("orderId", orderId, "contactMechPurposeTypeId", "BILLING_LOCATION"), null, false); + shippingAddresses = delegator.findByAnd("OrderContactMech", UtilMisc.toMap("orderId", orderId, "contactMechPurposeTypeId", "SHIPPING_LOCATION"), null, false); if (addresses.size() == 0) { addresses = shippingAddresses; } @@ -175,7 +175,7 @@ public class WorldPayEvents { String emailAddress = null; GenericValue emailContact = null; try { - List<GenericValue> emails = delegator.findByAnd("OrderContactMech", UtilMisc.toMap("orderId", orderId, "contactMechPurposeTypeId", "ORDER_EMAIL")); + List<GenericValue> emails = delegator.findByAnd("OrderContactMech", UtilMisc.toMap("orderId", orderId, "contactMechPurposeTypeId", "ORDER_EMAIL"), null, false); GenericValue firstEmail = EntityUtil.getFirst(emails); emailContact = delegator.findOne("ContactMech", UtilMisc.toMap("contactMechId", firstEmail.getString("contactMechId")), false); emailAddress = emailContact.getString("infoString"); @@ -411,7 +411,7 @@ public class WorldPayEvents { List<GenericValue> paymentPrefs = null; try { Map<String, String> paymentFields = UtilMisc.toMap("orderId", orderId, "statusId", "PAYMENT_NOT_RECEIVED"); - paymentPrefs = delegator.findByAnd("OrderPaymentPreference", paymentFields); + paymentPrefs = delegator.findByAnd("OrderPaymentPreference", paymentFields, null, false); } catch (GenericEntityException e) { Debug.logError(e, "Cannot get payment preferences for order #" + orderId, module); return false; 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=1338404&r1=1338403&r2=1338404&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 Mon May 14 21:00:14 2012 @@ -77,7 +77,7 @@ if (invoice) { // also create a map with tax grand total amount by VAT tax: it is also required in invoices by UE taxRate = invoiceItem.getRelatedOne("TaxAuthorityRateProduct"); if (taxRate && "VAT_TAX".equals(taxRate.taxAuthorityRateTypeId)) { - taxInfos = EntityUtil.filterByDate(delegator.findByAnd("PartyTaxAuthInfo", [partyId : billingParty.partyId, taxAuthGeoId : taxRate.taxAuthGeoId, taxAuthPartyId : taxRate.taxAuthPartyId]), invoice.invoiceDate); + taxInfos = EntityUtil.filterByDate(delegator.findByAnd("PartyTaxAuthInfo", [partyId : billingParty.partyId, taxAuthGeoId : taxRate.taxAuthGeoId, taxAuthPartyId : taxRate.taxAuthPartyId], null, false), invoice.invoiceDate); taxInfo = EntityUtil.getFirst(taxInfos); if (taxInfo) { context.billingPartyTaxId = taxInfo.partyTaxId; @@ -130,10 +130,10 @@ if (invoice) { terms = invoice.getRelated("InvoiceTerm"); context.terms = terms; - paymentAppls = delegator.findByAnd("PaymentApplication", [invoiceId : invoiceId]); + paymentAppls = delegator.findByAnd("PaymentApplication", [invoiceId : invoiceId], null, false); context.payments = paymentAppls; - orderItemBillings = delegator.findByAnd("OrderItemBilling", [invoiceId : invoiceId], ['orderId']); + orderItemBillings = delegator.findByAnd("OrderItemBilling", [invoiceId : invoiceId], ['orderId'], false); orders = new LinkedHashSet(); orderItemBillings.each { orderIb -> orders.add(orderIb.orderId); Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/GetInvoiceItemTypes.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/GetInvoiceItemTypes.groovy?rev=1338404&r1=1338403&r2=1338404&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/GetInvoiceItemTypes.groovy (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/GetInvoiceItemTypes.groovy Mon May 14 21:00:14 2012 @@ -41,7 +41,7 @@ if ("SALES_INVOICE".equals(invoice.invoi EQUALS(parentTypeId: "INV_PROD_ITEM") } invoiceItemTypes = delegator.findList("InvoiceItemType", itemTypesCond, null, ["parentTypeId", "invoiceItemTypeId"], null, false); - glAccountOrganizationAndClassList = delegator.findByAnd("GlAccountOrganizationAndClass", [organizationPartyId : invoice.partyIdFrom]); + glAccountOrganizationAndClassList = delegator.findByAnd("GlAccountOrganizationAndClass", [organizationPartyId : invoice.partyIdFrom], null, false); } else if ("PURCHASE_INVOICE".equals(invoice.invoiceTypeId)) { itemTypesCond = exprBldr.OR() { EQUALS(invoiceItemTypeId: "PINVOICE_ADJ") @@ -52,7 +52,7 @@ if ("SALES_INVOICE".equals(invoice.invoi EQUALS(parentTypeId: "PINV_PROD_ITEM") } invoiceItemTypes = delegator.findList("InvoiceItemType", itemTypesCond, null, ["parentTypeId", "invoiceItemTypeId"], null, false); - glAccountOrganizationAndClassList = delegator.findByAnd("GlAccountOrganizationAndClass", [organizationPartyId : invoice.partyId]); + glAccountOrganizationAndClassList = delegator.findByAnd("GlAccountOrganizationAndClass", [organizationPartyId : invoice.partyId], null, false); } else if ("PAYROL_INVOICE".equals(invoice.invoiceTypeId)) { itemTypesCond = exprBldr.OR() { EQUALS(invoiceItemTypeId: "PAYROL_EARN_HOURS") @@ -63,7 +63,7 @@ if ("SALES_INVOICE".equals(invoice.invoi EQUALS(parentTypeId: "PAYROL_TAXES") } invoiceItemTypes = delegator.findList("InvoiceItemType", itemTypesCond, null, ["parentTypeId", "invoiceItemTypeId"], null, false); - glAccountOrganizationAndClassList = delegator.findByAnd("GlAccountOrganizationAndClass", [organizationPartyId : invoice.partyId]); + glAccountOrganizationAndClassList = delegator.findByAnd("GlAccountOrganizationAndClass", [organizationPartyId : invoice.partyId], null, false); } else if ("COMMISSION_INVOICE".equals(invoice.invoiceTypeId)) { itemTypesCond = exprBldr.OR() { EQUALS(invoiceItemTypeId: "COMM_INV_ITEM") @@ -72,9 +72,9 @@ if ("SALES_INVOICE".equals(invoice.invoi EQUALS(parentTypeId: "COMM_INV_ADJ") } invoiceItemTypes = delegator.findList("InvoiceItemType", itemTypesCond, null, ["parentTypeId", "invoiceItemTypeId"], null, false); - glAccountOrganizationAndClassList = delegator.findByAnd("GlAccountOrganizationAndClass", [organizationPartyId : invoice.partyId]); + glAccountOrganizationAndClassList = delegator.findByAnd("GlAccountOrganizationAndClass", [organizationPartyId : invoice.partyId], null, false); } else { - map = delegator.findByAndCache("InvoiceItemTypeMap", [invoiceTypeId : invoice.invoiceTypeId]); + map = delegator.findByAnd("InvoiceItemTypeMap", [invoiceTypeId : invoice.invoiceTypeId], null, true); invoiceItemTypes = EntityUtil.getRelated("InvoiceItemType", map); } context.invoiceItemTypes = invoiceItemTypes; Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/OrderListInvoiceItem.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/OrderListInvoiceItem.groovy?rev=1338404&r1=1338403&r2=1338404&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/OrderListInvoiceItem.groovy (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/OrderListInvoiceItem.groovy Mon May 14 21:00:14 2012 @@ -27,21 +27,21 @@ invoiceId = context.invoiceId; if (!invoiceId) return; List invoiceItems = []; -invoiceItemList = delegator.findByAnd("InvoiceItem", [invoiceId : invoiceId], ["invoiceItemSeqId"]); +invoiceItemList = delegator.findByAnd("InvoiceItem", [invoiceId : invoiceId], ["invoiceItemSeqId"], false); if (invoiceItemList) { invoiceItemList.each { invoiceItem -> invoiceItemSeqId = invoiceItem.invoiceItemSeqId; invoiceId = invoiceItem.invoiceId; - orderItemBilling = EntityUtil.getFirst(delegator.findByAnd("OrderItemBilling", [invoiceId : invoiceId, invoiceItemSeqId : invoiceItemSeqId])); + orderItemBilling = EntityUtil.getFirst(delegator.findByAnd("OrderItemBilling", [invoiceId : invoiceId, invoiceItemSeqId : invoiceItemSeqId], null, false)); Map invoiceItemMap = FastMap.newInstance(); invoiceItemMap.putAll((Map) invoiceItem); if (orderItemBilling) { orderId = orderItemBilling.orderId; invoiceItemMap.orderId = orderId; } else { - orderAdjustmentBilling = EntityUtil.getFirst(delegator.findByAnd("OrderAdjustmentBilling", [invoiceId : invoiceId, invoiceItemSeqId : invoiceItemSeqId])); + orderAdjustmentBilling = EntityUtil.getFirst(delegator.findByAnd("OrderAdjustmentBilling", [invoiceId : invoiceId, invoiceItemSeqId : invoiceItemSeqId], null, false)); if (orderAdjustmentBilling) { - orderAdjustment = EntityUtil.getFirst(delegator.findByAnd("OrderAdjustment", [orderAdjustmentId : orderAdjustmentBilling.orderAdjustmentId])) + orderAdjustment = EntityUtil.getFirst(delegator.findByAnd("OrderAdjustment", [orderAdjustmentId : orderAdjustmentBilling.orderAdjustmentId], null, false)) if (orderAdjustment) { orderId = orderAdjustment.orderId; invoiceItemMap.orderId = orderId; Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/order/BillingAccountOrders.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/order/BillingAccountOrders.groovy?rev=1338404&r1=1338403&r2=1338404&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/order/BillingAccountOrders.groovy (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/order/BillingAccountOrders.groovy Mon May 14 21:00:14 2012 @@ -23,11 +23,11 @@ import javolution.util.FastMap; if (billingAccountId) { orderPaymentPreferencesList = []; - orderList = delegator.findByAnd("OrderHeader", [billingAccountId : billingAccountId]); + orderList = delegator.findByAnd("OrderHeader", [billingAccountId : billingAccountId], null, false); if (orderList) { orderList.each { orderHeader -> orderId = orderHeader.orderId; - orderBillingAcc = EntityUtil.getFirst(delegator.findByAnd("OrderHeaderAndPaymentPref", [orderId : orderId])); + orderBillingAcc = EntityUtil.getFirst(delegator.findByAnd("OrderHeaderAndPaymentPref", [orderId : orderId], null, false)); orderBillingAccMap = FastMap.newInstance(); if (orderBillingAcc.paymentMethodTypeId.equals("EXT_BILLACT") && orderBillingAcc.paymentStatusId.equals("PAYMENT_NOT_RECEIVED")) { orderBillingAccMap.putAll(orderBillingAcc); Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/BillingAccounts.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/BillingAccounts.groovy?rev=1338404&r1=1338403&r2=1338404&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/BillingAccounts.groovy (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/BillingAccounts.groovy Mon May 14 21:00:14 2012 @@ -24,7 +24,7 @@ partyId = parameters.partyId; currencyUomId = null; billingAccounts = []; if (partyId) { - billingAccountAndRoles = delegator.findByAnd("BillingAccountAndRole", [partyId : partyId]); + billingAccountAndRoles = delegator.findByAnd("BillingAccountAndRole", [partyId : partyId], null, false); if (billingAccountAndRoles) currencyUomId = billingAccountAndRoles.first().accountCurrencyUomId; if (currencyUomId) billingAccounts = BillingAccountWorker.makePartyBillingAccountList(userLogin, currencyUomId, partyId, delegator, dispatcher); } 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=1338404&r1=1338403&r2=1338404&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 Mon May 14 21:00:14 2012 @@ -31,7 +31,7 @@ if (productStoreId) { } // payment settings -paymentSettings = delegator.findByAnd("Enumeration", [enumTypeId : "PRDS_PAYSVC"], ["sequenceId"]); +paymentSettings = delegator.findByAnd("Enumeration", [enumTypeId : "PRDS_PAYSVC"], ["sequenceId"], false); context.paymentSettings = paymentSettings; // payment method (for auto-fill) 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=1338404&r1=1338403&r2=1338404&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 Mon May 14 21:00:14 2012 @@ -47,7 +47,7 @@ findMap = [ : ]; if (findOrganizationPartyId) findMap.organizationPartyId = findOrganizationPartyId; if (currentCustomTimePeriodId) findMap.parentPeriodId = currentCustomTimePeriodId; -customTimePeriods = delegator.findByAnd("CustomTimePeriod", findMap, ["periodTypeId", "periodNum", "fromDate"]); +customTimePeriods = delegator.findByAnd("CustomTimePeriod", findMap, ["periodTypeId", "periodNum", "fromDate"], false); context.customTimePeriods = customTimePeriods; allCustomTimePeriods = delegator.findList("CustomTimePeriod", null, null, ["organizationPartyId", "parentPeriodId", "periodTypeId", "periodNum", "fromDate"], null, false); Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CostCenters.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CostCenters.groovy?rev=1338404&r1=1338403&r2=1338404&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CostCenters.groovy (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CostCenters.groovy Mon May 14 21:00:14 2012 @@ -50,7 +50,7 @@ andExprs.add(EntityCondition.makeConditi andCond = EntityCondition.makeCondition(andExprs, EntityOperator.AND); List postedTransactionTotals = delegator.findList("AcctgTransEntrySums", andCond, UtilMisc.toSet("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount"), UtilMisc.toList("glAccountId"), null, false); if (postedTransactionTotals) { - glAccountCategories = delegator.findByAnd("GlAccountCategory", [glAccountCategoryTypeId : 'COST_CENTER'], ['glAccountCategoryId']); + glAccountCategories = delegator.findByAnd("GlAccountCategory", [glAccountCategoryTypeId : 'COST_CENTER'], ['glAccountCategoryId'], false); context.glAccountCategories = glAccountCategories; Map postedTransactionTotalsMap = [:] postedTransactionTotals.each { postedTransactionTotal -> @@ -67,7 +67,7 @@ if (postedTransactionTotals) { BigDecimal balance = debitAmount.subtract(creditAmount); accountMap.put("balance", balance); glAccountCategories.each { glAccountCategory -> - glAccountCategoryMember = EntityUtil.getFirst(EntityUtil.filterByDate(delegator.findByAnd("GlAccountCategoryMember", [glAccountCategoryId : glAccountCategory.glAccountCategoryId, glAccountId: postedTransactionTotal.glAccountId], ['glAccountCategoryId']))); + glAccountCategoryMember = EntityUtil.getFirst(EntityUtil.filterByDate(delegator.findByAnd("GlAccountCategoryMember", [glAccountCategoryId : glAccountCategory.glAccountCategoryId, glAccountId: postedTransactionTotal.glAccountId], ['glAccountCategoryId'], false))); if (glAccountCategoryMember) { BigDecimal glAccountCategorySharePercentage = glAccountCategoryMember.amountPercentage; if (glAccountCategorySharePercentage && glAccountCategorySharePercentage != BigDecimal.ZERO ) { 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=1338404&r1=1338403&r2=1338404&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 Mon May 14 21:00:14 2012 @@ -31,8 +31,8 @@ import org.ofbiz.entity.util.*; //TODO: // get products and categories under the root category -productMemberList = delegator.findByAnd("ProductCategoryMember", [productCategoryId : rootProductCategoryId], ["sequenceNum"]); -categoryRollupList = delegator.findByAnd("ProductCategoryRollup", [parentProductCategoryId : rootProductCategoryId], ["sequenceNum"]); +productMemberList = delegator.findByAnd("ProductCategoryMember", [productCategoryId : rootProductCategoryId], ["sequenceNum"], false); +categoryRollupList = delegator.findByAnd("ProductCategoryRollup", [parentProductCategoryId : rootProductCategoryId], ["sequenceNum"], false); // for use in the queries productIdSet = FastSet.newInstance(); 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=1338404&r1=1338403&r2=1338404&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl Mon May 14 21:00:14 2012 @@ -95,7 +95,7 @@ function getFinAccountTransRunningTotalA <input name="reconciledBalance" type="hidden" value="${(glReconciliation.reconciledBalance)?if_exists}"/> <input name="reconciledBalanceWithUom" type="hidden" id="reconciledBalanceWithUom" value="<@ofbizCurrency amount=(glReconciliation.reconciledBalance)?default('0')/>"/> </#if> - <#assign glReconciliations = delegator.findByAnd("GlReconciliation", {"glAccountId" : finAccount.postToGlAccountId?if_exists, "statusId" : "GLREC_CREATED"}, Static["org.ofbiz.base.util.UtilMisc"].toList("reconciledDate DESC"))> + <#assign glReconciliations = delegator.findByAnd("GlReconciliation", {"glAccountId" : finAccount.postToGlAccountId?if_exists, "statusId" : "GLREC_CREATED"}, Static["org.ofbiz.base.util.UtilMisc"].toList("reconciledDate DESC"), false)> <#if (glReconciliationId?has_content && (glReconciliationId == "_NA_" && finAccountTransList?has_content)) || !grandTotal?exists> <div align="right"> <#if grandTotal?exists> @@ -155,7 +155,7 @@ function getFinAccountTransRunningTotalA <#if finAccountTrans.paymentId?has_content> <#assign payment = delegator.findOne("Payment", {"paymentId" : finAccountTrans.paymentId}, true)> <#else> - <#assign payments = delegator.findByAnd("Payment", {"finAccountTransId" : finAccountTrans.finAccountTransId})> + <#assign payments = delegator.findByAnd("Payment", {"finAccountTransId" : finAccountTrans.finAccountTransId}, null, false)> </#if> <#assign finAccountTransType = delegator.findOne("FinAccountTransType", {"finAccountTransTypeId" : finAccountTrans.finAccountTransTypeId}, true)> <#if finAccountTrans.statusId?has_content> 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=1338404&r1=1338403&r2=1338404&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl Mon May 14 21:00:14 2012 @@ -30,7 +30,7 @@ under the License. </div> <div class="screenlet-body"> <a href="<@ofbizUrl>EditFinAccountReconciliations?finAccountId=${finAccountId}&glReconciliationId=${glReconciliationId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonEdit}</a> - <#assign finAcctTransCondList = delegator.findByAnd("FinAccountTrans", {"glReconciliationId" : glReconciliationId, "statusId" : "FINACT_TRNS_CREATED"})> + <#assign finAcctTransCondList = delegator.findByAnd("FinAccountTrans", {"glReconciliationId" : glReconciliationId, "statusId" : "FINACT_TRNS_CREATED"}, null, false)> <#if finAcctTransCondList?has_content> <a href="javascript:document.CancelBankReconciliationForm.submit();" class="buttontext">${uiLabelMap.AccountingCancelBankReconciliation}</a> </#if> |
Free forum by Nabble | Edit this page |