Commit Graph
89 Commits
Author SHA1 Message Date
Jacques Le Roux 9da8f5b55a Fixed: Quick Refund Entire Order no longer works (OFBIZ-12392)
This only fixes a 1st issue found while debugging.

Adds the order package to be able to debug Groovy in Eclipse. We need to add
packages to all Groovy scripts to be able to easily debug Groovy in Eclipse.

Adds .first() in updateReturnStatusFromReceipt at OrderReturnServices.groovy[506]
That is the fix

A lot of non functional formatting
2021-11-20 19:17:06 +01:00
Jacques Le Roux d403567fd8 Improved: no functional changes, simply formatting 2021-11-18 17:14:31 +01:00
Jacques Le Roux 6b3c71ea19 Fixed: Error: The field name (or key) [userLogin] is not valid for entity [ReturnItem] (OFBIZ-12389)
Steps:
    Locate any completed order.
    From the order's view screen  "Action" section click Create Return.
    Select some items to return then accept the return.
    From the "Return Item" menu click Receive Return button.
    You will land on the facility application "Receive Return" screen.

Try receiving items, which will generate an error

Thanks: Nameet Jain
2021-11-18 08:54:14 +01:00
Jacques Le Roux 87f9981f71 Improved: Handle remaining checkstyle errors (OFBIZ-12169)
Fixes wrong methods names in EntityFunction class
2021-10-17 10:49:51 +02:00
Jacques Le Roux a17b77ea28 Fixed: Create return is not working on demo trunk (OFBIZ-12282)
Weirdly (I guess I did not save) this syntax did not work 1st time I tried it
2021-09-30 15:25:09 +02:00
Jacques Le Roux f81f7f4d97 Fixed: Create return is not working on demo trunk (OFBIZ-12282)
Some parties have no PartyAccountingPreferences

Thanks: Yashwant Dhakad for report (see "Steps to reproduce" in Jira)
2021-09-30 13:25:51 +02:00
Nicolas Malin cf70c72db2 Fixed: Incorrect price for selected variant shown (OFBIZ-12236)
When the webshop (ecommerce component) has been set up for retail (B2C), with

    the tax setting 'Show prices with VAT tax included' set to 'Y' in store 9000
    the appropriat Tax Auth Geo and Tax Auth set in store 9000
    the flag 'Include Tax In Price' set to 'Y' for the Tax Auth
    the price for a virtual product is shown including VAT.

However, for a selected variant the price shown is without VAT

Thanks: Pierre Smits to raise the issue and Priya Sharma for solved it
2021-09-27 16:36:40 +02:00
Wiebke Pätzold de1e9e4bb4 Improved: Convert ShoppingListServices.xml mini lang to groovy (OFBIZ-11602) 2021-09-11 12:46:15 +02:00
Nicolas Malin b8f67d2e70 Fixed: Quote and Invoice with null value on refresh base
(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, ...
2021-05-14 17:54:19 +02:00
Jacques Le Roux 3f2fbc6f72 Fixed: Error page shown when clicking on a product Id in the purchase order page (OFBIZ-12229)
There is no "basePrice" resulting from calculatePurchasePrice service calling but
a simple "price".

This was put in with d04f777 commit and OFBIZ-11955

Thanks: Woyce Batkins for report
2021-05-01 18:56:41 +02:00
Jacques Le Roux afacb3ab43 Fixed: Order processing issue for dropship only products (OFBIZ-12068)
When a dropship only (or dropship on low ATP) product with no qualified supplier
added to shopping cart and cart converted to sales order. System should return
errors and should not create sales order.

Thanks: Amit Gadaley
2021-04-27 12:07:49 +02:00
SebastianEcomify b1d4dc6ea0 Improved: Convert CheckoutServices.xml minilang to groovy (#75)
(OFBIZ-11599)
2021-03-15 11:11:47 +01:00
Sebastian Berg 11634ae08c Improved: Converted OrderDeliveryServices.xml minilang to groovy
(OFBIZ-11461)
2021-02-04 17:46:55 +01:00
Daniel Watford edd7960e4b Fixed: Use data url scheme for logo in CompanyHeader
(OFBIZ-7327)

Use a data URL rather than a regular URL for company logos when a
logo has been specified as a Party Content item. This works around the
problem of Apache FOP failing to retrieve content from HTTPS URLs.

Thanks: Deepak Dixit for the review and suggestions
2021-01-24 16:26:34 +00:00
Nicolas Malin 2ddde9fb6b Fixed: OrderId with null value on refresh init base
(OFBIZ-12076)

After a fresh data base init with only seed, if you create your company without order prefix, your orderId sequence will be generate with 'null' string where the order prefix should be have :

> null10001, null10002, ...

This come from the groovy migration of service 'getNextOrderId' where productStore.orderNumberPrefix is loaded on the sequence without control if is empty or not
2020-11-30 09:48:41 +01:00
Jacques Le Roux 252c227ad0 Fixed: variant product selection trashes image (OFBIZ-12019)
The variant products' images are being saved in the variable IMG encoded as urls,
thus selecting the variant triggers an image override with an unsuitable file name.

Thanks: Alex Bodnaru
2020-10-06 15:18:49 +02:00
Jacques Le Roux d04f777389 Fixed: display/selection of unit of measure is broken (OFBIZ-11955)
Improve code for UOM dropdown of products like WG-9943

Thanks: Alex
2020-09-11 10:43:13 +02:00
Jacques Le Roux 9a957eb7a7 Fixed: display/selection of unit of measure is broken
(OFBIZ-11955)

This fixes in in order component

Thanks: Alex
2020-08-30 14:13:10 +02:00
Akash Jain 64b415e0d2 Improved: Expired product images showing on product detail page (OFBIZ-11982) 2020-08-25 21:41:31 +05:30
Pawan Verma 034e03abf4 Improved: Inconsistent String Comparisons(OFBIZ-9254)
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.
2020-07-30 17:01:54 +05:30
Pawan Verma efc016e5c9 Fixed: BigDecimal casting in Groovy (OFBIZ-11862)
Sometimes use wrong type castings for BigDecimal:

Used BigDecimal.ZERO and BigDecimal.ONE instead.
2020-07-03 14:08:14 +05:30
Suraj Khurana d58ffe1e8e Fixed: Console warnings related to OrderHeader caching.
(OFBIZ-11858)
Thanks Praveen Sharma for the patch and Jacques for review.
2020-07-02 10:55:55 +05:30
Jacques Le Roux 4bf23fdd9c Fixed: BigDecimal casting in Groovy (OFBIZ-11862)
Fixes syntax errors introduced by my previous commit
2020-06-30 18:42:43 +02:00
Jacques Le Roux df179777b6 Fixed: BigDecimal casting in Groovy (OFBIZ-11862)
Sometimes use wrong type castings for BigDecimal:

I have observed that for typecasting in groovy, we have used the wrong coding
pattern like

(BigDecimal) 0
It should be like
0 as BigDecimal

Note that this does not apply to decimal because in case of decimal, the default
type is always BigDecimal in Groovy.

Thanks: Pritam Kute for spotting the issue in OFBIZ-11843
2020-06-30 15:17:47 +02:00
pritambkuteandPritam Kute a7fa31c403 Fixed the issues in accept return process. (OFBIZ-11843) (#211)
Co-authored-by: Pritam Kute <pritam.kute>
2020-06-27 18:32:56 +05:30
Jacques Le Roux 7342f35d6f Fixed: IDOR vulnerability in the order processing feature in ecommerce component (OFBIZ-11836)
Fixes a bug when there are no problem viewing the order, my bad
2020-06-27 10:43:02 +02:00
Jacques Le Roux 4f841e9897 Fixed: IDOR vulnerability in the order processing feature in ecommerce component (OFBIZ-11836)
https://demo-stable.ofbiz.apache.org/ecommerce/control/order.pdf?orderId=WSCO10000

In the above URL, the parameter 'orderId' has the value 'WSCO10000' and after
incrementing the value to 'WSCO10001' or 'WSCO10002' will download the receipt
of other orders which have been placed by other users.

All the available order receipts can be downloaded by running an automated tool
(Burp Intruder) on the parameter 'orderId=WSCOXXXXX'

I have successfully tested this by using 2 different accounts: DemoCustomer and
DemoCustomer2

An attacker can download order receipts of other users and this could lead to
information disclosure.

The only real solution to this issue is to implement access control. The user
needs to be authorized for the requested information before the server provides
it.

Thanks: Harshit Shukla [mailto:harshit.shukz@gmail.com]reported this IDOR
vulnerability to the OFBiz security team, and we thank him for that.
2020-06-26 09:28:49 +02:00
Gil Portenseigne 7c8aab3d9d Improved: Migrate checkCreateOrderRequirement service to groovy
(OFBIZ-9984)

This commit migrate also dependent method and remove createRequirementFromItemATP service
2020-06-19 16:59:00 +02:00
Priya SharmaandPriya Sharma 15aec7e8f7 WIP: [Improved]: Use GroovyBaseScript's logging utility methods instead of using Debug (OFBIZ-11762) (#185)
* [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>
2020-06-06 10:17:23 +02:00
Nicolas Malin f6418d52f5 Improved: Convert OrderReturnService.xml from mini lang to groovy
(OFBIZ-11442)

Thanks to Sebastian Berg for providing the patch
2020-04-08 14:25:00 +02:00
Gil Portenseigne b79c95b151 Fixed: Convert OrderServices.xml mini-lang to groovyDSL : getNextOrderId
(OFBIZ-9984)
Fix introduced NPE detected by the introduced test.
2020-03-06 17:36:14 +01:00
Gil Portenseigne 53a8b81260 Improved: Convert OrderServices.xml mini-lang to groovyDSL : getOrderedSummaryInformation
(OFBIZ-9984)
Thanks Julien for your contribution
2020-03-06 15:47:52 +01:00
Gil Portenseigne eba4157c59 Improved: Convert OrderServices.xml mini-lang to groovyDSL : getNextOrderId
(OFBIZ-9984)
Thanks Julien for your old patch, it has been improved.
Add a new integration test for the service 'getNextOrderId'
2020-03-06 15:46:58 +01:00
Mathieu Lirzin d0f522aeed Fixed: Remove obsolete references to WorkflowActivity (OFBIZ-11303)
The workflow component is in attic since 7 years.
2019-12-01 20:05:27 +01:00
Jacques Le Roux 531793820e Improved: Add a discussion feature in order detail view for following
communication about the order (mail, phone etc.)
(OFBIZ-11210)

This is in order detail view for following communication about the order 
(mail, phone etc.) to keep an eye about all com' event linked to the order.

Thanks: Carl Demus

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867581 13f79535-47bb-0310-9956-ffa450edef68
2019-09-26 15:11:52 +00:00
Gil Portenseigne 763911235c Improved: Get correct information history for Company Header in pdf document
(OFBIZ-11177)

CompanyHeader.groovy now use the rendered document date 
as a reference to retrieve company data.

Thanks Carl Demus for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866511 13f79535-47bb-0310-9956-ffa450edef68
2019-09-06 14:44:01 +00:00
Nicolas Malin cbc0a76517 Improved: Find order screen can't make a search without ship to country
(OFBIZ-11176)
When you search orders on the standard screen [1] you can't unselect a country.
The problem come from the populate country list by countries.ftl who select by default a country without possibility to escape it.
We added a possibility to escape it through variable doNotPreselectDefaultCountryGeoId 

[1] https://localhost:8443/ordermgr/control/findorders

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866012 13f79535-47bb-0310-9956-ffa450edef68
2019-08-27 21:30:58 +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
Jacques Le Roux be99f5a0a7 Improved: no functional change
Adds missing ASL2 headers, thanks to Mathieu on dev ML :)
Also automatically sorts imports

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1862214 13f79535-47bb-0310-9956-ffa450edef68
2019-06-27 14:03:34 +00:00
Suraj Khurana 2b26ec3574 Improved: Unit test case for service - CheckCreateStockRequirementQoh.
(OFBIZ-8939)
Thanks Avnindra Sharma for reporting the ticket and Anushi Gupta for providing the updated patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1861858 13f79535-47bb-0310-9956-ffa450edef68
2019-06-22 12:15:45 +00:00
Deepak Nigam 5e6c96d8bb Implemented: The feature where a user will be able to add different types of content(image, document, URL, etc.) to an order.
(OFBIZ-7257)
Here is an implementation plan for the proposed solution. 
Order Attachment Flow:
1) Show 'Attachments' instead of 'Image' on the order view screen.
2) If there are any attachments associated with the order, then their information will be displayed in the form of a button(Content link) else 'No Attachment' label should be shown.
3) If no attachments are there, then along with the label, a button(Add Attachment) will be displayed.
On clicking the Add Attachment button, a user will be redirected to a page where he/she can add different types of content(image, document, URL, etc.) to the order.
Order Attachment Modeling:
Used OrderContent as the entity to store the content and order association.
Created OrderContentType data for an image and document for starters.

Thanks Avnindra Sharma for reporting the original issue, Devanshu Vyas for providing the patch and Jacques for review and suggestions.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1861853 13f79535-47bb-0310-9956-ffa450edef68
2019-06-22 12:06:43 +00:00
Suraj Khurana 10ef90f819 Improved: Unit test case for service - GetReturnAmountByOrder.
(OFBIZ-8861)
Thanks Avnindra Sharma for reporting and Yogesh Naroliya for providing the updated patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1861814 13f79535-47bb-0310-9956-ffa450edef68
2019-06-22 05:31:11 +00:00
Suraj Khurana c55deb8c04 Improved: JUnit test case for Creating a Retrun Header.
(OFBIZ-8808)
Committing slightly modified patch.Thanks Avnindra Sharma for reporting and Yogesh Naroliya for providing the updated patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1861813 13f79535-47bb-0310-9956-ffa450edef68
2019-06-22 05:14:07 +00:00
Suraj Khurana 9eaa7bde93 Improved: Unit test case for service - CreateReturnStatus.
(OFBIZ-8860)
Thanks Avnindra Sharma for repoting and Yogesh Naroliya for providing the updated patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1861682 13f79535-47bb-0310-9956-ffa450edef68
2019-06-20 10:16:22 +00:00
Jacques Le Roux 08f0b84462 Improved: no functional change, adds missing license headers
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860902 13f79535-47bb-0310-9956-ffa450edef68
2019-06-09 13:08:08 +00:00
Jacques Le Roux 28e119027c Improved: Use Groovy Truth instead of UtilValidate Class in Groovy
(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
2019-05-26 10:36:16 +00:00
Suraj Khurana 5dfb8a24cd Improved: Unit test case for service - CreateReturnItemShipment.
(OFBIZ-8859)
Thanks Avnindra Sharma for reporting the issue and Yogesh Naroliya for providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860005 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 16:45:44 +00:00
Suraj Khurana 6ad72737b7 Improved: Unit test case for service - CheckCreateProductRequirementForFacility.
(OFBIZ-8937)
Thanks Avnindra Sharma for reporting the issue and Anushi Gupta for providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860004 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 16:35:56 +00:00
Suraj Khurana 52d8436640 Improved: Used more declarative style for the context map, preferring map literals over imperative map.
(OFBIZ-8853)
Thanks Mathieu Lirzin for your suggestion.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860003 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 16:28:28 +00:00
Suraj Khurana e51b05e01d Improved: Unit test case for service - CheckPaymentAmountForRefund.
(OFBIZ-8852)
Thanks Avnindra Sharma for reporting the issue and Yogesh Naroliya for providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860000 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 15:50:49 +00:00