From: <vo...@us...> - 2012-07-16 15:08:39
|
Revision: 2778 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2778&view=rev Author: vomikan Date: 2012-07-16 15:08:30 +0000 (Mon, 16 Jul 2012) Log Message: ----------- update Modified Paths: -------------- branches/0.9.9.0/mmex/src/qifimport.cpp Modified: branches/0.9.9.0/mmex/src/qifimport.cpp =================================================================== --- branches/0.9.9.0/mmex/src/qifimport.cpp 2012-07-16 01:51:55 UTC (rev 2777) +++ branches/0.9.9.0/mmex/src/qifimport.cpp 2012-07-16 15:08:30 UTC (rev 2778) @@ -619,15 +619,15 @@ const wxString amtSeparator = core->accountList_.getAccountCurrencyDecimalChar(fromAccountID); static const char sql[] = - "SELECT transid, transdate as DATE, " - "transcode as TRANSACTIONTYPE, " - "transamount as AMOUNT, totransamount as TOAMOUNT, " + "SELECT TRANSID, TRANSDATE AS DATE, " + "TRANSCODE AS TRANSACTIONTYPE, " + "TRANSAMOUNT AS AMOUNT, TOTRANSAMOUNT AS TOAMOUNT, " " SUBCATEGID, " "CATEGID, PAYEEID, " "TRANSACTIONNUMBER, NOTES, TOACCOUNTID, ACCOUNTID " - "FROM checkingaccount_v1 " + "FROM CHECKINGACCOUNT_V1 " "WHERE ACCOUNTID = ? OR TOACCOUNTID = ?" - "ORDER BY transdate, transid"; + "ORDER BY TRANSDATE, TRANSID"; wxSQLite3Statement st = db_->PrepareStatement(sql); st.Bind(1, fromAccountID); @@ -643,17 +643,6 @@ while (q1.NextRow()) { - //To skip already exported transfer transactions reset account id - selected_accounts_id[a] = 0; - - const int tAccountID = q1.GetInt(wxT("TOACCOUNTID")); - //If toaccountid in selected list skip it - if (selected_accounts_id.Index(tAccountID) != wxNOT_FOUND ) - { - break; - } - const int fAccountID = q1.GetInt(wxT("ACCOUNTID")); - wxString transid = q1.GetString(wxT("TRANSID")); wxString dateDBString = q1.GetString(wxT("DATE")); wxDateTime dtdt = mmGetStorageStringAsDate(dateDBString); @@ -663,6 +652,9 @@ wxString payee = mmDBWrapper::getPayee(db_, q1.GetInt(wxT("PAYEEID")), sid, cid); wxString type = q1.GetString(wxT("TRANSACTIONTYPE")); + const int tAccountID = q1.GetInt(wxT("TOACCOUNTID")); + const int fAccountID = q1.GetInt(wxT("ACCOUNTID")); + wxString amount = adjustedExportAmount(amtSeparator, q1.GetString(wxT("AMOUNT"))); //Amount should be formated double value = 0.0; @@ -719,7 +711,7 @@ { static const char sql4splitedtrx[] = "SELECT SUBCATEGID, CATEGID, SPLITTRANSAMOUNT " - "FROM splittransactions_v1 " + "FROM SPLITTRANSACTIONS_V1 " "WHERE TRANSID = ?"; wxSQLite3Statement st2 = db_->PrepareStatement(sql4splitedtrx); @@ -753,7 +745,6 @@ text << wxT('^') << endl; numRecords++; - selected_accounts_id[a] = fromAccountID; } q1.Finalize(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |