Bug 9923

Summary: correction of a bug due to bz 7129
Product: Koha Reporter: Christophe Croullebois <christophe.croullebois>
Component: AcquisitionsAssignee: Bugs List <koha-bugs>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P5 - low CC: chris
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on:    
Bug Blocks: 7129    
Attachments: proposed patch
[3.10.x] Bug 9923 - correction of a bug due to bz 7129
patch rebased for 3.8.x

Description Christophe Croullebois 2013-03-25 15:48:53 UTC
Created attachment 16858 [details] [review]
proposed patch

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.
Jared Camins-Esakov : If this is fixing a bug caused by 7129 it should be moved to a new bug, which can be set straight to 
So I create this one and mark it as "Passed QA.".
Comment 1 Jared Camins-Esakov 2013-03-30 01:28:26 UTC
This patch has been pushed to master.
Comment 2 Chris Cormack 2013-04-24 10:11:05 UTC
Does not apply to 3.10.x or 3.8.x please resubmit if it is needed on those branches
Comment 3 Fridolin Somers 2013-05-10 09:06:25 UTC
Created attachment 18060 [details] [review]
[3.10.x] Bug 9923 - correction of a bug due to bz 7129

Patch rebased for 3.10.x.
Also applies on 3.8.x.
Comment 4 Chris Cormack 2013-05-10 23:14:30 UTC
Applied cleanly to 3.10.x will be in 3.10.6. Still conflicts for 3.8.x
Comment 5 Christophe Croullebois 2013-05-14 09:18:53 UTC
Created attachment 18131 [details] [review]
patch rebased for 3.8.x

Hi Chris,
I have added a line in the comment.
rebased for 3.8.x
thx
Comment 6 Chris Cormack 2013-05-14 09:58:05 UTC
Pushed to 3.8.x will be in 3.8.13