Bugfix.
bug - [ 1713337 ] "Generate Invoices (manual)" show locked records.
This commit is contained in:
parent
a16dd2212f
commit
c2190a8733
|
@ -219,6 +219,19 @@ public class VInvoiceGen extends CPanel
|
||||||
sql.append(" AND ic.AD_Org_ID=").append(m_AD_Org_ID);
|
sql.append(" AND ic.AD_Org_ID=").append(m_AD_Org_ID);
|
||||||
if (m_C_BPartner_ID != null)
|
if (m_C_BPartner_ID != null)
|
||||||
sql.append(" AND ic.C_BPartner_ID=").append(m_C_BPartner_ID);
|
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");
|
sql.append(" ORDER BY o.Name,bp.Name,DateOrdered");
|
||||||
// log.fine( "VInvoiceGen.executeQuery - AD_Client_ID=" + AD_Client_ID, sql.toString());
|
// log.fine( "VInvoiceGen.executeQuery - AD_Client_ID=" + AD_Client_ID, sql.toString());
|
||||||
|
|
Loading…
Reference in New Issue