[Kmymoney-devel] [kmymoney4] [Bug 334995] CSV import Debit/Credit mode only looks at one column, credits become 0.00

Allan agander93 at gmail.com
Wed May 21 20:32:49 UTC 2014


On 21/05/14 20:44, Barry Scott wrote:
> https://bugs.kde.org/show_bug.cgi?id=334995
>
> --- Comment #3 from Barry Scott <barry at barrys-emacs.org> ---
> Summary:
>
> You have an assumption that that in Credit/Debit mode only one of the two cells
> will have a value, the other will be blank.
>
> Change that assumption to be only on of the cells can have a non-zero value,
> treat 0 the same as blank.
>
> If both Credit and Debit are non blank/0.00 report a format error.
> Refactor if anyone can come up with this ambiguous format.

I have this more or less working now, apart from polishing up.

I output a message if either debit or credit is empty or zero, or if 
both fields are non-zero.  I give the content of both fields and ask the 
user which to use, or to cancel.

> --- decimal defaults ---
>
> Choosing Import/CSV gives me a dialog that has the Decimal and Thousands
> drop down both blank. I cannot see a setting in the profile I found:

Ah, but then you are looking at 4.6.4, whereas I'm working on the 
development branch, and there is now a "DecimalSymbol" parameter in 
csvimporterrc.  So, your wish will be granted, in the upcoming next 
stable release.  I'm surprising myself about how much has changed since 
4.6.4.

> -- automatic defaulting --
>
> I can see how this would work.
>
> 1234.56 - "." is decimal no thousands
> 1234,56 - "," is decimal no thousands
> 1,234.56 - "." is decimal "," is thousands
> 1.234,56 - "," is decimal "." is thousands

Yes, that sort of thing. I automated the field separator setting already.

> 123456 - assume pennies/cents? Ask user?

At the moment (development branch), when the user chooses a setting, the 
monetary fields are scanned for any errors.  A missing decimal is 
flagged (highlighted red) and the user's locale setting is added.  The 
highlighting draws the user's attention to the change, hopefully.  I 
would probably leave the ui combobox in, to allow the user to override, 
although I would hope that that wouldn't be necessary.

Allan

> Barry
>


More information about the KMyMoney-devel mailing list