Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0015931Openbravo ERP03. Procurement managementpublic2011-02-10 16:192011-02-19 00:00
adrianromero 
jonalegriaesarte 
urgentmajoralways
closedsuspended 
5
pi 
 
Core
No
0015931: you are able to add a discount in an order completed
you are able to add a discount in an order completed, but are not able to delete it.
-As Openbravo Admin go to Procurement Management || Transactions || Purchase Order
-Create a new order and complete it
-go to Header >> Discounts
- Create a new record and save
- realize that it is possible to save it
- Try to delete it
- realize that it is not possible to delete it
No tags attached.
depends on backport 00156402.50MP27 closed adrianromero you are able to add a discount in an order completed 
related to design defect 0021324 new Triage Omni OMS You can add a Discount to a booked/completed sales order/invoice 
Issue History
2011-02-10 16:19adrianromeroNew Issue
2011-02-10 16:19adrianromeroAssigned To => adrianromero
2011-02-10 16:19adrianromeroModules => Core
2011-02-10 16:19adrianromeroIssue generated from0015640
2011-02-10 16:19adrianromeroRelationship addeddepends on 0015640
2011-02-10 16:20adrianromeroStatusnew => scheduled
2011-02-10 16:20adrianromerofix_in_branch => pi
2011-02-15 13:58hgbotCheckin
2011-02-15 13:58hgbotNote Added: 0034199
2011-02-15 13:58hgbotStatusscheduled => resolved
2011-02-15 13:58hgbotResolutionopen => fixed
2011-02-15 13:58hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/225560d67fc4cc0900a4836f39f5c95b02bc19c6 [^]
2011-02-15 14:03adrianromeroNote Added: 0034200
2011-02-16 11:28jonalegriaesarteNote Added: 0034219
2011-02-16 11:28jonalegriaesarteStatusresolved => closed
2011-02-16 11:28jonalegriaesarteFixed in Version => 2.50MP27
2011-02-16 11:28jonalegriaesarteAssigned Toadrianromero => jonalegriaesarte
2011-02-16 11:28jonalegriaesarteStatusclosed => new
2011-02-16 11:28jonalegriaesarteResolutionfixed => open
2011-02-16 11:28jonalegriaesarteFixed in Version2.50MP27 =>
2011-02-16 11:29jonalegriaesarteStatusnew => scheduled
2011-02-16 11:29jonalegriaesartefix_in_branchpi =>
2011-02-16 11:29jonalegriaesarteStatusscheduled => resolved
2011-02-16 11:29jonalegriaesarteNote Added: 0034220
2011-02-16 11:29jonalegriaesarteStatusresolved => closed
2011-02-16 14:55adrianromeroNote Added: 0034232
2011-02-16 14:55adrianromeroStatusclosed => new
2011-02-18 12:00adrianromeroNote Added: 0034264
2011-02-18 12:00adrianromeroStatusnew => closed
2011-02-18 12:00adrianromeroResolutionopen => suspended
2011-02-19 00:00anonymoussf_bug_id0 => 3186253
2011-03-17 11:47adrianromeroRelationship addedrelated to 0016350
2012-08-09 12:02jecharriRelationship addedrelated to 0021324

Notes
(0034199)
hgbot   
2011-02-15 13:58   
Repository: erp/devel/pi
Changeset: 225560d67fc4cc0900a4836f39f5c95b02bc19c6
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Tue Feb 15 13:55:51 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/225560d67fc4cc0900a4836f39f5c95b02bc19c6 [^]

Fixes issue 0015931: you are able to add a discount in an order completed
It as been added the current trigger for tables C_ORDER_DISCOUNT and C_INVOICE_DISCOUNT that checks if the document has been posted to the event INSERT

---
M src-db/database/model/triggers/C_INVOICEDISCOUNT_TRG.xml
M src-db/database/model/triggers/C_ORDERDISCOUNT_TRG.xml
---
(0034200)
adrianromero   
2011-02-15 14:03   
* Testing the issue

Kindly follow the steps to test and verify that cannot be added discounts to purchase orders completed or posted.

Because there has been modified two triggers the following tests must be performed:

- Test that cannot be added discounts in completed Purchase orders, Sales orders, Purchase invoices and sales invoices.
- Test that discounts can be added, updated and removed in draft Purchase orders, Sales orders, Purchase invoices and sales invoices.

* Other areas affected.

There can be affected other processes that creates, updates or deletes discounts in orders and invoices.
(0034219)
jonalegriaesarte   
2011-02-16 11:28   
Verified
(0034220)
jonalegriaesarte   
2011-02-16 11:29   
Verified
(0034232)
adrianromero   
2011-02-16 14:55   
The changes has been backed out because it causes a regression.
(0034264)
adrianromero   
2011-02-18 12:00   
Cannot be implemented the this because of internal database technical details. Implementing the trigger functionality to avoid to create discounts in completed orders raises a "Mutating tables" exception when saving a new order with a business partner that has discounts.

In any case this is a minor issue because new added discounts to completed orders does not affects any other functionality or flow.