Bug 4266 - encumbrance and expenditure not used in code
Summary: encumbrance and expenditure not used in code
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: PC All
: P5 - low major (vote)
Assignee: mathieu saby
QA Contact: Bugs List
URL: cgi-bin/koha/admin/aqbudgets.pl?op=ad...
Keywords:
Depends on:
Blocks: 9822
  Show dependency treegraph
 
Reported: 2010-02-25 02:16 UTC by Nicole C. Engard
Modified: 2014-05-26 21:04 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: String patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
[PATCH] Bug 4266: Hide encumbrance and expenditure (1.65 KB, patch)
2013-01-26 15:37 UTC, mathieu saby
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 4266: Hide Encumbrance and Expenditure (1.65 KB, patch)
2013-01-26 23:21 UTC, Nicole C. Engard
Details | Diff | Splinter Review
Hide Encumbrance and Expenditure in aqbudgets.tt (1.41 KB, patch)
2013-02-22 11:38 UTC, mathieu saby
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 4266: Hide Encumbrance and Expenditure in aqbudgets.tt (1.70 KB, patch)
2013-03-14 13:58 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 4266: Hide Encumbrance and Expenditure in aqbudgets.tt (1.72 KB, patch)
2013-03-15 10:45 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2010-05-21 01:25:09 UTC


---- Reported by nengard@gmail.com 2010-02-25 14:16:42 ----

It appears that the encumbrance and expenditure fields on the add fund form are not actually used anywhere in the code.


CHAT:

[08:59]  <nengard> acq question - when adding a fund - what do i enter in encumbrance and expenditure?
[09:00]  <gmcharlt> nengard: checking, but probably nothing
[09:01]  <nengard> k .... so why do we want them on the add form?
[09:01]  <nengard> :)

[09:10]  <gmcharlt> nengard: hmm, the budget expenditure and encumbrance fields don't do anything at all
[09:11]  * gmcharlt scratches head
[09:11]  <gmcharlt> hdl_laptop^^
[09:11]  <nengard> k - bug report time?
[09:11]  <gmcharlt> yep
[09:11]  <hdl_laptop> ?
[09:12]  <gmcharlt> are aqbudgets.budget_encum and budget_expend supposed to do anything?
[09:13]  <hdl_laptop> they are there to store the encumbrance and expenditure of your budget.
[09:13]  <hdl_laptop> (assuming it is not a root budget.
[09:13]  <hdl_laptop> )
[09:13]  <gmcharlt> guessed as much
[09:13]  <gmcharlt> but I see no code that actually updates them as orders get placed and invoiced
[09:13]  <hdl_laptop> You can then check against those figures that you enforce that.
[09:14]  <hdl_laptop> Well it is for budget planning.
[09:14]  <nengard> but it's on the 'add fund' form ... it doesn't show on the budget planning form...
[09:14]  <gmcharlt> so they're supposed to be maximum  expenditure and encumbrance limits?
[09:14]  <hdl_laptop> I want to spend 10% of my root budget on that part.
[09:14]  <hdl_laptop> gmcharlt: yes.
[09:15]  <hdl_laptop> nengard: sorry I may not be uptodate in vocabulary
[09:15]  <gmcharlt> functional gap there - limits that don't get enforced aren't limits at all
[09:15]  <hdl_laptop> there should be a warning when you try to spend more.
[09:16]  <hdl_laptop> I thought it had been done.
[09:17]  <nengard> hdl_laptop gmcharlt i'll just put a bug in with this discussion so that it can be investigated further



---- Additional Comments From nengard@gmail.com 2010-05-03 11:13:53 ----

just wanted to bring this to everyone's attention - it's very confusing when adding a Fund to see these fields - especially if they're not used!



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:25 UTC  ---

This bug was previously known as _bug_ 4266 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4266

Actual time not defined. Setting to 0.0
Setting qa contact to the default for this product.
   This bug either had no qa contact or an invalid one.

Comment 1 Nicole C. Engard 2012-05-10 11:34:09 UTC
Just bumping this up. These fields are confusing to those creating budgets and funds - and I would love to see these populated with data as orders are made (for reporting purposes).
Comment 2 Nicole C. Engard 2012-05-10 11:35:17 UTC
By the way there are fields in the aqbudgets table for these values that are empty:

  `budget_encumb` decimal(28,6) NULL default '0.00',
  `budget_expend` decimal(28,6) NULL default '0.00',
Comment 3 Katrin Fischer 2012-07-11 04:04:27 UTC
This bug exists since 2010-02-25 - we still have fields on the fund page that seem not to be used anywhere. People expect functionality behind these fields.
Comment 4 Koha Team Lyon 3 2012-08-31 08:44:19 UTC
I confirm that we except impatiently the budget freeze in the page neworderempty.pl when the amount remaining is lower than encumbrance.
Comment 5 mathieu saby 2013-01-22 15:40:22 UTC
Hello
I want to make a patch hiding encumbrance and expenditure in templates for aqbudgets.pl.
Do you agree with that?

M. Saby
Comment 6 Nicole C. Engard 2013-01-24 14:02:04 UTC
That's fine with me.
Comment 7 mathieu saby 2013-01-26 15:37:47 UTC Comment hidden (obsolete)
Comment 8 Nicole C. Engard 2013-01-26 23:21:41 UTC Comment hidden (obsolete)
Comment 9 Katrin Fischer 2013-02-08 18:12:27 UTC
Hi Mathieu,

I agree it's irritating to have those fields when they have no use. But at the moment it's possible to add/edit and delete those information. It's saved to the database and people might have entered data there. My suggestion would be to set the elements to display:none; with CSS instead of deleting them. This way people can make them show up again easily using a bit of jquery. Would that work for you?

Katrin
Comment 10 Nicole C. Engard 2013-02-09 14:09:18 UTC
Is the data saved to the database? I haven't tested recently, but my recollection is that that data never went anywhere - was never saved.
Comment 11 Katrin Fischer 2013-02-10 10:32:26 UTC
Yes, the data is saved. I tested it.
Comment 12 mathieu saby 2013-02-11 11:08:32 UTC
If the data is saved, I agree to rewrite the patch using "display:none".
M. Saby
Comment 13 mathieu saby 2013-02-22 11:38:43 UTC Comment hidden (obsolete)
Comment 14 mathieu saby 2013-02-22 11:39:04 UTC
new patch submitted.
M. saby
Comment 15 MJ Ray (software.coop) 2013-03-13 19:03:30 UTC
I reviewed this but I have not signed off because I am not comfortable with the style attribute being used without an id attribute that would allow it to be unhidden by IntranetUserCSS.

I also feel that it should be a css file rather than inline, but the coding guidelines are silent on both points, so I'm leaving this as Needs Signoff for now, in case someone else is willing.
Comment 16 Owen Leonard 2013-03-14 13:58:01 UTC Comment hidden (obsolete)
Comment 17 Jonathan Druart 2013-03-15 10:04:29 UTC
I just found a BibLibre development using these 2 fields. I will try to rebase it against master.
I switch this report to "in discussion" until I know what I can do.
Comment 18 mathieu saby 2013-03-15 10:06:47 UTC
ok Jonathan
but if Biblibre dev is proposed in Bugzilla, it won't be pushed into master before 3.12, more probably 3.14.
So we will still need to hide the field for olders versions.

M. Saby
Comment 19 Jonathan Druart 2013-03-15 10:44:10 UTC
(In reply to comment #18)
> ok Jonathan
> but if Biblibre dev is proposed in Bugzilla, it won't be pushed into master
> before 3.12, more probably 3.14.
> So we will still need to hide the field for olders versions.
> 
> M. Saby

QA comment:
Yes, it is relevant. I create a new report for the development (bug 9822).
This patch hides 2 unused fields when creating/modifying a fund.

Marked as Passed QA.
Comment 20 Jonathan Druart 2013-03-15 10:45:01 UTC
Created attachment 16159 [details] [review]
Bug 4266: Hide Encumbrance and Expenditure in aqbudgets.tt

Encumbrance and Expenditure fields are not taken into account by Koha,
but the data are saved in database.
This patch hide these fields in aqbudgets.tt
To test : check if the 2 fields are hidden when creating a new fund.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

This could certainly be done in a few different ways both with CSS and
JS, but this is a simple change and can be easily overridden:

$("#budget_encumb,#budget_expend").closest("li").show();

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 21 Jared Camins-Esakov 2013-03-15 22:54:18 UTC
This patch has been pushed to master.
Comment 22 Chris Cormack 2013-03-17 05:48:38 UTC
Pushed to 3.10.x and 3.8.x will be in 3.10.4 and 3.8.11