So I uncommented the clean-downloads sub-target in the clean-all target
Also adds a description to clean-ivy
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1556174 13f79535-47bb-0310-9956-ffa450edef68
Simply add a geo point in FacilityLocation for now. Keeps the Jira issue open but resolved as incomplete, we will see later...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1555886 13f79535-47bb-0310-9956-ffa450edef68
https://issues.apache.org/jira/browse/OFBIZ-5457 for "Groovy error when initiating sales order creation for unkown partyId"
This error is generated when an unknown partyId is entered in the Customer field of the sales order entry form:
To resolve the issue, lines 60-63 of CheckInits.groovy should be wrapped in an IF block checking for the existence of the product variable previously assigned.
jleroux: Christian's patch did not apply but it was easy to do it by hand.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1555142 13f79535-47bb-0310-9956-ffa450edef68
And definitively fixes issues with i18n of geolocation
It introduces a "locale" attribute to the "set" operation in widget (I only tested screen, form is quite similar, should be ok) and minilang.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1554681 13f79535-47bb-0310-9956-ffa450edef68
What I did:
Upgraded from Google Maps API 2 to 3, which also means removing the keys in general.properties. They are no longer needed in API-3 (at least for our demo and local test uses), one worry less!
Refactored Google Maps code in geolocation.ftl: put more things in common, simplified code (the API-3 is better from this POV).
For OpenLayers, due to most browsers now rejecting mixed content (HTTP vs HTTPS), I had to follow their advice and put OpenLayers-2.13.1.js + images and theme(finally not used) in the framework. Not a big deal in term of size but again one more lib to worry about. Anyway geolocation is not vital for OFBiz. I have also added a zoom and navigation widget in maps. Note that IE warns about mixed content, but you can bypass it.
While working on editGeoLocation (in Party) I noticed it does not update the elevation. I found it was possible http://www.daftlogic.com/sandbox-google-maps-find-altitude.htm but I did not implement it, lack of time...
Also I got once a NPE in CallSimpleMapProcessor (when using editGeoLocation) but was unable to reproduce (w/o changes before and after)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1554536 13f79535-47bb-0310-9956-ffa450edef68
Example: Consider two promotions:
* consider two products: Product A, with price $20, and Product B, with price $40
* Promotion 1: 20% discount on all the products in a category containing Product A and Product B
* Promotion 2: 40% discount on Product A
When Product A and Product B are both in the cart:
* Expected behavior: on Product A the Promotion 2 should be applied i.e. 40% discount, and on Product B Promotion 1 should be applied i.e. 20% discount.
** Summary
Product Price Discount Subtotal
A $20 $8 (40% discount) $12
B $40 $8 (20% discount) $32
Total Adjustment: $16
* OFBiz behavior (before this fix): Promotion 1 is applied to Product A and Product B; this happens because the total discount of Promotion 1 is greater than the total discount of Promotion 2 and OFBiz applies promotions sorted by discount (desc)
** Summary
Product Price Discount Subtotal
A $20 $4 (20% discount) $16
B $40 $8 (20% discount) $32
Total Adjustment: $12
The new solution fixes this issue and similar ones.
Here are some details about the new algorithm.
Overview of the flow:
1) run the promotions one by one in a test run
2) collect the ProductPromoUse information
3) sort them by weight (i.e. the ratio between the discount and the value of the products discounted)
4) execute the ProductPromoUse in the given order
In order to understand this solution, and specifically the changes to ProductPromoWorker.java, there is an important concept to consider:
one Promotion can generate more than one ProductPromoUseInfo objects.
For example if I have 2 units of WG-1111 in the cart (in one cart item) and I have the promotion “20% discount on WG-1111 and GZ-1000” then the system will create TWO ProductPromoUseInfo objects both associated to the same promotion one for each of the 2 units discounted.
Similarly if I had two lines: 2 units of WG-1111 and 1 unit of GZ-1000 I would get 3 ProductPromoUseInfo objects 2 objects for WG-1111 and 1 object for GZ-1000
We can sort these ProductPromoUseInfo objects based on their weight (i.e. the ratio between the discount and the value of the products discounted) in desc order
and now we have a sorted list of ProductPromoUseInfo objects ready to be executed
However we only want to execute each of them once and for this reason we set (in memory, not in the DB) the useLimitPerOrder to 1 in the first ProductPromoUseInfo of a given promotion and then to 2 if the same ProductPromoUseInfo is associated to the same promotion etc...
in this way the end result is that the system will generate, as we desire, ONE ProductPromoUseInfo only for each of the ProductPromoUseInfo in the list.
Here is an example:
we have 2 promotions:
PROMO A
PROMO B
After test run:
ProductPromoUseInfo - PROMO A - #1 - weight 0.3
ProductPromoUseInfo - PROMO A - #2 - weight 0.3
ProductPromoUseInfo - PROMO B - #1 - weight 0.4
After sorting:
ProductPromoUseInfo - PROMO B - #1 - weight 0.4
ProductPromoUseInfo - PROMO A - #1 - weight 0.3
ProductPromoUseInfo - PROMO A - #2 - weight 0.3
Based on this we create a list (sortedExplodedProductPromoList) of ProductPromo:
PROMO B - with useLimitPerOrder=1
PROMO A - with useLimitPerOrder=1
PROMO A - with useLimitPerOrder=2
When we apply these to the cart we get the following results:
PROMO B - with useLimitPerOrder=1 APPLIED
PROMO A - with useLimitPerOrder=1 APPLIED
PROMO A - with useLimitPerOrder=2 NOT APPLIED (because PROMO B used the item)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1554265 13f79535-47bb-0310-9956-ffa450edef68
So I revert them for now, they are not needed yet for the INFRA-3590 progresses anyway, only the portoffset parameter is needed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1553975 13f79535-47bb-0310-9956-ffa450edef68
This was waiting for a moment in my working copy after I found that there was an issue with testSOAPSimpleService when portoffset was used with run-tests target.
I have still no resolved this issue, but since I got a better way to run simultaneous Buildbot instances this is no longer an issue for run-tests target.
So I commit these small pending changes in order to allow to run Sonar on OFBiz https://issues.apache.org/jira/browse/INFRA-3590.
The cobertura target does not work yet but what's committed here is needed anyway to progress with INFRA-3590.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1553962 13f79535-47bb-0310-9956-ffa450edef68
IMPORTANT: This commit might break some applications. If you get ClassCastExceptions, then you need to change the field type in your entity from blob to either byte-array or object. The change will have no effect on your database - because they are all persisted as BLOB SQL types.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1553890 13f79535-47bb-0310-9956-ffa450edef68
The method "renderLink" of new class MacroMenuRenderer calls the WidgetWorker.determineAutoLinkType. When menuItem.getDisabled() is true, the link target will be set to null and NPE occurs.
jleroux: This was related with r1517353 and r1537833. The Leon's patch fixes r1517353 and this commits also reverts r1537833
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1553887 13f79535-47bb-0310-9956-ffa450edef68
It does not make sense to allow entering an inventoryItemId. It is and must be generated by the system anyway (to prevent collisions)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1552908 13f79535-47bb-0310-9956-ffa450edef68
ShipBeforeDate/ShipAfterDate of ship groups are displayed incorrectly on the shipping options page of the Customer Order Entry app. The dates is set correctly but the shipping options page does not get the shipping date by shipGroupIndex. Instead it gets the shipBeforeDate/shipAfterDate of the order item. The page should be changed to get the dates by passing in the shipGroupIndex: cart.getShipAfterDate(shipGroupIndex)
To reproduce
1. Create new order for DemoCustCompany
2. Add productId "GZ-BASKET" with quantity 10
3. Click "Finalize Order" link
4. Click "Create New Ship Group" button on Shipping page and then click "Continue" link
5. Assign 5 of GZ-BASKET to Ship Group 2 and click "Continue" link
6. Select shipping methods and set shipBeforeDate/shipAfterDate and click "Continue" link
7. Click the "Options" link to return to previous ship options page
8. Notice the dates of the second ship group are incorrectly set to the same values as the date of the first ship group
jleroux: Christian's patch was reversed, with his comment I eventually got the idea
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1552901 13f79535-47bb-0310-9956-ffa450edef68
OFBiz return services (OrderReturnServices.java - createReturnAdjustment) contains a bug when generating the Return Adjustments based on the Order Adjustments.
The bug is it is ignoring the 'overriding amount' entered on the screen.
For example If an order has an Shipping Charge Order Adjustment in the amount of 7.95 and from the screen the cleint wants to return only 5.95 (override), the return services ignores the 5.95 entry and returns the full 7.95.
jleroux: I removed a BigDecimal amount declaration which was conflicting
I formatted the if block
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1552290 13f79535-47bb-0310-9956-ffa450edef68
Actually the right thing to do should be to work on migrating all freemarker templates in backend to widgets and using target-type="inter-app" for those. I know Adrian has opened a Jira for that, next task in my TODO list.
Without this effort we will never be able to style the backend uniformly, notably in custom projects...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1552149 13f79535-47bb-0310-9956-ffa450edef68