details: /erp/devel/pi/rev/17b85f344d49
changeset: 9128:17b85f344d49
user: Asier Lostalé <asier.lostale <at> openbravo.com>
date: Tue Dec 14 15:57:09 2010 +0100
summary: fixed bug 15217: Moving forward / back arrows not working in
Reconciliation tab
diffstat:
src/org/openbravo/erpCommon/utility/TableSQLData.java | 33 ++++++++++++++----
1 files changed, 26 insertions(+), 7 deletions(-)
diffs (43 lines):
diff -r 81d93d29ae90 -r 17b85f344d49
src/org/openbravo/erpCommon/utility/TableSQLData.java
--- a/src/org/openbravo/erpCommon/utility/TableSQLData.java Tue Dec 14
14:12:48 2010 +0100
+++ b/src/org/openbravo/erpCommon/utility/TableSQLData.java Tue Dec 14
15:57:09 2010 +0100
@@ -2145,13 +2145,32 @@
* executable sql statement and uses this instead of the bigger one.
*/
if (onlyId) {
- txtAuxWhere.deleteCharAt(txtAuxWhere.length() - 1);
- txtAuxWhere.deleteCharAt(txtAuxWhere.length() - 1);
- int pos = txtAuxWhere.indexOf("SELECT");
- txtAuxWhere.delete(0, pos);
- // replace the previously built sql-text with our version
- // completely
- text = txtAuxWhere;
+ if (getPool().getRDBMS().equalsIgnoreCase("ORACLE")) {
+ txtAuxWhere.deleteCharAt(txtAuxWhere.length() - 1);
+ txtAuxWhere.deleteCharAt(txtAuxWhere.length() - 1);
+ int pos = txtAuxWhere.indexOf("FROM");
+ txtAuxWhere.delete(0, pos);
+ // replace the previously built sql-text with our version
+ // completely
+
+ text = txtAuxWhere;
+
+ if (hasRange) {
+ // don't add alias as it is already done in the subquery
+ text.insert(0, "SELECT " + keyColumns + " \n");
+ } else {
+ // add alias
+ text.insert(0, "SELECT " + keyColumnsTable + " \n");
+ }
+ } else {
+ txtAuxWhere.deleteCharAt(txtAuxWhere.length() - 1);
+ txtAuxWhere.deleteCharAt(txtAuxWhere.length() - 1);
+ int pos = txtAuxWhere.indexOf("SELECT");
+ txtAuxWhere.delete(0, pos);
+ // replace the previously built sql-text with our version
+ // completely
+ text = txtAuxWhere;
+ }
} else {
// old behavior for !onlyId case
text.append("WHERE ").append(txtAuxWhere.toString());
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits