Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013698Openbravo ERP07. Sales managementpublic2010-06-18 12:392010-08-16 00:00
sureshbabu 
adrianromero 
highmajoralways
closedfixed 
30
main 
2.50MP20 
Core
No
0013698: While creating sales invoice using Copy lines option system wrongly adds line item of which is created automatically for discoun
While creating sales invoice using Copy lines option system wrongly adds line item of product : Discounts, because of this system wrongly calculates Discount amount for the newly generated invoice.
1) Setup to define discount for a Business partner
a: Create a product with below details
Name: Discount 17.5% , product Category: Discounts, UOM:Unit, Product Type: Item, Purchase & Sales: Checked

b) Navigate to Discount tab (Master Data Management || Business Partner Setup || Discount || Discount ) and click new, then enter the below details
Name: Discount 17.5% for BP:Bell Phone apply only to invoice , Product: Discount 17.5%, Discount %: 17.50

c) Navigate to Business partner window (Master Data Management || Business Partner || Business Partner ) and select the customer : Bell Phone company and then navigate to "Discount" tab, then click New and enter the below details

Discount: Discount 17.5% for BP:Bell Phone apply only to invoice, Apply in order: unchecked (critical, please make sure you unchecked this check box) , Customer:Checked
 
2) Created and complete a sales invoice for BP: Bell Phone company, & Product: Hammer

3) on complete of invoice, a new line item for product "Discount 17.5%" add ups to the sales invoice

4) Create one more Sales invoice for BP: Bell Phone Company, but this time copy line item details using sales invoice created in step 2 using button "COPY LINES"

Error: System wrongly copies line items of product: "Discount 17.5%", because of this, on complete of sales invoice system wrongly calculates discount amount.



No tags attached.
Issue History
2010-06-18 12:39sureshbabuNew Issue
2010-06-18 12:39sureshbabuAssigned To => adrianromero
2010-06-18 15:38sureshbabuSummaryWhile creating sales invoice using Copy lines option system wrongly adds line item of product category: Discounts => While creating sales invoice using Copy lines option system wrongly adds line item of which is created automatically for discoun
2010-06-18 15:38sureshbabuDescription Updatedbug_revision_view_page.php?rev_id=518#r518
2010-06-18 15:38sureshbabuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=520#r520
2010-08-12 13:58adrianromeroStatusnew => scheduled
2010-08-12 13:58adrianromerofix_in_branch => pi
2010-08-13 09:48hgbotCheckin
2010-08-13 09:48hgbotNote Added: 0029948
2010-08-13 09:48hgbotStatusscheduled => resolved
2010-08-13 09:48hgbotResolutionopen => fixed
2010-08-13 09:48hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e8550a2429e49514a490e6f0256f5966f010b933 [^]
2010-08-13 14:20hudsonbotCheckin
2010-08-13 14:20hudsonbotNote Added: 0029953
2010-08-15 19:45sureshbabuNote Added: 0029962
2010-08-15 19:45sureshbabuStatusresolved => closed
2010-08-16 00:00anonymoussf_bug_id0 => 3045724

Notes
(0029948)
hgbot   
2010-08-13 09:48   
Repository: erp/devel/pi
Changeset: e8550a2429e49514a490e6f0256f5966f010b933
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Fri Aug 13 09:46:55 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e8550a2429e49514a490e6f0256f5966f010b933 [^]

Fixes issue 0013698: While creating sales invoice using Copy lines option system
wrongly calculates Discount amount for the newly
generated invoice.
It has been modified the SQL sentence that copies the invoice lines to not
include lines that are discounts that are applied when completing invoices

---
M src/org/openbravo/erpCommon/ad_actionButton/CopyFromInvoice_data.xsql
---
(0029953)
hudsonbot   
2010-08-13 14:20   
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/e8550a2429e4 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/e10b0c3d07eb [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18143.obx [^]
(0029962)
sureshbabu   
2010-08-15 19:45   
verified closed