Examples of findByCondition()


Examples of org.ofbiz.entity.GenericDelegator.findByCondition()

   
                if (createSalesInvoicesForDropShipments.booleanValue()) {
               
                    // If a sales invoice is being created for a drop shipment, we have to reference the original sales order items
                    // Get the list of the linked orderIds (original sales orders)
                    orderItemAssocs = delegator.findByCondition("OrderItemAssoc", new EntityExpr("toOrderId", EntityOperator.IN, purchaseOrderIds), null, null);
   
                    // Get only the order items which are indirectly related to the purchase order - this limits the list to the drop ship group(s)
                    items = EntityUtil.getRelated("FromOrderItem", orderItemAssocs);
                } else {
View Full Code Here

Examples of org.ofbiz.entity.GenericDelegator.findByCondition()

                    // Get only the order items which are indirectly related to the purchase order - this limits the list to the drop ship group(s)
                    items = EntityUtil.getRelated("FromOrderItem", orderItemAssocs);
                } else {

                    // If it's a purchase invoice being created, the order items for that purchase orders can be used directly
                    items = delegator.findByCondition("OrderItem", new EntityExpr("orderId", EntityOperator.IN, purchaseOrderIds), null, null);
                }
            } else {
                items = delegator.findByCondition("ItemIssuance", shipmentIdsCond, null, UtilMisc.toList("shipmentId"));
            }
        } catch (GenericEntityException e) {
View Full Code Here

Examples of org.ofbiz.entity.GenericDelegator.findByCondition()

                    // If it's a purchase invoice being created, the order items for that purchase orders can be used directly
                    items = delegator.findByCondition("OrderItem", new EntityExpr("orderId", EntityOperator.IN, purchaseOrderIds), null, null);
                }
            } else {
                items = delegator.findByCondition("ItemIssuance", shipmentIdsCond, null, UtilMisc.toList("shipmentId"));
            }
        } catch (GenericEntityException e) {
            String errMsg = UtilProperties.getMessage(resource, "AccountingProblemGettingItemsFromShipments", locale);
            Debug.logError(e, errMsg, module);
            return ServiceUtil.returnError(errMsg);
View Full Code Here

Examples of org.ofbiz.entity.GenericDelegator.findByCondition()

                        // Get the list of shipments which are associated with the filtered purchase orders
                        if (! UtilValidate.isEmpty(invoiceablePrimaryOrderIds)) {
                            List invoiceableShipmentConds = UtilMisc.toList(
                                    new EntityExpr("primaryOrderId", EntityOperator.IN, invoiceablePrimaryOrderIds),
                                    new EntityExpr("shipmentId", EntityOperator.IN, shipmentIds));
                            invoiceableShipments = delegator.findByCondition("Shipment", new EntityConditionList(invoiceableShipmentConds, EntityOperator.AND), null, null);
                        }
                    } else {
                        List invoiceableShipmentIds = EntityUtil.getFieldListFromEntityList(toBillItems, "shipmentId", true);
                        if (! UtilValidate.isEmpty(invoiceableShipmentIds)) {
                            invoiceableShipments = delegator.findByCondition("Shipment", new EntityExpr("shipmentId", EntityOperator.IN, invoiceableShipmentIds), null, null);
View Full Code Here

Examples of org.ofbiz.entity.GenericDelegator.findByCondition()

                            invoiceableShipments = delegator.findByCondition("Shipment", new EntityConditionList(invoiceableShipmentConds, EntityOperator.AND), null, null);
                        }
                    } else {
                        List invoiceableShipmentIds = EntityUtil.getFieldListFromEntityList(toBillItems, "shipmentId", true);
                        if (! UtilValidate.isEmpty(invoiceableShipmentIds)) {
                            invoiceableShipments = delegator.findByCondition("Shipment", new EntityExpr("shipmentId", EntityOperator.IN, invoiceableShipmentIds), null, null);
                        }
                    }
                } catch( GenericEntityException e ) {
                    String errMsg = UtilProperties.getMessage(resource, "AccountingTroubleCallingCreateInvoicesFromShipmentsService", locale);
                    Debug.logError(e, errMsg, module);
View Full Code Here

Examples of org.ofbiz.entity.GenericDelegator.findByCondition()

                    new EntityExpr("isClosed", EntityOperator.EQUALS, "Y"));
            if ((periodTypeId != null) && !(periodTypeId.equals(""))) {
                // if a periodTypeId was supplied, use it
                findClosedConditions.add(new EntityExpr("periodTypeId", EntityOperator.EQUALS, periodTypeId));
            }
            List closedTimePeriods = delegator.findByCondition("CustomTimePeriod", new EntityConditionList(findClosedConditions, EntityOperator.AND),
                    UtilMisc.toList("customTimePeriodId", "periodTypeId", "isClosed", "fromDate", "thruDate"),
                    UtilMisc.toList("thruDate DESC"));

            if ((closedTimePeriods != null) && (closedTimePeriods.size() > 0) && (((GenericValue) closedTimePeriods.get(0)).get("thruDate") != null)) {
                lastClosedTimePeriod = (GenericValue) closedTimePeriods.get(0);
View Full Code Here

Examples of org.ofbiz.entity.GenericDelegator.findByCondition()

            EntityConditionList conditionList = new EntityConditionList(exprList, EntityOperator.AND);
           
            String [] fields = {"rootRevisionContentId", "itemContentId", "maxRevisionSeqId", "contentId", "dataResourceId", "contentIdTo", "contentAssocTypeId", "fromDate", "sequenceNum"};
            List selectFields = UtilMisc.toListArray(fields);
            List orderByFields = UtilMisc.toList("sequenceNum");
            List compDocParts = delegator.findByCondition("ContentAssocRevisionItemView", conditionList, selectFields, orderByFields);
           
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            Document document = new Document();
            document.setPageSize(PageSize.LETTER);   
            //Rectangle rect = document.getPageSize();
View Full Code Here

Examples of org.ofbiz.entity.GenericDelegator.findByCondition()

            if (UtilValidate.isNotEmpty(contentId)) {
                exprList.add(new EntityExpr("contentId", EntityOperator.EQUALS, contentId));
            }

            EntityConditionList assocExprList = new EntityConditionList(exprList, EntityOperator.AND);
            List relatedAssocs = delegator.findByCondition("ContentAssoc", assocExprList, new ArrayList(), UtilMisc.toList("fromDate"));
            //if (Debug.infoOn()) Debug.logInfo("in deactivateAssocs, relatedAssocs:" + relatedAssocs, module);
            List filteredAssocs = EntityUtil.filterByDate(relatedAssocs);
            //if (Debug.infoOn()) Debug.logInfo("in deactivateAssocs, filteredAssocs:" + filteredAssocs, module);

            Iterator it = filteredAssocs.iterator();
View Full Code Here

Examples of org.ofbiz.entity.GenericDelegator.findByCondition()

            EntityCondition con3 = new EntityConditionList(UtilMisc.toList(con2, authExpr), EntityOperator.OR);

            EntityExpr orderExpr = new EntityExpr("orderId", EntityOperator.EQUALS, orderId);
            EntityCondition con4 = new EntityConditionList(UtilMisc.toList(con3, orderExpr), EntityOperator.AND);

            paymentPrefs = delegator.findByCondition("OrderPaymentPreference", con4, null, null);
        } catch (GenericEntityException gee) {
            Debug.logError(gee, "Problems getting entity record(s), see stack trace", module);
            result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_ERROR);
            result.put(ModelService.ERROR_MESSAGE, "ERROR: Could not get order information (" + gee.toString() + ").");
            return result;
View Full Code Here

Examples of org.ofbiz.entity.GenericDelegator.findByCondition()

            // Select all the unapplied payment applications associated to the billing account
            List conditionList = UtilMisc.toList(new EntityExpr("billingAccountId", EntityOperator.EQUALS, billingAccountId),
                                                  new EntityExpr("invoiceId", EntityOperator.EQUALS, GenericEntity.NULL_FIELD));
            EntityCondition conditions = new EntityConditionList(conditionList, EntityOperator.AND);

            List paymentApplications = delegator.findByCondition("PaymentApplication", conditions, null, UtilMisc.toList("-amountApplied"));
            if (UtilValidate.isNotEmpty(paymentApplications)) {
                Iterator paymentApplicationsIt = paymentApplications.iterator();
                while (paymentApplicationsIt.hasNext()) {
                    if (capturedAmount.compareTo(captureAmount) >= 0) {
                        // we have captured all the amount required
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.