Revert partially revision 5809 from [1783032] Add DocAction parameter to Generate Invoices (manual) form

The validation added was causing issues with multiple shipments (and generating multiple invoices) for the same order - as discussed here (spanish):
https://sourceforge.net/projects/adempiere/forums/forum/623063/topic/4044641
This commit is contained in:
Carlos Ruiz 2011-03-26 01:09:10 -05:00
parent 86e2b60b3c
commit 5e4047e7ad
1 changed files with 1 additions and 3 deletions

View File

@ -94,9 +94,7 @@ public class InvoiceGen extends GenForm
+ "WHERE ic.AD_Org_ID=o.AD_Org_ID"
+ " AND ic.C_BPartner_ID=bp.C_BPartner_ID"
+ " AND ic.C_DocType_ID=dt.C_DocType_ID"
+ " AND ic.AD_Client_ID=?"
+ " AND NOT EXISTS (SELECT * FROM C_Invoice i"
+ " WHERE i.C_Order_ID=ic.C_Order_ID AND i.DocStatus IN ('IP', 'CO', 'CL')) ");
+ " AND ic.AD_Client_ID=?");
if (m_AD_Org_ID != null)
sql.append(" AND ic.AD_Org_ID=").append(m_AD_Org_ID);