IDEMPIERE-3398 default "Payment Term" record of new client miss translate
This commit is contained in:
parent
6b0428fc04
commit
23d8d55058
|
@ -1025,6 +1025,7 @@ public final class MSetup
|
|||
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
||||
if (no != 1)
|
||||
log.log(Level.SEVERE, "Channel NOT inserted");
|
||||
|
||||
int C_Campaign_ID = getNextID(getAD_Client_ID(), "C_Campaign");
|
||||
sqlCmd = new StringBuffer("INSERT INTO C_Campaign ");
|
||||
sqlCmd.append("(C_Campaign_ID,C_Channel_ID,").append(m_stdColumns).append(",");
|
||||
|
@ -1047,6 +1048,14 @@ public final class MSetup
|
|||
if (no != 1)
|
||||
log.log(Level.SEVERE, "AcctSchema Element Campaign NOT updated");
|
||||
}
|
||||
// Campaign Translation
|
||||
sqlCmd = new StringBuffer ("INSERT INTO C_Campaign_Trl (AD_Language,C_Campaign_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,C_Campaign_Trl_UU)");
|
||||
sqlCmd.append(" SELECT l.AD_Language,t.C_Campaign_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy, generate_uuid() FROM AD_Language l, C_Campaign t");
|
||||
sqlCmd.append(" WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_Campaign_ID=").append(C_Campaign_ID);
|
||||
sqlCmd.append(" AND NOT EXISTS (SELECT * FROM C_Campaign_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_Campaign_ID=t.C_Campaign_ID)");
|
||||
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
||||
if (no < 0)
|
||||
log.log(Level.SEVERE, "Campaign Translation NOT inserted");
|
||||
|
||||
// Create Sales Region
|
||||
int C_SalesRegion_ID = getNextID(getAD_Client_ID(), "C_SalesRegion");
|
||||
|
@ -1071,6 +1080,14 @@ public final class MSetup
|
|||
if (no != 1)
|
||||
log.log(Level.SEVERE, "AcctSchema Element SalesRegion NOT updated");
|
||||
}
|
||||
// Sales Region Translation
|
||||
sqlCmd = new StringBuffer ("INSERT INTO C_SalesRegion_Trl (AD_Language,C_SalesRegion_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,C_SalesRegion_Trl_UU)");
|
||||
sqlCmd.append(" SELECT l.AD_Language,t.C_SalesRegion_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy, generate_uuid() FROM AD_Language l, C_SalesRegion t");
|
||||
sqlCmd.append(" WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_SalesRegion_ID=").append(C_SalesRegion_ID);
|
||||
sqlCmd.append(" AND NOT EXISTS (SELECT * FROM C_SalesRegion_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_SalesRegion_ID=t.C_SalesRegion_ID)");
|
||||
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
||||
if (no < 0)
|
||||
log.log(Level.SEVERE, "Sales Region Translation NOT inserted");
|
||||
|
||||
// Create Activity
|
||||
int C_Activity_ID = getNextID(getAD_Client_ID(), "C_Activity");
|
||||
|
@ -1095,6 +1112,14 @@ public final class MSetup
|
|||
if (no != 1)
|
||||
log.log(Level.SEVERE, "AcctSchema Element Activity NOT updated");
|
||||
}
|
||||
// Activity Translation
|
||||
sqlCmd = new StringBuffer ("INSERT INTO C_Activity_Trl (AD_Language,C_Activity_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,C_Activity_Trl_UU)");
|
||||
sqlCmd.append(" SELECT l.AD_Language,t.C_Activity_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy, generate_uuid() FROM AD_Language l, C_Activity t");
|
||||
sqlCmd.append(" WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_Activity_ID=").append(C_Activity_ID);
|
||||
sqlCmd.append(" AND NOT EXISTS (SELECT * FROM C_Activity_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_Activity_ID=t.C_Activity_ID)");
|
||||
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
||||
if (no < 0)
|
||||
log.log(Level.SEVERE, "Activity Translation NOT inserted");
|
||||
|
||||
/**
|
||||
* Business Partner
|
||||
|
@ -1166,8 +1191,9 @@ public final class MSetup
|
|||
if (no != 1)
|
||||
log.log(Level.SEVERE, "TaxCategory NOT inserted");
|
||||
|
||||
sqlCmd = new StringBuffer ("INSERT INTO C_TaxCategory_Trl (AD_Language,C_TaxCategory_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy)");
|
||||
sqlCmd.append(" SELECT l.AD_Language,t.C_TaxCategory_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, C_TaxCategory t");
|
||||
// TaxCategory translation
|
||||
sqlCmd = new StringBuffer ("INSERT INTO C_TaxCategory_Trl (AD_Language,C_TaxCategory_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,C_TaxCategory_Trl_UU)");
|
||||
sqlCmd.append(" SELECT l.AD_Language,t.C_TaxCategory_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy, generate_uuid() FROM AD_Language l, C_TaxCategory t");
|
||||
sqlCmd.append(" WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_TaxCategory_ID=").append(C_TaxCategory_ID);
|
||||
sqlCmd.append(" AND NOT EXISTS (SELECT * FROM C_TaxCategory_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_TaxCategory_ID=t.C_TaxCategory_ID)");
|
||||
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
||||
|
@ -1345,6 +1371,14 @@ public final class MSetup
|
|||
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
||||
if (no != 1)
|
||||
log.log(Level.SEVERE, "PaymentTerm NOT inserted");
|
||||
// Payment Term Translation
|
||||
sqlCmd = new StringBuffer ("INSERT INTO C_PaymentTerm_Trl (AD_Language,C_PaymentTerm_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,C_PaymentTerm_Trl_UU)");
|
||||
sqlCmd.append(" SELECT l.AD_Language,t.C_PaymentTerm_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy, generate_uuid() FROM AD_Language l, C_PaymentTerm t");
|
||||
sqlCmd.append(" WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_PaymentTerm_ID=").append(C_PaymentTerm_ID);
|
||||
sqlCmd.append(" AND NOT EXISTS (SELECT * FROM C_PaymentTerm_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_PaymentTerm_ID=t.C_PaymentTerm_ID)");
|
||||
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
||||
if (no < 0)
|
||||
log.log(Level.SEVERE, "Payment Term Translation NOT inserted");
|
||||
|
||||
// Project Cycle
|
||||
C_Cycle_ID = getNextID(getAD_Client_ID(), "C_Cycle");
|
||||
|
|
Loading…
Reference in New Issue