(OFBIZ-9567)
Changes a division with two long variables whose result was casted into a double
Now it performs a proper double division
Thanks: Dennis Balkir (and FB ;))
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804656 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9566)
MainResourceHandler
The protected fields were set to private since the class is not extended
anywhere. If they need to be accessed in the future, getter that return an
unmodifiable version should be implemented (Collections.unmodifiableXXX).
Refactor:
Uses multi exceptions catch (explicitly to not catch, hence somehow swallow,
RuntimeException)
Uses return instead of else when appropriate
Extracts a getLoader() handy method
Removes an useless thrown exception in invalidateDocument()
Removes an useless Document cast
Removes an useless ResourceLoader null initialisation
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804639 13f79535-47bb-0310-9956-ffa450edef68
When reviewing code, Eclipse complains: "Javadoc: Invalid param tag name"
when a param tag name "contains" a colon at end
Weirdly it does not complain about @return. Go figure! But I'll apply the same!
This removes all cases found in trunk. Another way could be to add a space
between the tag and the colon. But that's not how it's recommended to write
http://www.oracle.com/technetwork/articles/java/index-137868.html
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804637 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9563)
Fixes some diamond operators
ComponentContainer.java
deleted multiple unnecessary nullchecks
added nullcheck, because sortedComponentNames could possibly be assigned as
null through the method list()
ContainerConfig.java
deleted multiple unnecessary else-blocks
deleted two initializations to shorten the code and return the value directly
Thanks: Dennis Balkir
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804636 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9562)
Fixes some diamond operators
Implementes equals method to fix potential problems
Implementes hashCode method because I implemented equals method
Implementes timeDiff method to keep the code DRY
Thanks: Dennis Balkir
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804634 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9564)
Implemented method hashCode() because method equals() was implemented
Changed Exception to RuntimeException because no exception was thrown and the
only occurring exception could be a runtimeexception
Thanks: Dennis Balkir
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804556 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9368)
As suggested by Jacques and Pierre, the patch includes removing all the traces
of OEMPartyId (manufacturerPartyId) as it was some old approach.
Changes in Patch:
1. Removed manufacturerPartyId from Product entity
2. Removed its relations from view entities namely GoodIdentificationAndProduct
3. Removed it from forms EditProduct (Product),
SearchInventoryItemsParams (EditFacilityInventoryItems screen in Facility) and
SearchInventoryItemsDetailsParams (ViewFacilityInventoryItemsDetails screen in
Facility)
Thanks: Aditya Sharma
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804408 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-5701)
jleroux: Kieuanhvu's explanation was not totally clear. So I rather provide
Renuka Srishti's at OFBIZ-9428 "getResultsSizeAfterPartialList() return wrong
count with distinct() for View Entity"
Here is the code sample to test the issue:
EntityListIterator productAssocListItr = null;
productAssocListItr = from("ProductAndAssoc").distinct().queryIterator();
productAssocListSize = productAssocListItr.getResultsSizeAfterPartialList();
productAssocListSize will differ from the actual distinct records in the
ProductAndAssoc View Entity.
This issue exists because it gives distinct records on the basis of the
first column in the table.
Thanks: Kieuanhvu for the patch, Renuka Srishti for a clear explanation and a
simple way to test (in a groovy for me)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804319 13f79535-47bb-0310-9956-ffa450edef68
Updated label from remove to expire while removing security group from user login, also added new entity-auto service to expire user login security group record.
Thanks S. Yazied for reporting the issue.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1803561 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9519)
Created a new UiLabel for success message and returned it from 'updateQuote' service.
Thanks Aditya Sharma for reporting and thanks Sonal Patwari providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802972 13f79535-47bb-0310-9956-ffa450edef68
When you call run service with groovy, you need to be sure that all parametes are good for the service call.
This improvement simplify this dsl with an automatic parameters check so you can call directly like that
run service : createProduct, with: context
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802798 13f79535-47bb-0310-9956-ffa450edef68
minimum quantity and have with pending approved purchase orders.
(OFBIZ-9526)
With this change the requirements to replenish the inventory up to the minimum
stock quantity is generated, if needed, only when the first demand event is
processed or at the end.
Thanks: Amit Gadaley for the help in recreating the issue and testing the fix.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802766 13f79535-47bb-0310-9956-ffa450edef68
Applied slightly modified patch from jira issue OFBIZ-8273.
productionruntests test was failing, this will fix the test case.
Thanks Devanshu for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802755 13f79535-47bb-0310-9956-ffa450edef68
The warning message generated by OFBiz is a false positive caused by the fact that the way OFBiz performs the check is too simplistic: OFBiz parses for the content of the "()" in the fieldtype mapping and assumes that it is the column size.
However, in MySQL and possibly other database management systems, this is only true for varchar field definitions but not for datetime fields.
The column size for DATETIME(3) is not 3.
We should probably refactor the code in DatabaseUtil to compare the SQL field type from the JDBC driver, if possible to retrieve, (i.e. from the database) with the whole content (without any sting manipulation) of the attribute sql-type of the element field-type-def type (in fieldtype*.xml) i.e. "DATETIME(3)"; if they differ then a warning should be printed.
In this way we will have a more generic, simpler and more reliable tool to spot differences in the database
This is a workaround to fix the warning.
Thanks Jacopo.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802693 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-7275)
The issue exists because in role type list there are multiple occurrences of substring "CUSTOMER". The existing check was just checking the occurrence of a substring in the string and found this value more than once in the list so the last option gets selected. Applied equality check to find the exact match.
Thanks Aditi Patidar for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802690 13f79535-47bb-0310-9956-ffa450edef68
Add a new option presentation none for the lookup element to don't display the link for display the search form bu only use autocompletion.
In the initial path from Pierre Gaudin the presentation name was autocompletion-only but I prefer change it to none because the link is just not preent.
Thanks Pierre Gaudin for this proposal and patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802682 13f79535-47bb-0310-9956-ffa450edef68
Additional Details:
I noticed a couple of code improvements on product config current code. Here is the reference:
- In ProductConfigWorker.fillProductConfigWrapper() method, currently, we only check parameters map, while it is possible in a business environment that user can submit required fields values in request attributes as well. So here getCombinedMap method can be used to make it more efficient.
- While calling constructor of ConfigOption (ConfigOption(ConfigOption co)), some private members should also be copied, like componentOptions etc.
Thanks Suraj for the contribution
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802681 13f79535-47bb-0310-9956-ffa450edef68