* remove derby and fyracle from trunk
This commit is contained in:
parent
e860b1ccc2
commit
b55bb9f8ec
|
@ -47,24 +47,14 @@ public class MCash extends X_C_Cash implements DocAction
|
||||||
MCash retValue = null;
|
MCash retValue = null;
|
||||||
// Existing Journal
|
// Existing Journal
|
||||||
String sql;
|
String sql;
|
||||||
if(DB.isFyracle()){
|
sql = "SELECT * FROM C_Cash c "
|
||||||
sql = "SELECT * FROM C_Cash c "
|
+ "WHERE c.AD_Org_ID=?" // #1
|
||||||
+ "WHERE c.AD_Org_ID=?" // #1
|
+ " AND TRUNC(c.StatementDate)=?" // #2
|
||||||
//FYRACLE PATCH
|
+ " AND c.Processed='N'"
|
||||||
+ " AND cast(c.StatementDate as date)=?" // #2
|
+ " AND EXISTS (SELECT * FROM C_CashBook cb "
|
||||||
+ " AND c.Processed='N'"
|
+ "WHERE c.C_CashBook_ID=cb.C_CashBook_ID AND cb.AD_Org_ID=c.AD_Org_ID"
|
||||||
+ " AND EXISTS (SELECT * FROM C_CashBook cb "
|
+ " AND cb.C_Currency_ID=?)"; // #3
|
||||||
+ "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
|
|
||||||
}
|
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -366,7 +366,7 @@ public class MCashLine extends X_C_CashLine
|
||||||
{
|
{
|
||||||
String sql = "UPDATE C_Cash c"
|
String sql = "UPDATE C_Cash c"
|
||||||
+ " SET StatementDifference="
|
+ " 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) "
|
+ "(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 "
|
+ "FROM C_CashLine cl, C_CashBook cb "
|
||||||
+ "WHERE cb.C_CashBook_ID=c.C_CashBook_ID"
|
+ "WHERE cb.C_CashBook_ID=c.C_CashBook_ID"
|
||||||
|
|
Loading…
Reference in New Issue