Re: Bug 734183

2014-08-07 Thread Mike Evans
On Wed, 06 Aug 2014 18:01:52 +0200 Geert Janssens janssens-ge...@telenet.be wrote: 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

Re: Bug 734183

2014-08-07 Thread Geert Janssens
On Thursday 07 August 2014 15:27:32 Mike Evans wrote: Ah found it by looking in the .gnucash xml file. The discount is saved as 25/1 and the price as 75/1. In gncEntryComputeValues() the denom is read from the currency, ie 100 so it divides 25 by the denom and gets the wrong answers which

Bug 734183

2014-08-06 Thread Mike Evans
Hi All I'm having a little trouble tracking this down, (some of) the code for creating an entry with discount is shown below: entry = gncEntryCreate (book); gncEntryBeginEdit(entry); // More code here... gnc_exp_parser_parse (discount, n, NULL);

Re: Bug 734183

2014-08-06 Thread Geert Janssens
On Wednesday 06 August 2014 10:25:12 Mike Evans wrote: Hi All I'm having a little trouble tracking this down, (some of) the code for creating an entry with discount is shown below: entry = gncEntryCreate (book); gncEntryBeginEdit(entry); // More code here...

Re: Bug 734183

2014-08-06 Thread Mike Evans
On Wed, 06 Aug 2014 15:49:08 +0200 Geert Janssens janssens-ge...@telenet.be wrote: On Wednesday 06 August 2014 10:25:12 Mike Evans wrote: Hi All I'm having a little trouble tracking this down, (some of) the code for creating an entry with discount is shown below: entry =

Re: Bug 734183

2014-08-06 Thread Geert Janssens
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