Commit Graph
717 Commits
Author SHA1 Message Date
Mathieu Lirzin 9bc8ebb864 Improved: Remove useless ‘GroovyScriptTestCase’
(OFBIZ-11165)

This class was useless since ‘GroovyScriptTestCase’ provides the same
interesting feature as ‘OFBizTestCase’ meaning a delegator and a dispatcher.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1865787 13f79535-47bb-0310-9956-ffa450edef68
2019-08-23 18:02:42 +00:00
Mathieu Lirzin 9b68a55d64 Improved: Compile groovy integration tests
(OFBIZ-11165)

Since there is no need for dynamic reload for integration tests,
it is better to compile Groovy tests.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1865786 13f79535-47bb-0310-9956-ffa450edef68
2019-08-23 18:00:01 +00:00
Mathieu Lirzin e9a56a78e5 Improved: Inline ‘UtilGenerics#checkList’
(OFBIZ-11141)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1863501 13f79535-47bb-0310-9956-ffa450edef68
2019-07-20 16:35:13 +00:00
Mathieu Lirzin 83fd20607b Improved: Inline ‘UtilGenerics#checkMap’
(OFBIZ-11141)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1863500 13f79535-47bb-0310-9956-ffa450edef68
2019-07-20 16:32:34 +00:00
Mathieu Lirzin ffe2e7ffdf Improved: Add missing ‘static’ modifier for private methods
(OFBIZ-11098)

In order to make it clear when a method is not depending on the
internal state of an object, it is a good practice to declare it as
static.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860937 13f79535-47bb-0310-9956-ffa450edef68
2019-06-10 12:27:40 +00:00
Mathieu Lirzin b37e315aef Improved: Use the ‘@Override’ annotation
(OFBIZ-10939)

The ‘@Override’ annotation helps readers understand that the method at
hand is overriding a super class or implementing an interface.
Additionally it allows the compiler to check if the methods annotated
with ‘@Override’ are actually implementing an abstract method.

Using that annotation makes ‘@see foo.bar.ParentClass#myMethod’
comments useless, so those they have been removed for the newly
annotated methods.

Thanks Jacques Le Roux and Swapnil M Mane for acknowledging the commit.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858295 13f79535-47bb-0310-9956-ffa450edef68
2019-04-27 19:34:25 +00:00
Suraj Khurana 1536319710 Improved: Used ObjectType.simpleTypeConvert for all amount variables to make sure proper type conversion in PaymentGatewayServices.java.
(OFBIZ-10811)
Thanks Jacques Le Roux for the review and Deepak Dixit for the initial idea.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858239 13f79535-47bb-0310-9956-ffa450edef68
2019-04-27 05:43:52 +00:00
Mathieu Lirzin 990c8a3aab Improved: Remove redundant specification of type arguments
(OFBIZ-10937)

Since Java 1.7, when defining generic types it is unnecessary to
redefine those types in the constructor when it is done in the
declared type.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857906 13f79535-47bb-0310-9956-ffa450edef68
2019-04-21 12:49:52 +00:00
Mathieu Lirzin e34434000b Fixed: Remove unnecessary semicolons in Java code (OFBIZ-10936)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857904 13f79535-47bb-0310-9956-ffa450edef68
2019-04-21 10:55:18 +00:00
Mathieu Lirzin d5e3c2d3d4 Improved: Remove redundant null checks (OFBIZ-10911)
Redundant null checks detected by Eclipse has been removed.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857896 13f79535-47bb-0310-9956-ffa450edef68
2019-04-21 09:37:49 +00:00
Mathieu Lirzin a15b7b1996 Reverted: Changes done at r#1857089 and r#1857090 (OFBIZ-10911)(OFBIZ-10912)
The Cleanups introduced by those revisions has introduced some
unexpected regressions making the Gradle ‘loadAll’ task fail.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857091 13f79535-47bb-0310-9956-ffa450edef68
2019-04-07 23:36:29 +00:00
Mathieu Lirzin d639aba7e7 Improved: Remove redundant null checks (OFBIZ-10911)
Redundant null checks detected by Eclipse has been removed.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857089 13f79535-47bb-0310-9956-ffa450edef68
2019-04-07 23:02:39 +00:00
Suraj Khurana 2a9630f971 Improved: Send Email services should be called asynchronously. Checked it and not getting any error as mentioned in previous comment.
(OFBIZ-10860)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856603 13f79535-47bb-0310-9956-ffa450edef68
2019-03-30 06:29:01 +00:00
Suraj Khurana 2cecce8a22 Improved: OrderId should be set in FinAccountTrans while gift card redemption and creation.
(OFBIZ-10867)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856602 13f79535-47bb-0310-9956-ffa450edef68
2019-03-30 05:53:42 +00:00
Suraj Khurana 31e2fd3768 Improved: Corrected typo in 'GiftCertificate' UiLabels.
(OFBIZ-10861)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856595 13f79535-47bb-0310-9956-ffa450edef68
2019-03-30 04:53:12 +00:00
Suraj Khurana e1f4e6777e Fixed: Service failed to mark expired authorized payments of Authorize.net as void.
(OFBIZ-10727)
Thanks Amit Gadaley for reporting the issue and providing the patch, thanks Jacopo for discussion and feedback.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1855078 13f79535-47bb-0310-9956-ffa450edef68
2019-03-09 05:22:19 +00:00
Aditya Sharma b7132c17b3 Improved: Refactor boolean returns from methods
(OFBIZ-10725)
Improved boolean returns with a single statement, replacing if blocks with the explicit boolean return.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851425 13f79535-47bb-0310-9956-ffa450edef68
2019-01-16 10:07:05 +00:00
Jacques Le Roux b7f211729f Improved: function parseBigDecimalForEntity is in wrong location
(OFBIZ-10689)

Actually this is a firts step that simply renames 
  ObjectType::simpleTypeConvert to
  ObjectType::simpleTypeOrObjectConvert
and improves the simpleTypeOrObjectConvert Javadoc

Thanks: Pierre Smits for report, Deepak Dixit for discussion

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850027 13f79535-47bb-0310-9956-ffa450edef68
2018-12-31 09:23:36 +00:00
Jacques Le Roux bbfc62d47a Improved: Fix or Silence various warnings
(OFBIZ-10701)

In order to detect potential issues early, the linting compiler option should be 
used by default and disabled with {{./gradlew -PXlint:none build}}.

Additionally it is important to reduce the number of warnings otherwise new 
warnings will remain unnoticed.

The warning related to the com.googlecode.concurrentlinkedhashmap dependency 
should resolves itself once we handle upgrade to Caffeine like proposed in 
OFBIZ-6747.

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848673 13f79535-47bb-0310-9956-ffa450edef68
2018-12-11 13:33:49 +00:00
Michael Brohl 2d62835e24 Fallthrough in switch-case of eway/GatewayResponse.java
(OFBIZ-10642)

There were breaks missing in the switch case.

Thanks Benjamin Jugl for providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848447 13f79535-47bb-0310-9956-ffa450edef68
2018-12-08 09:39:29 +00:00
Jacques Le Roux a8ae48be7b Fixed: Tax not added for order shipping or promotion
(OFBIZ-4160)

Removes AccountingTaxAuthorityCategoryAdvice and usage, now useless

Fixes possible "BigInteger divide by zero" in rateProductTaxCalc

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1847715 13f79535-47bb-0310-9956-ffa450edef68
2018-11-29 13:09:53 +00:00
Jacques Le Roux cf1b75cd63 Fixed: Tax not added for order shipping or promotion
(OFBIZ-4160)

The r1070830 commit works fine. Except when there are shippings and promotions 
to calculate. Then the algorithm searches for all entries in 
TAX_AUTHORITY_RATE_PRODUCT that are available for the PRODUCT_STORE and 
TAX_AUTH (and apply to shipping/promotions). So all taxes (regular and reduced) 
are applied to the shipping costs, which naturally leads to a higher 
amount overall.

The correct procedure (at least in some countries in Europe) is to apply the 
tax for shipping  according to the shipped items. So, if regular tax applies 
to the good, regular tax is applied to the shipping-costs. If multiple items are 
shipped and they  have mixed taxes (some regular, some reduced) the calculation 
of the tax for shipping is weighted accordingly. 

jleroux: there are other ways to calculate VAT on shipping depending on 
countries and situations. This will be addressed by OFBIZ-10679

Thanks: Benjamin Jugl 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1847670 13f79535-47bb-0310-9956-ffa450edef68
2018-11-28 19:29:04 +00:00
Jacques Le Roux 3190e0ff2e Improved: Create patch for removal of IDEAL code in framework
(OFBIZ-5444)

Removes all iDEAL specifics from the framework (actually only applications)

Thanks: Pierre Smits

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846227 13f79535-47bb-0310-9956-ffa450edef68
2018-11-09 10:20:10 +00:00
Sharan Foga cd41e2c220 Improved: Added documentation content for Financial Accounts in Accounting (OFBIZ-10296). Thanks Viabhav Jain for the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1844976 13f79535-47bb-0310-9956-ffa450edef68
2018-10-27 16:05:17 +00:00
Gil Portenseigne ceea6ce791 Improved : Remove all unnecessary boxing and unboxing in Java classes
(OFBIZ-10504)

Thanks Taher, Jacques, Mathieu and Rishi for the review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1837577 13f79535-47bb-0310-9956-ffa450edef68
2018-08-07 07:30:43 +00:00
Nicolas Malin 55c64af90d Improved: Resolve shipping address from Invoice
(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
2018-07-03 21:58:32 +00:00
Nicolas Malin b48d0cadc5 revert revision 1830301 that contains mix improvement, i will recommit them correclty
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1830302 13f79535-47bb-0310-9956-ffa450edef68
2018-04-27 07:26:33 +00:00
Nicolas Malin 2695743cae Fixed: ConfigXMLReader - Events are not executed in the order defined
(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
2018-04-27 07:21:47 +00:00
Jacques Le Roux 5a75983cf3 Improved: Same UiLabel used for multiple purposes
(OFBIZ-10336)

AccountingGiftCerticateNumberCannotFulfill uiLabel is used for multiple purposes
There should be separate UiLabel if survey response is not found for gift 
certificate.

Thanks: Suraj Khurana

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1829136 13f79535-47bb-0310-9956-ffa450edef68
2018-04-14 12:31:29 +00:00
Michael Brohl af53b0ce46 Fixed: Prevent possible NullPointerException.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1828233 13f79535-47bb-0310-9956-ffa450edef68
2018-04-03 13:06:28 +00:00
Sharan Foga 18cdc95263 Improved: Added initial draft for accounting global settings documentation (OFBIZ-10297)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1827195 13f79535-47bb-0310-9956-ffa450edef68
2018-03-19 13:06:22 +00:00
Sharan Foga 2c8196356e Improved: Added agreements documentation content and linked it to accounting (OFBIZ-10290)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1827188 13f79535-47bb-0310-9956-ffa450edef68
2018-03-19 11:57:21 +00:00
Sharan Foga e6a36c3b31 Improved: Added documentation content for accounitng introduction (OFBIZ-10289)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1827176 13f79535-47bb-0310-9956-ffa450edef68
2018-03-19 09:18:41 +00:00
Michael Brohl 87586bbffb Improved: Append Apache license header on top of each .adoc file.
Thanks Pierre Smits for reporting.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1827136 13f79535-47bb-0310-9956-ffa450edef68
2018-03-18 13:04:40 +00:00
Taher A. Alkhateeb c688af9d89 Implemented: PoC for a documentation system for OFBiz based on Asciidoc
(OFBIZ-9837)

This commit has reference to the community discussion thread [1] and [2] in
which it was agreed to commit a PoC for a documentation framework based on
AsciiDoc. The work in this commit includes:
- Applying the necessary requirements and tasks to build.gradle and facilitate
  the addition of two new tasks: generateOfbizDocumentation and
  generatePluginDocumentation.
- Create an initial skeleton for a "user manual" and "developer manual"
- Create a sample initial skeleton for the accounting component

Thanks: Michael Brohl, Sharan Foga, Olivier Heintz for testing and feedback.

[1] https://s.apache.org/4Lat
[2] https://s.apache.org/26kc


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1826199 13f79535-47bb-0310-9956-ffa450edef68
2018-03-08 10:19:17 +00:00
Nicolas Malin 2a2e0b6edc Improved: Resolve invoiceItem description from InvoiceWorker
(OFBIZ-10240)
To help the invoiceItem description resolution, I created a worker in InvoiceWorker to resolve it like this :
 1 take the item description field
 2 if tax associate, resolve the taxAuthorityRateProduct description
 3 if product associate, call content wrapper to resolve PRODUCT_NAME or take the brandName
 4 take the item Type line description

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1825300 13f79535-47bb-0310-9956-ffa450edef68
2018-02-25 10:33:33 +00:00
Jacques Le Roux 75ec82e3fe Improved: Replace all "BigDecimal ZERO" by BigDecimal.ZERO
(OFBIZ-9572)

Replace (and removes) "BigDecimal ZERO" by BigDecimal.ZERO where a ZERO var
makes no sense, ie when no scale/rounding is used.

Replaces the pattern for ZERO var creation in several files using
new UtilNumber.getRoundingMode()

No ZERO var creation and scale/rounding when confusion with several scale and
rounding is possible hence just BigDecimal.ZERO used. 
Like in InvoiceServices.java and InvoiceWorker.java	



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1824127 13f79535-47bb-0310-9956-ffa450edef68
2018-02-13 12:47:11 +00:00
Jacques Le Roux 323a3b870f Improved: [DEPRECATION] Replace BigDecimal.ROUND_* by RoundingMode.*
(OFBIZ-9571)

Replaces getBigDecimalRoundingMode() by getRoundingMode()

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1824120 13f79535-47bb-0310-9956-ffa450edef68
2018-02-13 12:29:42 +00:00
Jacques Le Roux b06570590e Improved: [DEPRECATION] Replace BigDecimal.ROUND_* by RoundingMode.*
(OFBIZ-9571)

UtilNumber class
 Deprecates and replaces both getBigDecimalRoundingMode() by getRoundingMode()
 Deprecates toPercentString()
 Puts a log for a NumberFormatException

Calculate class
 Uses RoundingMode where necessary. No deprecation, this should be only used
 by Minilang

The rest
 Adapts the whole code for that
 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1823931 13f79535-47bb-0310-9956-ffa450edef68
2018-02-12 10:04:29 +00:00
Deepak Dixit 118eb285d9 Fixed: Hardcoded String in PaymentGatewayServices#processCaptureResult (OFBIZ-10143)
In this patch a hard coded String is replaced with a String variable, trailing whitespace is deleted and a small typo is fixed.
Thanks Kyra Pritzel-Hentley for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1820262 13f79535-47bb-0310-9956-ffa450edef68
2018-01-05 06:51:13 +00:00
Jacques Le Roux 9c27473d59 No functional change,
Removes the test error used to test the new Buildbot config.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1820051 13f79535-47bb-0310-9956-ffa450edef68
2018-01-04 10:52:55 +00:00
Jacques Le Roux 56a97a4483 No functional change,
Voluntarily put a test error to test the new Buildbot config.

It will be removed as soon as Buildbot will run w/o duplicate warnings

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1820049 13f79535-47bb-0310-9956-ffa450edef68
2018-01-04 10:24:10 +00:00
Arun Patidar b30481ffab Fixed: While creating return fin account used currency must be same (OFBIZ-9977)
Thanks Suraj Khurana for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1819122 13f79535-47bb-0310-9956-ffa450edef68
2017-12-23 08:49:07 +00:00
Michael Brohl 50c4bba4b2 Improved: Replace all "e.printStackTrace();" by calls to the Debug class.
(OFBIZ-10083)

Thanks Jacques Le Roux for reporting and Kyra Pritzel-Hentley 
for providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818921 13f79535-47bb-0310-9956-ffa450edef68
2017-12-21 12:33:04 +00:00
Michael Brohl bb8f282467 Improved: Refactor magic numbers in
org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.
(OFBIZ-10100)

Thanks Julian Leichert for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818847 13f79535-47bb-0310-9956-ffa450edef68
2017-12-20 20:04:36 +00:00
Michael Brohl a6c8f5d3e3 Improved: Fixing defects reported by code analysis tools, package
org.apache.ofbiz.accounting.thirdparty.authorizedotnet.
(OFBIZ-9453)

Thanks Kyra Pritzel-Hentley for reporting.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818583 13f79535-47bb-0310-9956-ffa450edef68
2017-12-18 15:10:58 +00:00
Michael Brohl 85dd5d5b3c Improved: Fixing defects reported by code analysis tools, package
org.apache.ofbiz.accounting.thirdparty.valuelink.
(OFBIZ-10060)

Thanks Julian Leichert for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818579 13f79535-47bb-0310-9956-ffa450edef68
2017-12-18 14:44:28 +00:00
Michael Brohl ebd6ca1843 Improved: General refactoring and code improvements, package
org.apache.ofbiz.accounting.payment.
(OFBIZ-9874)

Thanks Julian Leichert for reporting and providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818564 13f79535-47bb-0310-9956-ffa450edef68
2017-12-18 13:00:59 +00:00
Michael Brohl b7e05b52d7 Improved: General refactoring and code improvements, package
org.apache.ofbiz.accounting.thirdparty.clearcommerce.
(OFBIZ-9879)

Thanks Julian Leichert for reporting and providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818555 13f79535-47bb-0310-9956-ffa450edef68
2017-12-18 11:56:05 +00:00
Michael Brohl b7fd4fb119 Improved: General refactoring and code improvements, package
org.apache.ofbiz.accounting.thirdparty.eway.
(OFBIZ-9881)

Thanks Julian Leichert for reporting and providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818553 13f79535-47bb-0310-9956-ffa450edef68
2017-12-18 11:30:28 +00:00