Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035371Openbravo ERP07. Sales managementpublic2017-02-22 15:522017-03-12 16:59
JONHM 
collazoandy4 
immediatemajoralways
closedfixed 
5
 
3.0PR17Q13.0PR17Q1 
markmm82
Core
Pre packaging ( pi )
2016-12-02
pi
http://code.openbravo.com/erp/devel/pi/rev/daca5e5e260e [^]
No
0035371: Wrong orders shown in "Create Invoices From Orders" window
Wrong orders shown in "Create Invoices From Orders" window when an order is of type 'POS Order'. Those orders are invoiced by the cashup and must not be returned by this process. Before the update on the view c_invoice_candidate_v those orders were not shown.
1) Create a new Sales Order:
  - Transaction Document: POS Order
  - Business Partner: Alimentos y Supermercados
  - Invoice Terms: Immediate
1.1) Create a new line for the Sales Order (Cerveza ale 0'5L)
1.2) Book the Sales Order

2) Open it's Inovice (Open the 'cerveza ale' record in form mode and select Linked items/Sales Invoice - Lines and open the invoice)
2.1) Reactivate the invoice and delete a line.
2.3) Then complete the invoice (Complete button)

3) Open the window [Create Invoices From Orders]

--> You can see the POS Order there
The part of the c_invoice_candidate_v query
...
AND dt.docbasetype = 'SOO'
       AND ( dt.docsubtypeso <> 'ON'
              OR dt.docsubtypeso <> 'OB'
              OR dt.docsubtypeso <> 'WR' )
...
must be replaced for
...
AND dt.docbasetype = 'SOO'
       AND ( dt.docsubtypeso <> 'ON'
              AND dt.docsubtypeso <> 'OB'
              AND dt.docsubtypeso <> 'WR' )
...
to behave the same as before
No tags attached.
blocks defect 0035341 closed mcobas Wrong orders shown in "Create Invoices From Orders" window 
Issue History
2017-02-27 19:15markmm82Typedefect => backport
2017-02-27 19:15markmm82Target Version => 3.0PR17Q1
2017-03-12 16:57hgbotCheckin
2017-03-12 16:57hgbotNote Added: 0094960
2017-03-12 16:57hgbotStatusscheduled => resolved
2017-03-12 16:57hgbotResolutionopen => fixed
2017-03-12 16:57hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR17Q1/rev/df513ce5d089d48e8201ef577c9dfec6840065ab [^]
2017-03-12 16:59markmm82Review Assigned To => markmm82
2017-03-12 16:59markmm82Note Added: 0094962
2017-03-12 16:59markmm82Statusresolved => closed
2017-03-12 16:59markmm82Fixed in Version => 3.0PR17Q1

Notes
(0094960)
hgbot   
2017-03-12 16:57   
Repository: erp/backports/3.0PR17Q1
Changeset: df513ce5d089d48e8201ef577c9dfec6840065ab
Author: Miguel <martencobasmiguel <at> gmail.com>
Date: Thu Mar 09 14:22:29 2017 -0500
URL: http://code.openbravo.com/erp/backports/3.0PR17Q1/rev/df513ce5d089d48e8201ef577c9dfec6840065ab [^]

Fixes issue 35371: Wrong orders shown in "Create Invoices From Orders" window

Fixed the C_INVOICE_CANDIDATE_V view, changing the condition to not take into account
the sales orders different than 'ON' AND 'OB' AND 'WR' instead of using an incorrect
OR condition as suggested in the proposed solution.

Also were included some performances in the view replacing OR and AND conditions with they
respectively translations to IN and NOT IN clauses.

---
M src-db/database/model/views/C_INVOICE_CANDIDATE_V.xml
---
(0094962)
markmm82   
2017-03-12 16:59   
Code review + Testing OK