Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020699Openbravo ERP07. Sales managementpublic2012-06-07 12:372012-08-22 10:35
caristu 
jecharri 
highminoralways
closedfixed 
5
 
3.0MP15 
caristu
Core
No
0020699: Some candidate orders can't be selected using the Create Lines From button
If we have a sales order with "After Delivery" Invoice Terms, and its order lines have a sum of the quantity delivered equals to zero having negative quantities, we can't select this order in the [Sales Invoice] window when using the Create Lines From button.
1) Go to [Sales Order] windows, create a Warehouse Order with After Delivery Invoice Terms
2) Create two order lines: one with order quantity equal to 1 and the other with order quantity equal to -1 (the sum is zero)
3) Book the order
4) Go to [Sales Invoice] and create a new record. Use the "Create Lines From" button.
5) Notice that we can select the lines from the associated shipment, but not by the sales order.
The query for select the orders when we click the orders combo, called selectFromPOSOTrxCombo, is defined in CreateFrom_Invoice_data.xsql.

This function uses a view (c_invoice_candidate_v) that have a column (qtydelivered) that stores the sum of the quantity delivered for every line of the order.

When the invoice term is After Delivery, the function checks that the value of qtydelivered is different from zero. And is not taking into account that we can possibly have negative values that make the result of the sum be zero.

The solution should verify if every line in the order have a quantity delivered equals to zero, instead of the sum.
No tags attached.
Issue History
2012-06-07 12:37caristuNew Issue
2012-06-07 12:37caristuAssigned To => mirurita
2012-06-07 12:37caristuModules => Core
2012-06-07 12:37caristuResolution time => 1345500000
2012-06-07 12:44caristuReproducibilityhave not tried => always
2012-06-07 13:06caristuProposed Solution updated
2012-06-07 13:06caristuIssue Monitored: networkb
2012-06-07 13:16miruritaAssigned Tomirurita => jonalegriaesarte
2012-06-08 08:22jonalegriaesarteAssigned Tojonalegriaesarte => jecharri
2012-06-11 16:13jecharriAssigned Tojecharri => ioritzCia
2012-07-31 17:17jonalegriaesarteNote Added: 0051037
2012-07-31 17:17jonalegriaesarteTarget Version3.0MP14 => 3.0MP15
2012-08-10 10:15ioritzCiaAssigned ToioritzCia => jonalegriaesarte
2012-08-10 11:06jonalegriaesarteAssigned Tojonalegriaesarte => jecharri
2012-08-20 12:46hgbotCheckin
2012-08-20 12:46hgbotNote Added: 0051364
2012-08-20 12:46hgbotStatusnew => resolved
2012-08-20 12:46hgbotResolutionopen => fixed
2012-08-20 12:46hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d38f82392f3a8547fd27a08bdd895a70fdc1fcaf [^]
2012-08-22 10:35caristuClosed by => caristu
2012-08-22 10:35caristuNote Added: 0051449
2012-08-22 10:35caristuStatusresolved => closed

Notes
(0051037)
jonalegriaesarte   
2012-07-31 17:17   
Moved to MP15 due to other priorities
(0051364)
hgbot   
2012-08-20 12:46   
Repository: erp/devel/pi
Changeset: d38f82392f3a8547fd27a08bdd895a70fdc1fcaf
Author: Javier Etxarri <javier.echarri <at> openbravo.com>
Date: Mon Aug 20 12:45:47 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d38f82392f3a8547fd27a08bdd895a70fdc1fcaf [^]

Fixes issue 20699: Some candidate orders can't be selected using the Create Lines From button

---
M src-db/database/model/views/C_INVOICE_CANDIDATE_V.xml
---
(0051449)
caristu   
2012-08-22 10:35   
Verified