Bug 9923: (MT #11060) actual cost not getting populated
authorChristophe Croullebois <christophe.croullebois@biblibre.com>
Mon, 18 Mar 2013 17:46:03 +0000 (18:46 +0100)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Sat, 30 Mar 2013 01:26:28 +0000 (21:26 -0400)
commit392ae1245fde7d9ab5dc7fc8cacebacd60f857ad
tree45b65d21fa3346e1ca2265dfb14a48125d3bc9e0
parentd8f2e43ef521c84e12fdbed55d974690afcc9993
Bug 9923: (MT #11060) actual cost not getting populated

The patch 7129 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.

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
acqui/orderreceive.pl