New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic Discount for Group Products #3149

Closed
metas-mk opened this Issue Dec 6, 2017 · 3 comments

Comments

Projects
None yet
5 participants
@metas-mk
Member

metas-mk commented Dec 6, 2017

Is this a bug or feature request?

Feature Request

What is the current behavior?

Currently, it is not possible to define and use Discounts for a Group-discount-product in metasfresh sales orders.

Which are the steps to reproduce?

Try in Sales order and Discount Schema and see what happens.

What is the expected or desired behavior?

  • User defines a discount schema and adds the discount for a discount product which shall be used in a discount group
  • The user creates a group in sales orderlines and selects the discount product.

What shall happen:

  • the discount product is added as line - happens already
  • the compensation type is set to discount - happens already
  • the compensation amount type is set to percent - happens already
  • the compensation percentage is set to discount defined in discount schema - new
  • the origin discount field is readonly for these discount group lines - new

image

teosarca added a commit that referenced this issue Dec 7, 2017

teosarca added a commit that referenced this issue Dec 7, 2017

cleanup: removed SubscriptionBL.setSubscription and setPrices
which was calling I_C_OrderLine.setDiscount directly

#3149

teosarca added a commit that referenced this issue Dec 7, 2017

Group: introduce bpartnerId and isSOTrx
needed for further calculations

#3149

teosarca added a commit that referenced this issue Dec 7, 2017

teosarca added a commit that referenced this issue Dec 7, 2017

teosarca added a commit that referenced this issue Dec 7, 2017

@metasnw

This comment has been minimized.

Show comment
Hide comment
@metasnw

metasnw Dec 8, 2017

Member

tested and got:

Error: java.lang.NullPointerException...
Server error
java.lang.NullPointerException
Member

metasnw commented Dec 8, 2017

tested and got:

Error: java.lang.NullPointerException...
Server error
java.lang.NullPointerException
@teosarca

This comment has been minimized.

Show comment
Hide comment
@teosarca

teosarca Dec 8, 2017

Member

fixed, NPE was:

2017-12-08 12:03:21.590 ERROR 30997 --- [http-nio-8080-exec-11] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.adempiere.exceptions.AdempiereException: java.lang.NullPointerException] with root cause
 
java.lang.NullPointerException: null
        at de.metas.contracts.interceptor.C_OrderLine.retrieveFirstFlatrateConditionsIdForCompensationGroup(C_OrderLine.java:78)
        at de.metas.contracts.interceptor.C_OrderLine.setSameFlatrateConditionsForWholeCompensationGroupWhenGroupIsCreated(C_OrderLine.java:38)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
Member

teosarca commented Dec 8, 2017

fixed, NPE was:

2017-12-08 12:03:21.590 ERROR 30997 --- [http-nio-8080-exec-11] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.adempiere.exceptions.AdempiereException: java.lang.NullPointerException] with root cause
 
java.lang.NullPointerException: null
        at de.metas.contracts.interceptor.C_OrderLine.retrieveFirstFlatrateConditionsIdForCompensationGroup(C_OrderLine.java:78)
        at de.metas.contracts.interceptor.C_OrderLine.setSameFlatrateConditionsForWholeCompensationGroupWhenGroupIsCreated(C_OrderLine.java:38)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)

metas-ts added a commit that referenced this issue Dec 10, 2017

Update ReleaseNotpes.md
[#727](metasfresh/metasfresh-webui-api#727)
Allow search of Subproducer
[#3079](#3079) Warehouse
picking group
[#1421](metasfresh/metasfresh-webui-frontend#1421)
Drop down lists remain displayed when using tab several times
[#3150](#3150) Always
keep Terms & Conditions equal per Compensation Group
[#714](metasfresh/metasfresh-webui-api#714)
login authenticate: provide an unique key for each JSONLoginRole
[#1404](metasfresh/metasfresh-webui-frontend#1404)
login form selects 2 items from roles dropdown
[#3174](#3174) Material
Receipt Candidates not generates when using Purchase Order from Sales
Order action
[#1406](metasfresh/metasfresh-webui-frontend#1406)
Can not enter "-" into any text field
[#721](metasfresh/metasfresh-webui-api#721)
picking terminal: HUs to pick: scan/filter by Locator
[#722](metasfresh/metasfresh-webui-api#722)
picking terminal: picking slot rows shall NOT have duplicate IDs
[#3139](#3139) Cannot
edit System Administrator role (AD_Role_ID=0)
[#1396](metasfresh/metasfresh-webui-frontend#1396)
View field editor: Patch request isn't sent after hit enter
[#3171](#3171) Add view
to keep track of unprocessed async work packages
[#3149](#3149) Automatic
Discount for Group Products
[#1414](metasfresh/metasfresh-webui-frontend#1414)
view: don't allow user to sort by a given column if layout says so
[#1425](metasfresh/metasfresh-webui-frontend#1425)
eslint: increase line max-len from 80 to 120.
[#716](metasfresh/metasfresh-webui-api#716)
picking terminal: scan picking slot by barcode
[#723](metasfresh/metasfresh-webui-api#723)
picking terminal: HUs to pick: Pick CUs process
[#3137](#3137) Clean
C_PaySelection
[#3160](#3160)
C_Printing_Queue_ReEnqueue with IsSelected doesn't work
[#713](metasfresh/metasfresh-webui-api#713)
Error creating bean with name 'scopedTarget.internalUserSessionData'
[#1383](metasfresh/metasfresh-webui-frontend#1383)
cannot completely delete a numeric field in grid view
[#3138](#3138) Import
BPartner window: cannot see data
[#2340](#2340) Relation
Type: changelog
[#3151](#3151)
ZoomTo-Performance Issues
[#3147](#3147) Errors wrt
C_BPartner SQL columns
[#2338](#2338) Relation
Type: fact_accounts
[#3110](#3110) Request
All does not show records
[#1407](metasfresh/metasfresh-webui-frontend#1407)
process result: open included view: handle profileId property
[#3105](#3105) Improve
Product import process
[#711](metasfresh/metasfresh-webui-api#711)
picking terminal: additional shall support grouping lines by order
[#3058](#3058)
TableRecordId relation types to support Prefix_AD_Table_ID and
Prefix_Record_ID
[#3126](#3126) Solve
issues around standalone report / jasper service
[#1393](metasfresh/metasfresh-webui-frontend#1393)
View attributes: consider row's supportAttributes property before
querying for attributes
[#1361](metasfresh/metasfresh-webui-frontend#1361)
View field editor: make sure the field value is sent to backend before
the view is deleted

@metasnw metasnw self-assigned this Dec 11, 2017

@metasnw

This comment has been minimized.

Show comment
Hide comment
@metasnw

metasnw Dec 11, 2017

Member

testing together with #3150

Member

metasnw commented Dec 11, 2017

testing together with #3150

@metas-lc metas-lc closed this Jan 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment