Correct previous commit with remove empty file InvoiceEvents.xml, reoriented the function createInvoiceItemPayrol from InvoiceServices.groovy to new file InvoiceEvents.groovy
No functional change, review the code to down less it :
* Use groovy syntax
* Use DSL when is not use as it should
* Set EntityQuery List or First on multiple line
* use label and success(Map) DSL method
* Remove redundant or unnecessary variable instanciation
* Add missing variable type, for most ide analyser potential
(OFBIZ-12239)
After a fresh data base init with only seed, if you create your company without invoice or quote prefix, your sequence will be generate with 'null' string where the invoice or quote prefix should be have :
> null10001, null10002, ...
When we have multiple Payment (Net Days) terms on the invoice say
20% in 15Days (FIN_PAY_NETDAYS_1)
80% in 30Days (FIN_PAY_NETDAYS_2)
The terms section shows incorrect term data as shown in the screenshot.
Thanks: Nameet Jain for report and fix, Jacopo for confirmation
There are some inconsistencies in the code for string comparison statusId.equals(PRUN_COMPLETED) whereas it should be written as PRUN_COMPLETED.equals(statusId) cause the former can throw NullPointerException if the variable found to be NULL.
Thanks: Devanshu for your contribution.
This reverts commit faa59b325f.
It introduced 3 errors in testIntegration, in:
testGlPostingOnCancelCheckRun
testGlPostingsOnVoidPayment
testVoidPayment
Thanks: Devanshu Vyas for report and Rohit Koushal for the patch
Improved: Convert createPaymentAndApplication service from mini-lang to groovy DSL (OFBIZ-11484)
Thanks: Devanshu Vyas for report and Anushi Gupta for the patch
Sorry due to a bad handling there are 2 commits in one (squashed)
(OFBIZ-11485)
Done following:
- removed the mini-lang implementation of the service
- updated the service definition to point the groovy service
- added the groovy implementation of the service
* [Improved]: Use GroovyBaseScript's logging utility methods instead of using Debug
- Replaced the debug.log methods with the respective groovy utility method
- Enhanced the GroovyBaseScript to entertain the fetch the current class name as the module name for logging
- Overloaded the logError method to entertain throwbale object for better logging
- Removed unused import statements and module variables.
(OFBIZ-11762)
* [Removed]: Extra line spaces. (OFBIZ-11762)
* [Revert]: Unwanted changes. (OFBIZ-11762)
* [Added] Same changes to these files. (OFBIZ-11762)
Co-authored-by: Priya Sharma <priya.sharma@example.com>
* [Fixed] Create Payment service throws exception when receiving payment on order
- Since the MODULE variable could not be found, the service was throwing error
- Instead used the groovy method directly to print the log instead, which has access to the module variable implicitly.
- Removed the unused import as Debug class is not longer needed here.
(OFBIZ-11754)
* [Improved] The content groovy services to avoid the error in case we try to log a detail, since the module variable is not found. (OFBIZ-11754)
* Update ContentServices.groovy
* [Improved] Added error logs instead of info logs for service excpetions logging. (OFBIZ-11754)
Co-authored-by: Priya Sharma <priya.sharma@example.com>
Co-authored-by: Suraj Khurana <64310724+surajkhurana@users.noreply.github.com>
(OFBIZ-11064)
As we all know, Groovy is a powerful language with great built-in functions.
Groovy Truth[1] is one of them, which is not used properly in our code base.
We have used UtilValidate Class to validate arguments for Empty or NotEmpty,
which can easily be done in groovy with built-in functionality[1].
Current Code: if (UtilValidate.isNotEmpty(locations)) { ... }
Groovy Built-in Code: if (locations) { ... }
[1] - http://groovy-lang.org/semantics.html#Groovy-Truth
We need to careful for some points while we change this:
Like:
maxRetry = 0
if (!maxRetry)
{ // Not set, use a default maxRetry = -1 }
Because groovy evaluates zero to be false, it wouldn't be possible to set
maxRetry to zero. So it's best not to use groovy truth for null-checks on
numbers in some cases.
Thanks: Pawan Verma
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860051 13f79535-47bb-0310-9956-ffa450edef68