Commit Graph
27737 Commits
Author SHA1 Message Date
Ashish Vijaywargiya 81c72ef13a Adding new User Security Group so if needed we can only assign work effort component to any user.
Thanks Amit for the contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042953 13f79535-47bb-0310-9956-ffa450edef68
2010-12-07 09:58:28 +00:00
Ashish Vijaywargiya d3ae217e07 Bug fix. The workeffort group WORKEFFORT_USER was not associated with WORKEFFORTMGR_VIEW so if you assign this group to any user then you can see or login into workeffort application. This is similar pattern that exists in accounting, partymgr & accounting component.
Thanks Amit.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042950 13f79535-47bb-0310-9956-ffa450edef68
2010-12-07 09:50:08 +00:00
David E. Jones d60edd5bb4 Fixed NPE in tax calculation when no ProducePrice record matches the tax calc constraints
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042884 13f79535-47bb-0310-9956-ffa450edef68
2010-12-07 01:12:18 +00:00
David E. Jones 5eb7d80579 Small fix so that the new VAT_TAX adjustments are removed when updating an order through the ShoppingCart
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042834 13f79535-47bb-0310-9956-ffa450edef68
2010-12-06 22:54:51 +00:00
Andrew Zeneski 0c211fb4e9 implemented option to specific a specific entity should NOT be checked; no columns are to be updated and ignore any warning about fields, relations, keys, etc. This is useful when an entity is defined based on a database view; the view may not (or probably will not) appear in the table meta data and any attempt to auto-create the entity will (or should) fail.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042792 13f79535-47bb-0310-9956-ffa450edef68
2010-12-06 21:07:48 +00:00
David E. Jones 463c300fc5 Implemented alternative way of saving ProductPrices with tax included in the price, and then calculating VAT tax as an exclusive instead of inclusive amount that goes on a new field on OrderAdjustment; also added a method to OrderReadHelper to get tax for display; there are various changes to service descriptions and entity fields to describe these changes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042542 13f79535-47bb-0310-9956-ffa450edef68
2010-12-06 08:05:44 +00:00
Jacques Le Roux 36fc11068e A patch from Anne Jessel "Wrong product displayed as associated product" (https://issues.apache.org/jira/browse/OFBIZ-4023) - OFBIZ-4023
To reproduce:
    * add two associated products to a main product, both with "Complementary or Cross-Sell" association type
    * view the main product in ecommerce

Expected behaviour: the two associated products are listed near the bottom of the page
Actual behaviour: two products are listed at the bottom of the page, but only one of them is an associated product. The other is the main product.
The problem is caused by the value of a freemarker variable changing at a point where other freemarker code assumes the variable does not change. The execution path is complicated.
The patch fixes the problem by saving the value of the key variable into another variable, and restoring it later. However I do wonder if there is a better solution.

JLR: I did not try to find a better solution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042411 13f79535-47bb-0310-9956-ffa450edef68
2010-12-05 19:09:57 +00:00
Jacques Le Roux 9679d72618 A patch from Anne Jessel "Is Empty for text-find widget broken" (https://issues.apache.org/jira/browse/OFBIZ-4025) - OFBIZ-4025
To reproduce:
    * go to Facility, Inventory Items tab (or any form that uses text-find widget)
    * choose "Is Empty" from drop-down next to Product Id
    * click Find button

Expected behaviour: no matching items listed, as all items have a Product Id.
Observed behaviour: all items match.

Problem is caused by find code assuming that there is no entity condition to be created if the text field is empty, but of course Is Empty is
different to the other operators in that the text field is expected to be empty.

The attached patch adds a special check for the Is Empty operator.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042396 13f79535-47bb-0310-9956-ffa450edef68
2010-12-05 18:43:44 +00:00
Jacques Le Roux 142f457420 A patch from Eric de Maulde "Product Store Email Setting with PARTY_EMAI" (https://issues.apache.org/jira/browse/OFBIZ-4027) - OFBIZ-4027
Product Store Email Setting page doesn't allow to configure an email from emailType = PARTY_EMAIL
So when an anonymous contact posts a message, an automated email isn't sent to the store payToPartyId

This patch add other choices (PARTY_EMAIL type) into the drop down email list, for the Product Store Email Setting page

JLR: I can't see any issues adding this OOTB, tough maybe it could be constrained more (using one of the enumId of PARTY_EMAIL)? BTW It's not a bug

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042360 13f79535-47bb-0310-9956-ffa450edef68
2010-12-05 14:30:08 +00:00
Jacques Le Roux 8cf126e7f5 A patch from Anne Jessel "Collapse all broken if hyperlink in pane" (https://issues.apache.org/jira/browse/OFBIZ-4022) - OFBIZ-4022
To reproduce the bug:
    * edit the EditProduct form in applications/product/widget/catalog/ProductForms.xml
    * add a new field with a hyperlink sub-element.
    * refer to this new field in the first, non-collapsible field-group in the sort-order
    * go to this page in the UI (edit a product in the catalog)
    * the Expand All and Collapse All buttons do not work properly

The problem is caused by the javascript finding the added hyperlink field in the first field-group, and incorrectly assuming it is
the expand/collapse link for the field-group. This causes the javascript to crash when it gets a null reference to an enclosing li element.

It is not specific to the EditProduct form, but applies to any group of collapsible panes where one contains a hyperlink.

The attached patch simply checks that the li element actually exists.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042348 13f79535-47bb-0310-9956-ffa450edef68
2010-12-05 13:37:07 +00:00
Jacques Le Roux 3c8c13dc5a Fix a bug reported by Paul Foxworthy at OFBIZ-4042 "ecommerce keyword search - Non-breaking space displayed as literal ampersand-nbsp-semicolon"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042317 13f79535-47bb-0310-9956-ffa450edef68
2010-12-05 11:37:06 +00:00
Scott Gray f4159d4294 In GenericDAO.selectListIteratorByCondition(...) the order of the select fields wasn't being maintained. This causes problems later on if the EntityListIterator needs to perform a count query where the select field ordering is important for distinct queries (particularly for the likes of postgres which doesn't support SELECT COUNT(DISTINCT *) which can result if the first field is an aggregate).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042280 13f79535-47bb-0310-9956-ffa450edef68
2010-12-05 04:26:43 +00:00
Bruno Busco 25965626af Reverted revision 1042196 as suggested by Adam.
This change introduces framework dependencies from applications.
More work is needed to the patch in https://issues.apache.org/jira/browse/OFBIZ-4037 before committing again.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042250 13f79535-47bb-0310-9956-ffa450edef68
2010-12-04 22:29:33 +00:00
Ashish Vijaywargiya dd63911d92 Bug fix - Typo - ORDER_COMPLETE -> ORDER_COMPLETED. ITEM_COMPLETE -> ITEM_COMPLETED.
This was causing issue and was not changing the PO line items status to completed one when order comes into complete status.

Thanks Pranay & Amit!

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042222 13f79535-47bb-0310-9956-ffa450edef68
2010-12-04 18:36:11 +00:00
Bruno Busco 587e93ba82 https://issues.apache.org/jira/browse/OFBIZ-4037
Moved the feature that allows a new user to register for an account from MyPortal to the framework so that it is available in any application.
It has also been slightly reworked (code cleaning and internationalization).
Two flags in general.properties allows to configure if the register function must be enabled or not and if the captcha function should be used.
The captcha function needs to be improved because at the moment the code is contained in an hidden field so that it is very easy for a computer to bypass it.
A possible fix for this could be to put the MD5 coding of the captcha code in the hidden field.
Then the event that checks the code should compare the MD5 codes.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042196 13f79535-47bb-0310-9956-ffa450edef68
2010-12-04 14:58:18 +00:00
Jacques Le Roux 926e791e36 A suggested change by Patrick Antivackis "Shopping Cart Item issue with BigDecimal " (https://issues.apache.org/jira/browse/OFBIZ-4038) - OFBIZ-4038
In applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
the setQuantity method should use this.quantity.compareTo(quantity) == 0 instead of this.quantity==quantity like depicted below

   protected void setQuantity(BigDecimal quantity, LocalDispatcher dispatcher, ShoppingCart cart, boolean triggerExternalOps, boolean resetShipGroup, boolean updateProductPrice, boolean skipInventoryChecks) throws CartItemModifyException {
       if (this.quantity == quantity) {            return;        }

The issue is really visible when the cart is fully loaded (lot of products) as the return will never occur and the store is configurerd in an autosavecart mode.

For example a cart with 48 products will take very long time to process for each additem or modifycart event.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042188 13f79535-47bb-0310-9956-ffa450edef68
2010-12-04 14:19:07 +00:00
Bruno Busco b6e2886778 No funtional changes. Only code formatting.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042136 13f79535-47bb-0310-9956-ffa450edef68
2010-12-04 10:51:59 +00:00
Bruno Busco e20f900808 Changed several ecommerce ftl files rendering screenlets so that the HTML is the same as the one that is rendered by the screenlet widget.
Added screenlet styles to the ecommain.css
Added several missin screenlet-body tags.
This allows better and more omogeneus rendering when mixing together FTL and screenlet widgets.
To be continued...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042133 13f79535-47bb-0310-9956-ffa450edef68
2010-12-04 10:34:47 +00:00
Jacques Le Roux 0047d57c15 The rounding is already present in the divide operation, so the additional setScale wasn't necessary. Thanks to Scott on dev ML
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042132 13f79535-47bb-0310-9956-ffa450edef68
2010-12-04 10:32:18 +00:00
Jacques Le Roux 55bf8c5419 A patch from Mirko Vogelsmeier "Added Labels for Option-fields in FindProductPromoCode.ftl" (https://issues.apache.org/jira/browse/OFBIZ-4034) - OFBIZ-4034
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042038 13f79535-47bb-0310-9956-ffa450edef68
2010-12-03 22:43:53 +00:00
Jacques Le Roux 0e73bcfb62 A suggested change by Jeremy Wickersheimer "Rounding error in prorating returned adjustments" (https://issues.apache.org/jira/browse/OFBIZ-4038) - OFBIZ-4038
The error is in applications/order/src/org/ofbiz/order/order/OrderReturnServices.java the getAdjustmentAmount method is prorating using this code:

newAmount = returnTotal.divide(originalTotal, decimals, rounding).multiply(amount).setScale(decimals, rounding);

it should be:

newAmount = returnTotal.multiply(amount).divide(originalTotal, decimals, rounding);

else by dividing first what should be for example 1/3 of the adjustment ends up being 0.33

JLR: I have added the setScale part

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042034 13f79535-47bb-0310-9956-ffa450edef68
2010-12-03 22:34:06 +00:00
Jacques Le Roux c8d757a6af A patch from Anne Jessel "Improve handling and display of additional product images" (https://issues.apache.org/jira/browse/OFBIZ-4024) - OFBIZ-4024
This patch adds several closely-related features, intended to improve the display of products and their images in the ecommerce webapp.

When additional images for a product are uploaded via the Catalog, the scaled versions that were already being created in service addAdditionalViewForProduct are now recorded as ProductContent. This makes them easily available for use elsewhere.

New ProductContentType values were added to identify these content types. The obviously consistent string to use for these was too long, and so I had to choose something less consistent, but shorter and hopefully still clear. I used XTRA instead of ADDITIONAL.

The sizes to which additional images are rescaled has been changed, so they better fit in the ecommerce display. Relevant sizes in productdetail.ftl have been updated to match these sizes.

The ecommerce product display now uses the scaled additional images if available, rather than relying on the web browser to scale the images.

When displaying a single product in ecommerce, the main image is larger than the additional images. Hovering over an additional image displays a larger version in place of the main image.

Clicking on an additional image displays a popup with a detailed version of the image.

To use the new features, one or more large images (suggest at least 600x600) should be attached as additional images to a product, using the form on the bottom of the content tab for a product in Catalog. Viewing the product in ecommerce should then exhibit the above behaviour.

I have tried to maintain backwards compatibility, so that products with the old-style use of additional images will continue to display as they did previously. This means some of the code is not as streamlined as it might be.

JLR: You might prefer to keep the old ImageProperties.xml values...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042024 13f79535-47bb-0310-9956-ffa450edef68
2010-12-03 22:05:19 +00:00
Jacques Le Roux c809b35097 Fixes an issue reported by Erwan at OFBIZ-4008 "displaying promoText in finalizeOrder is wrongly done"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042009 13f79535-47bb-0310-9956-ffa450edef68
2010-12-03 21:18:53 +00:00
Hans Bakker 753f0ec36a allow a user to make his uploaded files public y/n
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1041305 13f79535-47bb-0310-9956-ffa450edef68
2010-12-02 08:31:59 +00:00
Hans Bakker 4453ba3814 correct conversion error by changing the service definition field format from long to bigdecimal, was only used in create/update billing account term screens
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1041289 13f79535-47bb-0310-9956-ffa450edef68
2010-12-02 06:40:11 +00:00
Jacques Le Roux 183850ba5c Fix a typo (bad formatting) reported by Adam on dev ML
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1041135 13f79535-47bb-0310-9956-ffa450edef68
2010-12-01 19:12:52 +00:00
Hans Bakker 6cab58f905 change all @yahoo.com to @example.com Suggestion from Scott
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040914 13f79535-47bb-0310-9956-ffa450edef68
2010-12-01 09:38:00 +00:00
Hans Bakker 4a9ea51f54 allow single pieces and boxes with a numkber of pieces share the same inventory location but can however be sold at optionally different prices. More explanation will be given in the new feature list of december 2010. Contribution of tukkata.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040908 13f79535-47bb-0310-9956-ffa450edef68
2010-12-01 09:26:47 +00:00
Jacques Le Roux 9b75d04f7e A patch from Felice Romano "NPE when calling org.ofbiz.entity.model.ModelEntity.getTableName(null)" (https://issues.apache.org/jira/browse/OFBIZ-4040) - OFBIZ-4040
When "table name" is required to a "model entity" object, it throws a NPE if "datasource info" object is null. 

JLR: I'm not quite sure in which occasions this fix is needed OOTB, but anyway it's safer indeed.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040890 13f79535-47bb-0310-9956-ffa450edef68
2010-12-01 08:29:21 +00:00
Jacques Le Roux b0cd0dfbd4 Fix wrong indentation on Adam's remark on dev ML.
No functional changes

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040887 13f79535-47bb-0310-9956-ffa450edef68
2010-12-01 08:21:13 +00:00
Hans Bakker 3d2fc9f2fc add support email address to the company for demo purposes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040878 13f79535-47bb-0310-9956-ffa450edef68
2010-12-01 06:57:27 +00:00
Hans Bakker f05c14073d add an default purpose parameter to the getPartyEmail service to allow the selection of a specific purpose email
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040867 13f79535-47bb-0310-9956-ffa450edef68
2010-12-01 03:37:46 +00:00
Anil Patel 15bb00bbc6 Simplified code in EditShipment screen. Its real simple screen but had some really complex code. Ftl was not needed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040865 13f79535-47bb-0310-9956-ffa450edef68
2010-12-01 03:11:44 +00:00
Adam Heath 86b3d1d577 Add some calcAndAddTax variants that allow ship groups without an
address to be skipped.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040836 13f79535-47bb-0310-9956-ffa450edef68
2010-12-01 00:19:19 +00:00
Adam Heath 50e04ed280 Add helper method on CartShipInfo to clear all tax info, on the group
and its items.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040835 13f79535-47bb-0310-9956-ffa450edef68
2010-12-01 00:19:13 +00:00
Adam Heath db80ed5260 Oops, fix errant paste into wrong line, </td> was placed inside the
</#if>, instead of outside.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040834 13f79535-47bb-0310-9956-ffa450edef68
2010-12-01 00:19:06 +00:00
Adam Heath d241a1049a Fix several xml files that had DOS line endings; converted them to UNIX,
so that on fresh checkouts they will be auto-converted to native.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040833 13f79535-47bb-0310-9956-ffa450edef68
2010-12-01 00:15:17 +00:00
Adam Heath c63b8db8be When addSuggestionsToShoppingList was called with a non-existant
shoppping list, and it tried to create a new one(based on auto-save), it
wasn't passing the productStoreId to the service.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040805 13f79535-47bb-0310-9956-ffa450edef68
2010-11-30 22:04:23 +00:00
Adam Heath 3f8df78fea Fix some missing " in attribute value definitions.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040804 13f79535-47bb-0310-9956-ffa450edef68
2010-11-30 22:04:16 +00:00
Adam Heath f0cd365956 Allow optimizeForLargeRuleSet to be specified when calling
calculateProductPrice; previously, it was always hard-coded to false.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040803 13f79535-47bb-0310-9956-ffa450edef68
2010-11-30 22:04:11 +00:00
Adam Heath 6cf143c8db If the last item of an approved order is cancelled, and a new item is
then added, the orderItemSeqId would be reused.  This is because
OrderReadHelper.getValidOrderItems() does not return cancelled/rejected
items, so the loop to find the highest orderItemSeqId wouldn't consider
them.  This means we have to loop over all items, to find the highest
value, then skip the invalid ones locally.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040802 13f79535-47bb-0310-9956-ffa450edef68
2010-11-30 22:04:04 +00:00
Adam Heath b1fbc9800d Remove uses of delegator.findByPrimaryKey(Cache)?, and replace with findOne.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040801 13f79535-47bb-0310-9956-ffa450edef68
2010-11-30 22:03:58 +00:00
Adam Heath 58a261d393 Fix method updateProductWithReviewRatingAvg, it wasn't storing the productId correctly.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040800 13f79535-47bb-0310-9956-ffa450edef68
2010-11-30 22:03:51 +00:00
Adam Heath 3f8ba48174 Make use of several copy() helper methods in UtilIO; these methods all use an internal buffer, instead of the old code that copied 1 byte or 1 character at a time.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040799 13f79535-47bb-0310-9956-ffa450edef68
2010-11-30 22:03:46 +00:00
Adam Heath 192418385b Several utility methods for copying streams and
readers/writers/appendable.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040798 13f79535-47bb-0310-9956-ffa450edef68
2010-11-30 22:03:40 +00:00
Adam Heath b42218b540 The poster of a review(UserLogin) may not have a party attached, so
protect against a NPE.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040797 13f79535-47bb-0310-9956-ffa450edef68
2010-11-30 22:03:34 +00:00
Adam Heath 4b9c6d3fca postedPerson can be null(because no userLogin was attached to the
review), so protect against its access.  What would happen is when no
userLogin was available for the review, the table cell would not be
rendered, and the rest of the row cells would shift.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040796 13f79535-47bb-0310-9956-ffa450edef68
2010-11-30 22:03:29 +00:00
Adam Heath 9e4d9718f2 There is a race condition during shutdown, where the ofbiz java process
is no longer up, and responding to status requests, but the jsvc process
that managed the pid file has not yet stopped.  This means that the
existance test of the pidfile may succeed, but the removal of the
pidfile will fail, as the jsvc process itself removes it.  So, do a
forced removal, which then allows the rm to succeed, and the init script
no longer exits early.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040795 13f79535-47bb-0310-9956-ffa450edef68
2010-11-30 22:03:23 +00:00
Adam Heath 5c90b0507e When compiling, don't include the ant runtime classes; this makes the
compiled output more stable, and not depending on any random included
ant support libs.  If any are needed, they need to be explicitly added.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040794 13f79535-47bb-0310-9956-ffa450edef68
2010-11-30 22:03:19 +00:00
David E. Jones f2dff15007 Undo part of the changes from Hans in rev 1037624 which caused the system to reset the delegator to the base delegator and ignore the user's specified tenant
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040651 13f79535-47bb-0310-9956-ffa450edef68
2010-11-30 17:35:05 +00:00