* remove derby and fyracle from trunk

This commit is contained in:
Heng Sin Low 2007-04-09 14:02:01 +00:00
parent e860b1ccc2
commit b55bb9f8ec
2 changed files with 9 additions and 19 deletions

View File

@ -47,24 +47,14 @@ public class MCash extends X_C_Cash implements DocAction
MCash retValue = null;
// Existing Journal
String sql;
if(DB.isFyracle()){
sql = "SELECT * FROM C_Cash c "
+ "WHERE c.AD_Org_ID=?" // #1
//FYRACLE PATCH
+ " AND cast(c.StatementDate as date)=?" // #2
+ " AND c.Processed='N'"
+ " AND EXISTS (SELECT * FROM C_CashBook cb "
+ "WHERE c.C_CashBook_ID=cb.C_CashBook_ID AND cb.AD_Org_ID=c.AD_Org_ID"
+ " AND cb.C_Currency_ID=?)"; // #3
}else{
sql = "SELECT * FROM C_Cash c "
+ "WHERE c.AD_Org_ID=?" // #1
+ " AND TRUNC(c.StatementDate)=?" // #2
+ " AND c.Processed='N'"
+ " AND EXISTS (SELECT * FROM C_CashBook cb "
+ "WHERE c.C_CashBook_ID=cb.C_CashBook_ID AND cb.AD_Org_ID=c.AD_Org_ID"
+ " AND cb.C_Currency_ID=?)"; // #3
}
sql = "SELECT * FROM C_Cash c "
+ "WHERE c.AD_Org_ID=?" // #1
+ " AND TRUNC(c.StatementDate)=?" // #2
+ " AND c.Processed='N'"
+ " AND EXISTS (SELECT * FROM C_CashBook cb "
+ "WHERE c.C_CashBook_ID=cb.C_CashBook_ID AND cb.AD_Org_ID=c.AD_Org_ID"
+ " AND cb.C_Currency_ID=?)"; // #3
PreparedStatement pstmt = null;
try
{

View File

@ -366,7 +366,7 @@ public class MCashLine extends X_C_CashLine
{
String sql = "UPDATE C_Cash c"
+ " SET StatementDifference="
//FYRACLE replace null with 0 there is no difference with this
//replace null with 0 there is no difference with this
+ "(SELECT COALESCE(SUM(currencyConvert(cl.Amount, cl.C_Currency_ID, cb.C_Currency_ID, c.DateAcct, 0, c.AD_Client_ID, c.AD_Org_ID)),0) "
+ "FROM C_CashLine cl, C_CashBook cb "
+ "WHERE cb.C_CashBook_ID=c.C_CashBook_ID"