Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0012587Openbravo ERP07. Sales managementpublic2010-03-08 09:502010-08-18 00:00
networkb 
adrianromero 
urgentmajoralways
closedfixed 
20Community Appliance
2.50MP12 
2.50MP14 
Core
No
0012587: wrong price in process "copy lines" of invoice
in process "copy lines" in sales invoice, the new lines copied have the same unit price and list price that original invoice.
The unit price and list price should be the price of price list of new invoice
Sales Management || Transactions || Sales Invoice || Header:
. create new invoice:
  business partner: mafalda
  price list: mafalda sales
  run "copy lines":
    select invoice 100007 (sales invoice)

6 lines are copied:
Sales Management || Transactions || Sales Invoice || Header || Lines:
. line 50:
   Net Unit Price 35
   Net List Price 37

. in price list "Mafalda Sales" , go to tab "product price", and select the Hat product:
Master Data Management || Pricing || Price List || Price List >> Price List Version >> Product Price
 the "list price" is 33.30 and the "standard price" is 31.50
The line 50 of new invoice, should be copied with this prices.

No tags attached.
related to defect 00124652.50MP14 closed adrianromero Copy Lines on Sales Invoice does not wprk properly 
diff issue-12587-patch-proposal.diff (13,311) 2010-03-09 09:05
https://issues.openbravo.com/file_download.php?file_id=2322&type=bug
? CopyFromInvoice.java (10,670) 2010-03-09 09:06
https://issues.openbravo.com/file_download.php?file_id=2323&type=bug
? CopyFromInvoice_data.xsql (8,134) 2010-03-09 09:06
https://issues.openbravo.com/file_download.php?file_id=2324&type=bug
Issue History
2010-03-08 09:50networkbNew Issue
2010-03-08 09:50networkbAssigned To => adrianromero
2010-03-08 14:05rafarodaIssue Monitored: rafaroda
2010-03-08 14:14rafarodaRelationship addedrelated to 0012465
2010-03-08 14:15rafarodaFile Added: issue-12587-patch-proposal.diff
2010-03-08 14:17rafarodaNote Added: 0025124
2010-03-08 15:50psarobeNote Added: 0025132
2010-03-08 15:50psarobeAssigned Toadrianromero => pjuvara
2010-03-08 15:50psarobeTypedefect => feature request
2010-03-08 15:51psarobeAssigned Topjuvara => adrianromero
2010-03-08 15:51psarobeStatusnew => scheduled
2010-03-08 15:51psarobeNote Edited: 0025132bug_revision_view_page.php?bugnote_id=0025132#r139
2010-03-08 16:05jpabloaeTarget Version2.50MP13 => 2.50MP14
2010-03-08 16:17rafarodaFile Deleted: issue-12587-patch-proposal.diff
2010-03-08 16:25rafarodaFile Added: issue-12587-patch-proposal.diff
2010-03-09 09:05rafarodaFile Deleted: issue-12587-patch-proposal.diff
2010-03-09 09:05rafarodaFile Added: issue-12587-patch-proposal.diff
2010-03-09 09:06rafarodaFile Added: CopyFromInvoice.java
2010-03-09 09:06rafarodaFile Added: CopyFromInvoice_data.xsql
2010-03-09 10:01adrianromeroPriorityimmediate => urgent
2010-05-28 08:12hgbotCheckin
2010-05-28 08:12hgbotNote Added: 0027803
2010-05-28 08:12hgbotStatusscheduled => resolved
2010-05-28 08:12hgbotResolutionopen => fixed
2010-05-28 08:12hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/07a95c580a6230cfcecc22f98d539d5fa161473e [^]
2010-05-28 08:50harikrishnanNote Added: 0027804
2010-05-28 15:22adrianromeroNote Added: 0027816
2010-05-28 15:22adrianromeroStatusresolved => new
2010-05-28 15:22adrianromeroStatusnew => scheduled
2010-05-28 15:22adrianromerofix_in_branch => pi
2010-05-31 13:50hgbotCheckin
2010-05-31 13:50hgbotNote Added: 0027833
2010-05-31 13:50hgbotStatusscheduled => resolved
2010-05-31 13:50hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/07a95c580a6230cfcecc22f98d539d5fa161473e [^] => http://code.openbravo.com/erp/devel/pi/rev/2c0b028e737224a381182b3cb835ec9c531b9ca6 [^]
2010-06-03 22:49hudsonbotCheckin
2010-06-03 22:49hudsonbotNote Added: 0027933
2010-06-03 22:49hudsonbotCheckin
2010-06-03 22:49hudsonbotNote Added: 0027935
2010-08-17 08:16sureshbabuNote Added: 0030038
2010-08-17 08:16sureshbabuStatusresolved => closed
2010-08-18 00:00anonymoussf_bug_id0 => 3047302

Notes
(0025124)
rafaroda   
2010-03-08 14:17   
I attach a patch proposal.

Please notice that:

1) This patch is based on Openbravo ERP 2.50 MP8 but fix for issue 0012465 has been included.

2) This patch modifies current Copy Invoice Lines behavior. It would be interesting to extend this patch in order to preserve the old functionality (copy the lines exactly as they are) and add the new one (re-calculate prices and offers).
(0025132)
psarobe   
2010-03-08 15:50   
(edited on: 2010-03-08 15:51)
This is not an issue but a feature request. The button is working how it is designed for

(0027803)
hgbot   
2010-05-28 08:12   
Repository: erp/devel/pi
Changeset: 07a95c580a6230cfcecc22f98d539d5fa161473e
Author: Harikrishnan Raja <harikrishnan.raja <at> openbravo.com>
Date: Fri May 28 11:19:37 2010 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/07a95c580a6230cfcecc22f98d539d5fa161473e [^]

Fixes issue 12587: wrong price in process \"copy lines\" of invoice

---
M src-db/database/sourcedata/AD_TEXTINTERFACES.xml
M src/org/openbravo/erpCommon/ad_actionButton/CopyFromInvoice.html
M src/org/openbravo/erpCommon/ad_actionButton/CopyFromInvoice.java
M src/org/openbravo/erpCommon/ad_actionButton/CopyFromInvoice_data.xsql
---
(0027804)
harikrishnan   
2010-05-28 08:50   
Steps to reproduce:

*Create a purchase invoice with business partner mafalda.Select the product as Hat.
*Complete the sales order.
*Goto Price List in the masterdata management and change the product price of hat for Mafalda sales.
*Create a new sales invoice header with mafalda and then click on"Copy Lines".
*If "Select Price from price List = N" then the prices are taken from the invoice that are copying.If this check box is selected then prices are taken from the price list.

Root Cause:

*Before is always copied from the previous invoice alone.Now according to the condition the price are taken.

Impact:

The impact can be seen in the purchase invoice also.Because the same copy line button is used for both the invoice.
*Since i have checked the condition their is no impact of the previous functionality.
(0027816)
adrianromero   
2010-05-28 15:22   
With this modification the copy lines process always give the message "Error: Process failed during execution.
(0027833)
hgbot   
2010-05-31 13:50   
Repository: erp/devel/pi
Changeset: 2c0b028e737224a381182b3cb835ec9c531b9ca6
Author: Harikrishnan Raja <harikrishnan.raja <at> openbravo.com>
Date: Mon May 31 17:15:48 2010 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/2c0b028e737224a381182b3cb835ec9c531b9ca6 [^]

Fixes issue 12587 while clicking copy lines their error processing failed.This is because in pgsql the amount is inserted as string.Now this is fixed.

---
M src/org/openbravo/erpCommon/ad_actionButton/CopyFromInvoice_data.xsql
---
(0027933)
hudsonbot   
2010-06-03 22:49   
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/07a95c580a62 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/c011484a38d9 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17407.obx [^]
(0027935)
hudsonbot   
2010-06-03 22:49   
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/2c0b028e7372 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/c011484a38d9 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17407.obx [^]
(0030038)
sureshbabu   
2010-08-17 08:16   
verified its working fine