Bug 9923 - correction of a bug due to bz 7129
Summary: correction of a bug due to bz 7129
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on:
Blocks: 7129
  Show dependency treegraph
 
Reported: 2013-03-25 15:48 UTC by Christophe Croullebois
Modified: 2013-12-05 20:09 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
proposed patch (1.59 KB, patch)
2013-03-25 15:48 UTC, Christophe Croullebois
Details | Diff | Splinter Review
[3.10.x] Bug 9923 - correction of a bug due to bz 7129 (1.65 KB, patch)
2013-05-10 09:06 UTC, Fridolin Somers
Details | Diff | Splinter Review
patch rebased for 3.8.x (1.71 KB, patch)
2013-05-14 09:18 UTC, Christophe Croullebois
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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