Commit Graph
40 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 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
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
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
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
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
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
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 80c659bbee Added:Unit test case for service - CustRequestPermissionCheck.
(OFBIZ-8958)
Thanks Avnindra Sharma for reporting, Deepak Nigam and Yogesh Naroliya for providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851143 13f79535-47bb-0310-9956-ffa450edef68
2019-01-12 06:51:13 +00:00
Deepak Dixit af784a0f20 Order : Remove unused imports from groovy files for code optimization. (OFBIZ-9509)
Thanks  Suraj Khurana and Pradeep Choudhary for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813612 13f79535-47bb-0310-9956-ffa450edef68
2017-10-28 11:55:36 +00:00
Nicolas Malin 40fdd2ca73 Implemented: Continue the common-theme upload (OFBIZ-9138 Create a common theme)
Five step 
#9 Change all set screen and script that call widget.properties values replaced by call to modelTheme

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806150 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 10:02:34 +00:00
Deepak Dixit d5bcaaedf8 Improved: Inconsistent String Comparisons, Applied application groovy patch from jira issue. (OFBIZ-9254)
I found an inconsistency 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 Vyas for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1795341 13f79535-47bb-0310-9956-ffa450edef68
2017-05-16 17:16:05 +00:00
Jacques Le Roux 7188a6d2d6 Improved: No quick ship option with back ordered products
(OFBIZ-7220)

When an order contains back ordered products the quick ship option should not
be available


Thanks: Padmavati Rawat for report, Suraj Khurana for solution and patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791751 13f79535-47bb-0310-9956-ffa450edef68
2017-04-18 07:21:11 +00:00
Michael Brohl 2a93ef86a2 Fixed: Cancelled OrderItems are still included in orderGrandTotal.
(OFBIZ-9204)

Thanks: Maurice for reporting and providing the patch, Deepak and Jacques for their suggestions.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1781979 13f79535-47bb-0310-9956-ffa450edef68
2017-02-07 09:42:41 +00:00
Arun Patidar 2bfc816e9b Improved: Removed semicolon from all Groovy files of all components.
(OFBIZ-8652)

Thanks: Rohit Koushal, Jacques Le Roux and Rishi Solanki for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1767764 13f79535-47bb-0310-9956-ffa450edef68
2016-11-02 19:09:13 +00:00
Divesh Dutta e1d31962be Improved: Convert search criteria on status into multi select pattern for Order Component
(OFBIZ-7542)

Added Check box for status fields on Find Orders, Find Quotes, Find Requirements, and Find Return forms.

Thanks: Mohammad Kathawala for providing the patch and Swapnil Shah for reporting the issue.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761133 13f79535-47bb-0310-9956-ffa450edef68
2016-09-17 06:54:42 +00:00
Ashish Vijaywargiya b15974a6f6 Applied patch from jira issue - OFBIZ-8074 - Clean up commented out code in Groovy for Order. Thanks Aman for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1759147 13f79535-47bb-0310-9956-ffa450edef68
2016-09-04 06:41:20 +00:00
Deepak Dixit 834691742b (OFBIZ-6274) Renamed OFBiz artefacts from org.ofbiz.* to org.apache.ofbiz.*.Thanks to Taher for working on it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1752920 13f79535-47bb-0310-9956-ffa450edef68
2016-07-16 10:30:49 +00:00
Ashish Vijaywargiya fb6eecc298 Applied patch from jira issue - OFBIZ-7570 - Remove HtmlFormWrapper dependencies from Order Delivery Schedule Info screen.
Thanks Ravi for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1750302 13f79535-47bb-0310-9956-ffa450edef68
2016-06-27 08:01:40 +00:00
Deepak Dixit 5284cf4f95 (OFBIZ-7227) Relocate .groovy files in the order component
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747769 13f79535-47bb-0310-9956-ffa450edef68
2016-06-10 18:36:39 +00:00