On Wednesday 06 August 2014 16:00:21 Mike Evans wrote:
> 
> HiGeert.
> 
> 
> n is set to 25 using gnc_exp_parser_parse (discount, &n, NULL); just
> after it's set to gnc_numeric_zero ();  Taking the zeroing line out
> doesn't change the behaviour though.
> 
Oh right. Probably this isn't working for me because my decimal separator is 
",".

Sorry for the false suggestion.

> Where discount is read from the file.  When the invoice is opened
> after import the 25.00 is shown in the discount column but the price
> hasn't been discounted, the line total is still at original price.
> 
> The gncEntryGetDocDiscountValue () function calls the
> gncEntry::gncEntryRecomputeValues() function which should set he
> discount to be applied.

Yes, it does. As an aside This is a horribly backward way of doing things and 
source of various 
bugs. We should definitely fix this at some point.

I fixed the import file for my locale and reran the debugger. The 
gncEntryRecomputeValues 
function effectively does nothing in this case because the entry has no Invoice 
tax table set. 
The recalculation only happens when there is either a bill or an invoice tax 
table.

So that would explain why the discount is not substracted.

Geert
_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to