A comment to http://lists.gnucash.org/logs/2007-06-02.html#T23:35:59
23:35:59 <lasindi> I am testing right now with CSV files that have just three columns per row: date, description, amount. First the user selects an account to import to, then for each row I create a transaction and add one split. I set the split's account to the selected account and its amount/value to the amount in the file. Then I hand these transactions to the importer. (...) 23:42:19 <warlord> e.g., see import-main-matcher.h, gnc_gen_trans_list_add_trans() 23:42:38 <warlord> Looks like it DOES take a Transaction* BoO! 23:43:47 <lasindi> Hehe, yep Right, that's http://bugzilla.gnome.org/show_bug.cgi?id=150569 ; see my explanation on how this could be fixed, but I consider this a slightly more involved task. 23:56:58 <lasindi> The problem is that these transactions go through the importer into the source account with apparently single splits, so there are no destination accounts for the transactions, not even Imbalance. 23:57:38 <warlord> This is an importer bug.. 23:58:44 <warlord> As I recall, the importer just doesn't add a second (balancing) split in the 'default' case. I consider that a bug. If you want to fix that you have my complete support ;) Same from me - this behaviour of the Importer should be changed in the long run so that the Importer adds a split to the Imbalance-Account for all transactions where no "other account" has been selected. From the UI point of view, this probably doesn't change what the user sees: The green transactions have a other-account other than the Imbalance, and the yellow transactions have the other-account set to the Imbalance-account. However, internally this requires rather a lot of changes in the Importer implementation. For example, the current "flag" to distinguish the yellow from the green transactions is simply the query whether there is only one split vs. two splits. Also, currently if any transaction is committed (xaccTransCommitEdit), the other-account is saved for future automatic matching. If the yellow transactions are committed with the Imbalance-account as other-account, that account has to be excluded from the automatic matching, of course. lasindi: In summary, I agree this is a bug and should be changed. But for now I would recommend you should ignore that importer bug and just focus on the CSV import part. Either you or someone else will probably pick up this issue with the generic importer and Imbalance-account handling sometime later... Regards, Christian _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel