Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0015490Openbravo ERP07. Sales managementpublic2010-12-20 17:292010-12-30 13:14
adrianromero 
adrianromero 
highminoralways
closedfixed 
5
3.0RC3 
3.0RC4 
Core
No
0015490: Error when processing Return Material order which has Discount applied
If you have defined a discount for a BP, and you try to process Return Material order for this BP you get an error.
1. Master Data Management || Business Partner || Business Partner >> Discount : create record for Discount03% with all check-bocks checked, for Mcgiver business partner
2. Sales Management || Transactions || Sales Order || Header : create "Return Material" order for mcgiver
3. Sales Management || Transactions || Sales Order || Header >> Lines : add line with product=Hat and qty= -1
4.come back to header and try to process. You will receive the following error:
Return Material order lines require negative quantities.

The error is because when processing it is trying to add another line to product "Discount03" with qty positive.
The check for not allowing negative quantities must just for items products
No tags attached.
depends on backport 00148162.50MP25 closed adrianromero Error when processing Return Material order which has Discount applied 
Issue History
2010-12-20 17:29adrianromeroNew Issue
2010-12-20 17:29adrianromeroAssigned To => adrianromero
2010-12-20 17:29adrianromeroModules => Core
2010-12-20 17:29adrianromeroIssue generated from0014816
2010-12-20 17:29adrianromeroRelationship addeddepends on 0014816
2010-12-20 17:30adrianromeroTypebackport => defect
2010-12-20 17:37hgbotCheckin
2010-12-20 17:37hgbotNote Added: 0033306
2010-12-20 17:37hgbotStatusnew => resolved
2010-12-20 17:37hgbotResolutionopen => fixed
2010-12-20 17:37hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/23aa8b17ec20e8617ba58100b68467e0e709da76 [^]
2010-12-20 17:42adrianromeroNote Added: 0033309
2010-12-20 18:22psarobeNote Added: 0033317
2010-12-20 18:22psarobeStatusresolved => closed
2010-12-21 00:00anonymoussf_bug_id0 => 3141014
2010-12-30 13:14hudsonbotCheckin
2010-12-30 13:14hudsonbotNote Added: 0033462

Notes
(0033306)
hgbot   
2010-12-20 17:37   
Repository: erp/devel/pi
Changeset: 23aa8b17ec20e8617ba58100b68467e0e709da76
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Mon Dec 20 17:31:51 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/23aa8b17ec20e8617ba58100b68467e0e709da76 [^]

Fixes issue 0015490: Error when processing Return Material order which has Discount applied
It has been removed discount lines from the check in return material orders

---
M src-db/database/model/functions/C_ORDER_POST1.xml
---
(0033309)
adrianromero   
2010-12-20 17:42   
* Testing the issue

Kindly follow the steps to test and verify that a return material order with discounts can be properly completed. Verify also that the discount amounts in the material order are correct.

* Other areas affected

It is only affected the process of completing orders, and in particular only return material orders. Verify also that normal orders and return material orders without discounts can be completed and there is not any change in the behavior.
(0033317)
psarobe   
2010-12-20 18:22   
Tested working fine
(0033462)
hudsonbot   
2010-12-30 13:14   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/23aa8b17ec20 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/7d7e5eebcc62 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.19448.obx [^]