[gnucash-de] Bug in Transaction Import; Patch attached.

Tobias & Nicole Krais nicole-tobi at gmx.net
Son Okt 12 21:56:59 CDT 2003


Hi,

sorry for taking so long to test this patch. I had my final exams and 
had no time available. Now I use GnuCash 1.8.7. As described, the patch 
works out. When I import a multicurrency Transaction an amount is shown 
in both accounts. But it is the same amount (as described in Christians' 
Mail). But now I can change this manually in the price editor.

Thanks for your good work Christian. Now I don't have to make the 
transaction manually.

Greetings, Tobias

Christian Stimming schrieb:

> The latest Transaction import changes in the gnucash-1.8.5 version contains an 
> error. If the 'other' split in a transaction is created, it is created with a 
> wrongly set amount. The resulting behaviour is this: In the imported account, 
> the amount is shown correctly and the balance is modified correctly. In the 
> other account, the amount is shown correctly, but the balance is *not* 
> modified. 
> 
> The result is that for imported transactions, the 'other' accounts will show 
> wrong balances.
> 
> This needs to be fixed. If you got your code from CVS, please update your CVS 
> and compile again. If you downloaded the 1.8.5 source package, please apply 
> the attached patch (only a few lines in importer-backend.c) by going to the 
> extracted directory and running
> 
> patch -p0 < importer-1.8.5.patch
> 
> Sorry for this incovenience.
> 
> Christian
> 
> 
> ------------------------------------------------------------------------
> 
> Index: src/import-export/import-backend.c
> ===================================================================
> RCS file: /home/cvs/cvsroot/gnucash/src/import-export/import-backend.c,v
> retrieving revision 1.13.2.4
> retrieving revision 1.13.2.5
> diff -r1.13.2.4 -r1.13.2.5
> 831,840c831,839
> < 	    /* This is a quick workaround for the bug described in
> < 	       http://gnucash.org/pipermail/gnucash-devel/2003-August/009982.html  */
> < 	    xaccSplitSetValue
> < 	      (split, 
> < 	       gnc_numeric_neg(xaccTransGetImbalance 
> < 			       (gnc_import_TransInfo_get_trans (trans_info))));
> < 	    xaccSplitSetAmount
> < 	      (split, 
> < 	       gnc_numeric_neg(xaccTransGetImbalance 
> < 			       (gnc_import_TransInfo_get_trans (trans_info))));
> ---
> 
>>	    {
>>	      /* This is a quick workaround for the bug described in
>>		 http://gnucash.org/pipermail/gnucash-devel/2003-August/009982.html  */
>>	      gnc_numeric v = 
>>		gnc_numeric_neg (xaccTransGetImbalance 
>>				 (gnc_import_TransInfo_get_trans (trans_info)));
>>	      xaccSplitSetValue (split, v);
>>	      xaccSplitSetAmount (split, v);
>>	    }
>>
>>
>>------------------------------------------------------------------------
>>
>>_______________________________________________
>>gnucash-de mailing list
>>gnucash-de at lists.gnucash.org
>>https://lists.gnucash.org/mailman/listinfo/gnucash-de