Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0025739Openbravo ERP07. Sales managementpublic2014-02-14 14:082014-05-07 10:02
szapata 
szapata 
normalminorN/A
closedfixed 
5
 
pi 
egoitz
Core
No
0025739: Apply Offers only if ordered quantity is multiple of a given number
The idea of this development would be to apply a kind of discount only if the ordered quantity is multiple of a given number defined in the Offer (Discounts and promotions window) and, of course, if all the other conditions to apply the discount are satisfied by the order conditions.

i.e:
- Imagine an offer to be applied only if the the quantity is multiple of 5, and is valid for all products.
- A sales order is created with 3 lines:
* Line 1: Product A -> 5 units
* Line 2: Product B -> 10 units
* Line 3: Product C -> 6 units

The offer will be applied to the lines 1 and 2 but no line 3.
User case:
- Create a new offer in Discounts and Promotions window and check as Multiple offer.
- Fill the offer as follows:
* Starting date: 01-03-2014
* Discount: 20%
* Multiple: 5
* Apply the offer to all products, business partners etc. Excluding the configured ones in the Child tabs of the offer (don't fill these tabs, this User Case will apply the offer always)
- Create a sales Order with 3 lines and Order Date 25-02-2014:
* Line 1: Product A -> 5 units
* Line 2: Product B -> 10 units
* Line 3: Product C -> 6 units
- The unit price shouldn't change in any of the cases because the offer starts on March 1st and the date ordered is February 25th.

User case 2:
- Use the same offer but change the Starting date to 20-02-2014
- Create an order (same values than user case 1)
- The unit price should change only for lines 1 and 2 because both are multiple of 5. 6 is not multiple of 5 so the discount is not applied to the 3rd line.
No tags attached.
Issue History
2014-02-14 14:08szapataNew Issue
2014-02-14 14:08szapataAssigned To => dmiguelez
2014-02-14 14:08szapataModules => Core
2014-02-14 14:08szapataTriggers an Emergency Pack => No
2014-02-14 14:09szapataAssigned Todmiguelez => szapata
2014-03-08 19:51hgbotCheckin
2014-03-08 19:51hgbotNote Added: 0064967
2014-03-08 19:51hgbotStatusnew => resolved
2014-03-08 19:51hgbotResolutionopen => fixed
2014-03-08 19:51hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e00a853ba5c9271bfe06b93e94e5502e9bec4174 [^]
2014-03-10 22:58hudsonbotCheckin
2014-03-10 22:58hudsonbotNote Added: 0065001
2014-03-20 13:09szapataReview Assigned To => egoitz
2014-03-20 13:09szapataStatusresolved => closed
2014-03-20 13:09szapataFixed in Version => pi
2014-04-07 17:05hgbotCheckin
2014-04-07 17:05hgbotNote Added: 0066212
2014-04-07 17:05hgbotStatusclosed => resolved
2014-04-07 17:05hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/e00a853ba5c9271bfe06b93e94e5502e9bec4174 [^] => http://code.openbravo.com/erp/devel/pi/rev/71901bedc91aeb734c380498760e95a53ef7344f [^]
2014-04-29 13:04egoitzStatusresolved => closed
2014-05-05 12:09jonalegriaesarteReview Assigned Toegoitz => szapata
2014-05-07 10:02jonalegriaesarteReview Assigned Toszapata => egoitz

Notes
(0064967)
hgbot   
2014-03-08 19:51   
Repository: erp/devel/pi
Changeset: e00a853ba5c9271bfe06b93e94e5502e9bec4174
Author: Salvador Zapata <salvador.zapata <at> gmail.com>
Date: Sat Mar 08 15:28:03 2014 -0300
URL: http://code.openbravo.com/erp/devel/pi/rev/e00a853ba5c9271bfe06b93e94e5502e9bec4174 [^]

Fixed issue 25739: Price adjustment for multiples

---
M src-db/database/model/functions/M_PROMOTION_ADJUSTMENT.xml
M src-db/database/model/tables/M_OFFER.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src/org/openbravo/erpCommon/businessUtility/PriceAdjustment.java
---
(0065001)
hudsonbot   
2014-03-10 22:58   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/b362f74ef31a [^]
Maturity status: Test
(0066212)
hgbot   
2014-04-07 17:05   
Repository: erp/devel/pi
Changeset: 71901bedc91aeb734c380498760e95a53ef7344f
Author: Salvador Zapata <salvador.zapata <at> gmail.com>
Date: Mon Apr 07 11:45:35 2014 -0300
URL: http://code.openbravo.com/erp/devel/pi/rev/71901bedc91aeb734c380498760e95a53ef7344f [^]

Fixed 25739: Added display logic to show only for Price Adjustment offers

---
M src-db/database/sourcedata/AD_FIELD.xml
---