IDEMPIERE-2004 WAccountDialog: Inconsistency between action_find and action_save.
This commit is contained in:
parent
2bcf6c577e
commit
f94deb552a
|
@ -442,7 +442,8 @@ public final class WAccountDialog extends Window
|
|||
// Finish
|
||||
m_query = new MQuery();
|
||||
m_query.addRestriction("C_AcctSchema_ID", MQuery.EQUAL, m_C_AcctSchema_ID);
|
||||
m_query.addRestriction("IsFullyQualified", MQuery.EQUAL, "Y");
|
||||
//action_save doesn't filter by IsFullyQualified
|
||||
// m_query.addRestriction("IsFullyQualified", MQuery.EQUAL, "Y");
|
||||
if (m_mAccount.C_ValidCombination_ID == 0)
|
||||
m_mTab.setQuery(MQuery.getEqualQuery("1", "2"));
|
||||
else
|
||||
|
@ -676,7 +677,7 @@ public final class WAccountDialog extends Window
|
|||
else
|
||||
query = new MQuery();
|
||||
// Alias
|
||||
if (includeAliasCombination && f_Alias != null && f_Alias.getValue().toString().length() > 0)
|
||||
if (includeAliasCombination && f_Alias != null && !isEmpty(f_Alias))
|
||||
{
|
||||
String value = f_Alias.getValue().toString().toUpperCase();
|
||||
if (!value.endsWith("%"))
|
||||
|
@ -684,7 +685,7 @@ public final class WAccountDialog extends Window
|
|||
query.addRestriction("UPPER(Alias)", MQuery.LIKE, value);
|
||||
}
|
||||
// Combination (mandatory)
|
||||
if (includeAliasCombination && f_Combination.getValue().toString().length() > 0)
|
||||
if (includeAliasCombination && !isEmpty(f_Combination.getValue()))
|
||||
{
|
||||
String value = f_Combination.getValue().toString().toUpperCase();
|
||||
if (!value.endsWith("%"))
|
||||
|
@ -692,46 +693,46 @@ public final class WAccountDialog extends Window
|
|||
query.addRestriction("UPPER(Combination)", MQuery.LIKE, value);
|
||||
}
|
||||
// Org (mandatory)
|
||||
if (f_AD_Org_ID != null && f_AD_Org_ID.getValue() != null)
|
||||
if (f_AD_Org_ID != null && !isEmpty(f_AD_Org_ID.getValue()))
|
||||
query.addRestriction("AD_Org_ID", MQuery.EQUAL, f_AD_Org_ID.getValue());
|
||||
// Account (mandatory)
|
||||
if (f_Account_ID != null && f_Account_ID.getValue() != null)
|
||||
if (f_Account_ID != null && !isEmpty(f_Account_ID.getValue()))
|
||||
query.addRestriction("Account_ID", MQuery.EQUAL, f_Account_ID.getValue());
|
||||
if (f_SubAcct_ID != null && f_SubAcct_ID.getValue() != null)
|
||||
if (f_SubAcct_ID != null && !isEmpty(f_SubAcct_ID.getValue()))
|
||||
query.addRestriction("C_SubAcct_ID", MQuery.EQUAL, f_SubAcct_ID.getValue());
|
||||
|
||||
// Product
|
||||
if (f_M_Product_ID != null && f_M_Product_ID.getValue() != null)
|
||||
if (f_M_Product_ID != null && !isEmpty(f_M_Product_ID.getValue()))
|
||||
query.addRestriction("M_Product_ID", MQuery.EQUAL, f_M_Product_ID.getValue());
|
||||
// BPartner
|
||||
if (f_C_BPartner_ID != null && f_C_BPartner_ID.getValue() != null)
|
||||
if (f_C_BPartner_ID != null && !isEmpty(f_C_BPartner_ID.getValue()))
|
||||
query.addRestriction("C_BPartner_ID", MQuery.EQUAL, f_C_BPartner_ID.getValue());
|
||||
// Campaign
|
||||
if (f_C_Campaign_ID != null && f_C_Campaign_ID.getValue() != null)
|
||||
if (f_C_Campaign_ID != null && !isEmpty(f_C_Campaign_ID.getValue()))
|
||||
query.addRestriction("C_Campaign_ID", MQuery.EQUAL, f_C_Campaign_ID.getValue());
|
||||
// Loc From
|
||||
if (f_C_LocFrom_ID != null && f_C_LocFrom_ID.getValue() != null)
|
||||
if (f_C_LocFrom_ID != null && !isEmpty(f_C_LocFrom_ID.getValue()))
|
||||
query.addRestriction("C_LocFrom_ID", MQuery.EQUAL, f_C_LocFrom_ID.getValue());
|
||||
// Loc To
|
||||
if (f_C_LocTo_ID != null && f_C_LocTo_ID.getValue() != null)
|
||||
if (f_C_LocTo_ID != null && !isEmpty(f_C_LocTo_ID.getValue()))
|
||||
query.addRestriction("C_LocTo_ID", MQuery.EQUAL, f_C_LocTo_ID.getValue());
|
||||
// Project
|
||||
if (f_C_Project_ID != null && f_C_Project_ID.getValue() != null)
|
||||
if (f_C_Project_ID != null && !isEmpty(f_C_Project_ID.getValue()))
|
||||
query.addRestriction("C_Project_ID", MQuery.EQUAL, f_C_Project_ID.getValue());
|
||||
// SRegion
|
||||
if (f_C_SalesRegion_ID != null && f_C_SalesRegion_ID.getValue() != null)
|
||||
if (f_C_SalesRegion_ID != null && !isEmpty(f_C_SalesRegion_ID.getValue()))
|
||||
query.addRestriction("C_SalesRegion_ID", MQuery.EQUAL, f_C_SalesRegion_ID.getValue());
|
||||
// Org Trx
|
||||
if (f_AD_OrgTrx_ID != null && f_AD_OrgTrx_ID.getValue() != null)
|
||||
if (f_AD_OrgTrx_ID != null && !isEmpty(f_AD_OrgTrx_ID.getValue()))
|
||||
query.addRestriction("AD_OrgTrx_ID", MQuery.EQUAL, f_AD_OrgTrx_ID.getValue());
|
||||
// Activity
|
||||
if (f_C_Activity_ID != null && f_C_Activity_ID.getValue() != null)
|
||||
if (f_C_Activity_ID != null && !isEmpty(f_C_Activity_ID.getValue()))
|
||||
query.addRestriction("C_Activity_ID", MQuery.EQUAL, f_C_Activity_ID.getValue());
|
||||
// User 1
|
||||
if (f_User1_ID != null && f_User1_ID.getValue() != null)
|
||||
if (f_User1_ID != null && !isEmpty(f_User1_ID.getValue()))
|
||||
query.addRestriction("User1_ID", MQuery.EQUAL, f_User1_ID.getValue());
|
||||
// User 2
|
||||
if (f_User2_ID != null && f_User2_ID.getValue() != null)
|
||||
if (f_User2_ID != null && !isEmpty(f_User2_ID.getValue()))
|
||||
query.addRestriction("User2_ID", MQuery.EQUAL, f_User2_ID.getValue());
|
||||
|
||||
// Query
|
||||
|
|
Loading…
Reference in New Issue