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
(OFBIZ-9986)
Convert services getNextInvoiceId, invoiceSequenceEnforced and invoiceSequenceRestart from minilang to groovy.
This is a subtask of OFBIZ-9350 Deprecate Mini Lang
Thanks to Leila Mekika for this issue
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1839778 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10249)
In some country (like european) you need to indicate on your sales invoice where you ship the finish good product related.
To help this case, I added a new worker function (InvoiceWorker.getShippingAddress) to found information from an invoice and improve the generic EditInvoice.groovy and the invoice ftl template to display it as example.
To homogenize postal address displaying with order I use the subscreen PartyScreens.xml#postalAddressPdfFormatter on the invoice ftl template
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835028 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10369)
The events contained in the controller configuration for first-visit, pre-post processor and before-after login are executed in arbitrary order rather than the defined order.
If we define an event configuration as follow:
<after-login>
<event name=keepCartUpdated type=java path=org.apache.ofbiz.order.shoppingcart.ShoppingCartEvents invoke=keepCartUpdated/>
<event name=restoreAutoSaveList type=java path=org.apache.ofbiz.order.shoppinglist.ShoppingListEvents invoke=restoreAutoSaveList/>
<event name=saveCartToAutoSaveList type=java path=org.apache.ofbiz.order.shoppinglist.ShoppingListEvents invoke=saveCartToAutoSaveList/>
</after-login>
We wait that OFBIz run keepCartUpdated, restoreAutoSaveList and after saveCartToAutoSaveList event but the HashMap who organise them return arbitrary order and can return saveCartToAutoSaveList, keepCartUpdated and restoreAutoSaveList. Convert the HashMap to LinkedHashMap help to keep the loaded order.
Thanks to Vikas Mayur for solve this issue
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1830301 13f79535-47bb-0310-9956-ffa450edef68
With the issue "Convert BudgetServices.xml mini lang to groovy" (OFBIZ-9985)
and issue "Implement Groovy test in testtools" (OFBIZ-9996)
I converted the related test AutoAcctgBudgetTests from minilang to groovy.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1816645 13f79535-47bb-0310-9956-ffa450edef68