Bugzilla – Attachment 37203 Details for
Bug 4502
Perl error in acq budget planning
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 4502: Catch software error if no active budget defined
Bug-4502-Catch-software-error-if-no-active-budget-.patch (text/plain), 1.92 KB, created by
Jonathan Druart
on 2015-03-25 08:11:52 UTC
(
hide
)
Description:
Bug 4502: Catch software error if no active budget defined
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-03-25 08:11:52 UTC
Size:
1.92 KB
patch
obsolete
>From 5712662f7ed6e6eb3515abe531a447569b8b9ecc Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Tue, 24 Mar 2015 15:54:37 +0100 >Subject: [PATCH] Bug 4502: Catch software error if no active budget defined > >To reproduce: >0/ On a fresh install (so no budget defined), create a budget and don't >mark it as active. >1/ Go on the budget detail page > Plannin > By months >2/ Click on the 'Select' button (on the left) > >Without this patch, you get a software error: > Usage: Date::Calc::Delta_YMD(year1, month1, day1, year2, month2, day2) >With this patch, you get a sweet alert message inviting you to create an >active budget. > >Note: This script is a mess... >--- > admin/aqplan.pl | 4 ++++ > koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt | 2 ++ > 2 files changed, 6 insertions(+) > >diff --git a/admin/aqplan.pl b/admin/aqplan.pl >index dda1d21..e792ca2 100755 >--- a/admin/aqplan.pl >+++ b/admin/aqplan.pl >@@ -106,6 +106,10 @@ if ( $budget_period_locked == 1 && not defined $show_actual ) { > > $authcat = 'Asort1' if not defined $authcat; # defaults to Asort if no authcat given > >+# If no active budget is defined, budget_period_id is undef >+# This is the behavior of GetBudgetPeriod >+$authcat = '' unless $budget_period_id; >+ > my $budget_id = $input->param('budget_id'); > my $op = $input->param("op"); > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt >index b465f8c..2cfb912 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt >@@ -224,6 +224,8 @@ > > </form> > >+ [% ELSIF not budget_period_id %] >+<div class="dialog alert">No active budget defined. You should define one before continuing.</div> > [% ELSE %] > <div class="dialog message">No funds to display for this search criteria</div> > [% END %] >-- >2.1.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 4502
:
37181
|
37203
|
37354
|
37533
|
37534
|
39081
|
39082
|
39083
|
39084
|
42771
|
44498
|
44499
|
44500
|
44932
|
44945
|
44946
|
44947