bug - [ 1713337 ] "Generate Invoices (manual)" show locked records.
This commit is contained in:
trifonnt 2007-05-05 10:22:14 +00:00
parent a16dd2212f
commit c2190a8733
1 changed files with 13 additions and 0 deletions

View File

@ -219,6 +219,19 @@ public class VInvoiceGen extends CPanel
sql.append(" AND ic.AD_Org_ID=").append(m_AD_Org_ID);
if (m_C_BPartner_ID != null)
sql.append(" AND ic.C_BPartner_ID=").append(m_C_BPartner_ID);
// bug - [ 1713337 ] "Generate Invoices (manual)" show locked records.
/* begin - Exclude locked records; @Trifon */
int AD_User_ID = Env.getContextAsInt(Env.getCtx(), "#AD_User_ID");
String lockedIDs = MPrivateAccess.getLockedRecordWhere(MOrder.Table_ID, AD_User_ID);
if (lockedIDs != null)
{
if (sql.length() > 0)
sql.append(" AND ");
sql.append("C_Order_ID").append(lockedIDs);
}
/* eng - Exclude locked records; @Trifon */
//
sql.append(" ORDER BY o.Name,bp.Name,DateOrdered");
// log.fine( "VInvoiceGen.executeQuery - AD_Client_ID=" + AD_Client_ID, sql.toString());