Bug 6080

Summary: Total is wrong in acqui-home.pl
Product: Koha Reporter: Julian Maurice <julian.maurice>
Component: AcquisitionsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: minor    
Priority: PATCH-Sent (DO NOT USE) CC: chris, jonathan.druart, mjr, nengard, paul.poulain
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:
Attachments: Patch
This patch removes the total
Bug 6080: Add id to total line in funds table

Description Julian Maurice 2011-04-06 08:45:55 UTC
In Acqui-home, with hierarchic bugdets, it's a non sense to do total & sub-totals: we're adding budgets more than once.

For example :

Books 1000
  fictions books 500
  NF books 500

result in a total of 2000 !
Comment 1 Julian Maurice 2011-04-06 09:19:24 UTC Comment hidden (obsolete)
Comment 2 Paul Poulain 2011-04-06 13:51:43 UTC
*** Bug 6089 has been marked as a duplicate of this bug. ***
Comment 3 MJ Ray (software.coop) 2011-06-16 00:55:19 UTC
Sorry but this did not work for me.

Applying: Bug 6080: total is wrong in acqui-home.pl
error: patch failed: acqui/acqui-home.pl:82
error: acqui/acqui-home.pl: patch does not apply
error: koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tmpl: does not exist in index
Comment 4 Jonathan Druart 2011-07-08 08:47:13 UTC
Created attachment 4592 [details] [review]
This patch removes the total

This patch affect koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt
Comment 5 Nicole C. Engard 2011-07-08 17:42:12 UTC
The patch works, but I'm not sure I agree that we should be removing the total. It seems to me that it would helpful to see what you've spent total regardless of the fund/budget.  Does anyone else have any opinions here?
Comment 6 Paul Poulain 2011-07-18 08:51:38 UTC
Nicole,
If you have hierarchical budgets, the total may look false, even if it's correct.

Example :
Books = 1000€ budget
  - comics 500€
  - non comics 500€
DVD = 1000€

The total is 2000€, it's correct.
But in the view, you'll see :
books = 1000€
comics = 500
non comics = 500
DVD = 1000
Total = 2000

Someone may be troubled by this total. Thus the removal

HTH
Comment 7 Nicole C. Engard 2011-07-18 11:45:48 UTC
Paul,

Are you saying that the lack of symbol is confusing? or are you saying that there may be mixed currencies in the budgets? 

If you mean the first is what's different then can we just add the symbols back in? Or if you mean the second then I think we need a preference for libraries that do not order from multiple currencies.  

Otherwise, the math looks right to me in both examples, so I'm not sure what's the confusing bit.

Nicole
Comment 8 Katrin Fischer 2011-07-18 12:04:04 UTC
Hi Paul,

I think removing it is not the best solution here. For libraries not using hierarchical funds(working with only one level below budget) it's even a loss of functionality, because the display is totally correct there and not at all confusing. 

In fact I think we need better display of the hierarchies in a lot of places. At the moment most of the time you get a list of all - with no clue about the hierarchical level. I think there are a lot of things that could be done, like using tree views. 

For the table on the acq start page it might be enough to add something visual, like make the highest hierarchy bold, or indent the other funds a little.

If we add an id to the total line it could be easily hidden with css.
Comment 9 Paul Poulain 2011-07-20 10:41:41 UTC
nicole, nope, it's not the lack of symbol, it's the hierarchic thing.

Katrin : you're right. Our solution was an easy one, your suggestion is better, but would require a lot of time to be implemented. so, what's your conclusion until a perfect solution is written: we stay with a wrong total or we remove the total ?
PS: I don't plan to dedicate time to code this better solution: more critical things to fix in the code ;-)
Comment 10 Katrin Fischer 2011-07-20 10:45:23 UTC
Hi Paul,
I understand, that's why I suggested this as a possible solution ;):

'If we add an id to the total line it could be easily hidden with css.'

Easy to write that patch and easy to add a line into intranetusercss to turn it off for the libraries complaining about wrong totals.
Comment 11 Katrin Fischer 2011-07-27 21:05:38 UTC
Created attachment 4758 [details] [review]
Bug 6080: Add id to total line in funds table

Alternate patch for bug 6080.

Instead of removing the line altogether make it possible to hide it
easily by adding an id.

To test:
- apply patch
- check your funds table for the last line labelled 'Total'
- add to IntranetUserCss: #funds_total {display:none;}
- check again, line should be hidden now

Reason:
The totals is only confusing for multi-level funds, but not wrong.
If you are using only 1 level of funds, it works all ok.
Comment 12 Nicole C. Engard 2011-07-28 12:05:59 UTC
Signed off on the alternate patch. I will also update the manual and the acquisitions help file to include this tip on how to hide the total if it's confusing (once this patch has been pushed).

Nicole
Comment 13 Chris Cormack 2011-07-31 23:25:49 UTC
Simple html change, pushed please test