MIFOSX-869 - Correct spelling mistakes
This commit is contained in:
committed by
Vishwas Babu A J
parent
6fed3899c5
commit
dc3ec32a43
@@ -0,0 +1,4 @@
|
|||||||
|
RENAME TABLE `x_table_cloumn_code_mappings` TO `x_table_column_code_mappings`;
|
||||||
|
|
||||||
|
ALTER TABLE `acc_gl_journal_entry`
|
||||||
|
CHANGE COLUMN `is_running_balance_caculated` `is_running_balance_calculated` TINYINT(4) NOT NULL DEFAULT '0' AFTER `lastmodified_date`;
|
||||||
+2
-2
@@ -112,7 +112,7 @@ public class GLAccountReadPlatformServiceImpl implements GLAccountReadPlatformSe
|
|||||||
// append SQL statement for fetching account totals
|
// append SQL statement for fetching account totals
|
||||||
if(associationParametersData.isRunningBalanceRequired()){
|
if(associationParametersData.isRunningBalanceRequired()){
|
||||||
sql = sql + " and gl_j.id in (select t1.id from (SELECT t2.id , max(concat(t2.entry_date,t2.id)) "
|
sql = sql + " and gl_j.id in (select t1.id from (SELECT t2.id , max(concat(t2.entry_date,t2.id)) "
|
||||||
+ "FROM acc_gl_journal_entry t2 WHERE is_running_balance_caculated = 1 GROUP BY t2.account_id DESC) t1)";
|
+ "FROM acc_gl_journal_entry t2 WHERE is_running_balance_calculated = 1 GROUP BY t2.account_id DESC) t1)";
|
||||||
}
|
}
|
||||||
final Object[] paramaterArray = new Object[3];
|
final Object[] paramaterArray = new Object[3];
|
||||||
int arrayPos = 0;
|
int arrayPos = 0;
|
||||||
@@ -191,7 +191,7 @@ public class GLAccountReadPlatformServiceImpl implements GLAccountReadPlatformSe
|
|||||||
final StringBuilder sql = new StringBuilder();
|
final StringBuilder sql = new StringBuilder();
|
||||||
sql.append("select ").append(rm.schema());
|
sql.append("select ").append(rm.schema());
|
||||||
if(associationParametersData.isRunningBalanceRequired()){
|
if(associationParametersData.isRunningBalanceRequired()){
|
||||||
sql.append(" and gl_j.is_running_balance_caculated = 1 ");
|
sql.append(" and gl_j.is_running_balance_calculated = 1 ");
|
||||||
}
|
}
|
||||||
sql.append("where gl.id = ?");
|
sql.append("where gl.id = ?");
|
||||||
if(associationParametersData.isRunningBalanceRequired()){
|
if(associationParametersData.isRunningBalanceRequired()){
|
||||||
|
|||||||
+1
-1
@@ -80,7 +80,7 @@ public class JournalEntryReadPlatformServiceImpl implements JournalEntryReadPlat
|
|||||||
.append(" journalEntry.currency_code as currencyCode, curr.name as currencyName, curr.internationalized_name_code as currencyNameCode, ")
|
.append(" journalEntry.currency_code as currencyCode, curr.name as currencyName, curr.internationalized_name_code as currencyNameCode, ")
|
||||||
.append(" curr.display_symbol as currencyDisplaySymbol, curr.decimal_places as currencyDigits, curr.currency_multiplesof as inMultiplesOf ");
|
.append(" curr.display_symbol as currencyDisplaySymbol, curr.decimal_places as currencyDigits, curr.currency_multiplesof as inMultiplesOf ");
|
||||||
if (associationParametersData.isRunningBalanceRequired()) {
|
if (associationParametersData.isRunningBalanceRequired()) {
|
||||||
sb.append(" ,journalEntry.is_running_balance_caculated as runningBalanceComputed, ")
|
sb.append(" ,journalEntry.is_running_balance_calculated as runningBalanceComputed, ")
|
||||||
.append(" journalEntry.office_running_balance as officeRunningBalance, ")
|
.append(" journalEntry.office_running_balance as officeRunningBalance, ")
|
||||||
.append(" journalEntry.organization_running_balance as organizationRunningBalance ");
|
.append(" journalEntry.organization_running_balance as organizationRunningBalance ");
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -83,7 +83,7 @@ public class JournalEntryRunningBalanceUpdateServiceImpl implements JournalEntry
|
|||||||
@CronTarget(jobName = JobName.ACCOUNTING_RUNNING_BALANCE_UPDATE)
|
@CronTarget(jobName = JobName.ACCOUNTING_RUNNING_BALANCE_UPDATE)
|
||||||
public void updateRunningBalance() {
|
public void updateRunningBalance() {
|
||||||
String dateFinder = "select MIN(je.entry_date) as entityDate from acc_gl_journal_entry je "
|
String dateFinder = "select MIN(je.entry_date) as entityDate from acc_gl_journal_entry je "
|
||||||
+ "where je.is_running_balance_caculated=0 ";
|
+ "where je.is_running_balance_calculated=0 ";
|
||||||
try {
|
try {
|
||||||
Date entityDate = this.jdbcTemplate.queryForObject(dateFinder, Date.class);
|
Date entityDate = this.jdbcTemplate.queryForObject(dateFinder, Date.class);
|
||||||
updateOrganizationRunningBalance(entityDate);
|
updateOrganizationRunningBalance(entityDate);
|
||||||
@@ -106,7 +106,7 @@ public class JournalEntryRunningBalanceUpdateServiceImpl implements JournalEntry
|
|||||||
if (office == null) { throw new OfficeNotFoundException(officeId); }
|
if (office == null) { throw new OfficeNotFoundException(officeId); }
|
||||||
|
|
||||||
String dateFinder = "select MIN(je.entry_date) as entityDate " + "from acc_gl_journal_entry je "
|
String dateFinder = "select MIN(je.entry_date) as entityDate " + "from acc_gl_journal_entry je "
|
||||||
+ "where je.is_running_balance_caculated=0 and je.office_id=?";
|
+ "where je.is_running_balance_calculated=0 and je.office_id=?";
|
||||||
try {
|
try {
|
||||||
Date entityDate = this.jdbcTemplate.queryForObject(dateFinder, Date.class, officeId);
|
Date entityDate = this.jdbcTemplate.queryForObject(dateFinder, Date.class, officeId);
|
||||||
updateRunningBalance(officeId, entityDate);
|
updateRunningBalance(officeId, entityDate);
|
||||||
@@ -162,7 +162,7 @@ public class JournalEntryRunningBalanceUpdateServiceImpl implements JournalEntry
|
|||||||
}
|
}
|
||||||
BigDecimal officeRunningBalance = calculateRunningBalance(entryData, officeRunningBalanceMap);
|
BigDecimal officeRunningBalance = calculateRunningBalance(entryData, officeRunningBalanceMap);
|
||||||
BigDecimal runningBalance = calculateRunningBalance(entryData, runningBalanceMap);
|
BigDecimal runningBalance = calculateRunningBalance(entryData, runningBalanceMap);
|
||||||
String sql = "UPDATE acc_gl_journal_entry je SET je.is_running_balance_caculated=1, je.organization_running_balance="
|
String sql = "UPDATE acc_gl_journal_entry je SET je.is_running_balance_calculated=1, je.organization_running_balance="
|
||||||
+ runningBalance + ",je.office_running_balance=" + officeRunningBalance + " WHERE je.id=" + entryData.getId();
|
+ runningBalance + ",je.office_running_balance=" + officeRunningBalance + " WHERE je.id=" + entryData.getId();
|
||||||
updateSql[i++] = sql;
|
updateSql[i++] = sql;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -278,7 +278,7 @@ public class GenericDataServiceImpl implements GenericDataService {
|
|||||||
|
|
||||||
private SqlRowSet getDatatableCodeData(final String datatable, final String columnName) {
|
private SqlRowSet getDatatableCodeData(final String datatable, final String columnName) {
|
||||||
|
|
||||||
final String sql = "select mc.id,mc.code_name from m_code mc join x_table_cloumn_code_mappings xcc on xcc.code_id = mc.id where xcc.column_alias_name='"
|
final String sql = "select mc.id,mc.code_name from m_code mc join x_table_column_code_mappings xcc on xcc.code_id = mc.id where xcc.column_alias_name='"
|
||||||
+ datatable.toLowerCase().replaceAll("\\s", "_") + "_" + columnName + "'";
|
+ datatable.toLowerCase().replaceAll("\\s", "_") + "_" + columnName + "'";
|
||||||
final SqlRowSet rsValues = this.jdbcTemplate.queryForRowSet(sql);
|
final SqlRowSet rsValues = this.jdbcTemplate.queryForRowSet(sql);
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -573,7 +573,7 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
|||||||
|
|
||||||
private int getCodeIdForColumn(final String dataTableNameAlias, final String name) {
|
private int getCodeIdForColumn(final String dataTableNameAlias, final String name) {
|
||||||
final StringBuilder checkColumnCodeMapping = new StringBuilder();
|
final StringBuilder checkColumnCodeMapping = new StringBuilder();
|
||||||
checkColumnCodeMapping.append("select ccm.code_id from x_table_cloumn_code_mappings ccm where ccm.column_alias_name='")
|
checkColumnCodeMapping.append("select ccm.code_id from x_table_column_code_mappings ccm where ccm.column_alias_name='")
|
||||||
.append(dataTableNameAlias).append("_").append(name).append("'");
|
.append(dataTableNameAlias).append("_").append(name).append("'");
|
||||||
int codeId = 0;
|
int codeId = 0;
|
||||||
try {
|
try {
|
||||||
@@ -650,7 +650,7 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
|||||||
final String[] addSqlList = new String[codeMappings.size()];
|
final String[] addSqlList = new String[codeMappings.size()];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (final Map.Entry<String, Long> mapEntry : codeMappings.entrySet()) {
|
for (final Map.Entry<String, Long> mapEntry : codeMappings.entrySet()) {
|
||||||
addSqlList[i++] = "insert into x_table_cloumn_code_mappings (column_alias_name, code_id) values ('" + mapEntry.getKey()
|
addSqlList[i++] = "insert into x_table_column_code_mappings (column_alias_name, code_id) values ('" + mapEntry.getKey()
|
||||||
+ "'," + mapEntry.getValue() + ");";
|
+ "'," + mapEntry.getValue() + ");";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -663,7 +663,7 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
|||||||
final String[] deleteSqlList = new String[columnNames.size()];
|
final String[] deleteSqlList = new String[columnNames.size()];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (final String columnName : columnNames) {
|
for (final String columnName : columnNames) {
|
||||||
deleteSqlList[i++] = "DELETE FROM x_table_cloumn_code_mappings WHERE column_alias_name='" + columnName + "';";
|
deleteSqlList[i++] = "DELETE FROM x_table_column_code_mappings WHERE column_alias_name='" + columnName + "';";
|
||||||
}
|
}
|
||||||
|
|
||||||
this.jdbcTemplate.batchUpdate(deleteSqlList);
|
this.jdbcTemplate.batchUpdate(deleteSqlList);
|
||||||
@@ -822,7 +822,7 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
|||||||
deregisterDatatable(datatableName);
|
deregisterDatatable(datatableName);
|
||||||
String[] sqlArray = null;
|
String[] sqlArray = null;
|
||||||
if (this.configurationDomainService.isConstraintApproachEnabledForDatatables()) {
|
if (this.configurationDomainService.isConstraintApproachEnabledForDatatables()) {
|
||||||
final String deleteColumnCodeSql = "delete from x_table_cloumn_code_mappings where column_alias_name like'"
|
final String deleteColumnCodeSql = "delete from x_table_column_code_mappings where column_alias_name like'"
|
||||||
+ datatableName.toLowerCase().replaceAll("\\s", "_") + "_%'";
|
+ datatableName.toLowerCase().replaceAll("\\s", "_") + "_%'";
|
||||||
sqlArray = new String[2];
|
sqlArray = new String[2];
|
||||||
sqlArray[1] = deleteColumnCodeSql;
|
sqlArray[1] = deleteColumnCodeSql;
|
||||||
|
|||||||
Reference in New Issue
Block a user