Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023894Openbravo ERP07. Sales managementpublic2013-05-23 04:232013-05-23 04:27
eintelau 
dmiguelez 
normalminoralways
newopen 
30Professional Appliance
3.0MP20 
 
Google Chrome
Core
No
0023894: Discounts and Promotions should not be applied to financial invoice lines
Currently the M_PROMOTION_CALCULATE procedure will try to apply discounts and promotions to financial invoice lines. This makes no sense as the prices on these lines are always entered manually.

It may also cause an issue for discounts that assume that the invoice line will have a valid product id included.
1) Create a discount in the system that applies to all sales transactions
2) Create a sales invoice
3) Add a line to the invoice, check financial invoice line and select a gl item
4) Set price on line
5) Book invoice
6) Note that the discount has been applied to the invoice - this can result in the user entered price changing.
Change M_PROMOTION_CALCULATE procedure to ignore financial invoice lines.

This can be done by using the financial_invoice_line field as the source of cancelpricead value
No tags attached.
patch 23894.patch (758) 2013-05-23 04:27
https://issues.openbravo.com/file_download.php?file_id=6155&type=bug
Issue History
2013-05-23 04:23eintelauNew Issue
2013-05-23 04:23eintelauAssigned To => dmiguelez
2013-05-23 04:23eintelauWeb browser => Google Chrome
2013-05-23 04:23eintelauModules => Core
2013-05-23 04:23eintelauTriggers an Emergency Pack => No
2013-05-23 04:27eintelauFile Added: 23894.patch
2013-05-23 04:27eintelauNote Added: 0058852

Notes
(0058852)
eintelau   
2013-05-23 04:27   
Patch with suggested fix attached