[Koha-bugs] [Bug 7129] actual cost showing too many zeros

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Feb 15 11:31:26 CET 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7129

Christophe Croullebois <christophe.croullebois at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |christophe.croullebois at bibl
                   |                            |ibre.com

--- Comment #22 from Christophe Croullebois <christophe.croullebois at biblibre.com> ---
We must revert this patch, it introduces a bug if the unitprice is 0.0000.
Instead of showing in this case the 'ecost' if there is not 'unitprice', it
shows 0.00 and the 'Actual cost' must be manually entered.
The line :
if ( @$results[0]->{'unitprice'} == 0 ) {
        @$results[0]->{'unitprice'} = '';
was wrote in this perspective.
But sprintf ( "%.2f", with '' or 0 or any string will return 0.00
and then, in the .tt 'unitprice' exists so we have the bad result.
I have made a quick patch to just resolve this problem, but I think that the
Colin's idea is nice, I will create a new patch to work in this way in the .tt
page.
I join the quick patch, but I think it would be better to make one with the
Colin's idea.
I am waiting for advises.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list