Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019864Openbravo ERP03. Procurement managementpublic2012-01-11 18:122012-03-14 16:50
VictorVillar 
jecharri 
highminoralways
closedfixed 
5
3.0MP6.1 
2.50MP40 
Core
No
0019864: Duplicity in purchase invoice lines
When the user creates a purchase invoice, and creates the lines from an order, he can creates the lines again and again, and then process the invoice without an error.
As Group Admin role,
Go to Purchase Order,
  - Create a new register
        Business partner: Be Soft
  Go to Lines tab:
        -Creates a new line
        - Product: Cherry Cola
save it and Book it.

Go to Purchase invoice window:
   - Create a new register
        Business partner: Be soft
  Click in "Create Lines From" button
     - Choose the order before
     - select Cherry cola line
     - Accept it
     - Again repeat the process:
             Click in "Create Lines From" button
               - Choose the order before
               - select Cherry cola line
               - Accept it
Save the invoice and process it.
We realise that an error does not appear, and we have duplicated the lines.
No tags attached.
blocks defect 00194693.0MP10 closed jecharri Duplicity in purchase invoice lines 
Issue History
2012-02-24 09:17jecharriTypedefect => backport
2012-02-24 09:17jecharrifix_in_branch => 2.50
2012-02-24 09:18jecharriTarget Version3.0MP9 => 2.50MP40
2012-03-07 12:13jecharriNote Added: 0046125
2012-03-07 12:23hgbotCheckin
2012-03-07 12:23hgbotNote Added: 0046127
2012-03-07 12:23hgbotStatusscheduled => resolved
2012-03-07 12:23hgbotResolutionopen => fixed
2012-03-07 12:23hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/4a020fd924d0aded59488f1264a6707f56d0eaba [^] => http://code.openbravo.com/erp/stable/2.50/rev/a401704de8d66cc3c7d684be53f8c03e5b1eabc2 [^]
2012-03-14 16:50VictorVillarNote Added: 0046420
2012-03-14 16:50VictorVillarStatusresolved => closed

Notes
(0046125)
jecharri   
2012-03-07 12:13   
Test cases:
-create one purchase order to one BP and with 2 lines. Book it
-go to window purchase invoice and create a header for the same BP:
  +now push in create lines, and see that the lines appear with the same qty like in the order
  +add lines and change the qty to less qty.
  +push again in create lines and see that now the qty change to = order qty -inserted qty
  +complete the invoice, with the same qty like in the order and complete it.
  +create a new invoice and see that the order is not proposal.

-create a new order with the same values.
-go to invoice and create a header.
-push in create lines and select the created order:
  +select only one line and add.
  +push again in create lines and see that only one line is proposal.
  +select the line and add
  +push again in create lines and select the order see that if you have the same qty as in the order the lines are not proposal.

-create a new order with the same values.
-go to invoice and create a header.
-push in create lines and select the created order:
  +select 2 lines and put less qty and colmplete.
  +create a new invoice and push in create lines:
       -see that the proposal lines qty is: ordered qty - invoiced qty

-create a new order with the same values.
-go to invoice and create a header.
-push in create lines and select the created order:
  +select 2 lines and put greater qty and colmplete.
  +push again in create lines and see that the lines are not propoused
(0046127)
hgbot   
2012-03-07 12:23   
Repository: erp/stable/2.50
Changeset: a401704de8d66cc3c7d684be53f8c03e5b1eabc2
Author: Javier Etxarri <javier.echarri <at> openbravo.com>
Date: Wed Mar 07 12:22:26 2012 +0100
URL: http://code.openbravo.com/erp/stable/2.50/rev/a401704de8d66cc3c7d684be53f8c03e5b1eabc2 [^]

Fixes issue 19864: Duplicity in purchase invoice lines
With this patch, now the clients will be able to select one line from the orders if they have not got all the quantity invoiced yet in the same invoice.
Also, now it does not prupouse lines with negative quantity and apart from that, are considered invoiced lines when the application is going to prupouse lines from selected order

---
M src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java
M src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Invoice_data.xsql
---
(0046420)
VictorVillar   
2012-03-14 16:50   
Verified all the test case