Bugzilla – Attachment 3610 Details for
Bug 5963
Acquisitions: Add the capability to have a filter by active budget
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Sqashed all 3 patches into one
0001-SIGNED-OFF-Bug-5963-Add-the-ability-to-filter-budget.patch (text/plain), 5.18 KB, created by
Katrin Fischer
on 2011-04-04 09:45:27 UTC
(
hide
)
Description:
Sqashed all 3 patches into one
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2011-04-04 09:45:27 UTC
Size:
5.18 KB
patch
obsolete
>From da444bb0fd99c7b2b0f6484c5178b3426e00c0fd Mon Sep 17 00:00:00 2001 >From: Christophe Croullebois <christophe.croullebois@biblibre.com> >Date: Tue, 26 Oct 2010 10:24:22 +0200 >Subject: [PATCH] [SIGNED-OFF] Bug 5963 : Add the ability to filter budgets using the active column >Content-Type: text/plain; charset="utf-8" > >(MT #4717) Add the capability to have a filter by active budget > >the sub GetBudgetHierarchy return aqbudgetperiods.budget_period_active to have acces to a new filtering way, > more the neworderempty.pl page have a check box "shox all". > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> > >Bug 5963: Modify GetBudgetsHierarchy to returns all funds > >GetBudgetHierarchy now returns all funds, not only those that are part >of an active budget. >Fixed a layout problem. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >--- > C4/Budgets.pm | 16 +++---- > acqui/neworderempty.pl | 1 + > .../prog/en/modules/acqui/neworderempty.tmpl | 40 +++++++++++++++++++- > 3 files changed, 46 insertions(+), 11 deletions(-) > >diff --git a/C4/Budgets.pm b/C4/Budgets.pm >index 0882756..d80a820 100644 >--- a/C4/Budgets.pm >+++ b/C4/Budgets.pm >@@ -487,17 +487,15 @@ sub ModBudgetPeriod { > > # ------------------------------------------------------------------- > sub GetBudgetHierarchy { >- my ($budget_period_id, $branchcode, $owner) = @_; >- my @bind_params; >- my $dbh = C4::Context->dbh; >- my $query = qq| >- SELECT aqbudgets.* >+ my ( $budget_period_id, $branchcode, $owner ) = @_; >+ my @bind_params; >+ my $dbh = C4::Context->dbh; >+ my $query = qq| >+ SELECT aqbudgets.*, aqbudgetperiods.budget_period_active > FROM aqbudgets >- LEFT JOIN aqbudgetperiods >- ON aqbudgetperiods.budget_period_id=aqbudgets.budget_period_id |; >+ JOIN aqbudgetperiods USING (budget_period_id)|; >+ > my @where_strings; >- # Pick out the active ones >- push @where_strings, 'aqbudgetperiods.budget_period_active=1'; > # show only period X if requested > if ($budget_period_id) { > push @where_strings," aqbudgets.budget_period_id = ?"; >diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl >index 0ba7180..e6ceccc 100755 >--- a/acqui/neworderempty.pl >+++ b/acqui/neworderempty.pl >@@ -263,6 +263,7 @@ foreach my $r (@{$budgets}) { > push @{$budget_loop}, { > b_id => $r->{budget_id}, > b_txt => $r->{budget_name}, >+ b_active => $r->{budget_period_active}, > b_sel => ( $r->{budget_id} == $budget_id ) ? 1 : 0, > }; > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl >index 76f5a3f..fb57ff1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl >@@ -64,7 +64,39 @@ ff.submit(); > > } > >- >+$(document).ready(function() >+ { >+ //We apply the fonction only for modify option >+ <!--TMPL_IF NAME="quantityrec"--> >+ $('#quantity').blur(function() >+ { >+ // if user decreases the quantity >+ if($(this).val() < <!-- TMPL_VAR name="quantityrec" -->) >+ { >+ alert("You have deleted item(s) in the order, don't forget to delete it(them) in the catalog"); >+ return true; >+ } >+ else >+ { >+ // if user increases the quantity >+ alert("You can't add a new item, please create a new order line"); >+ // and we replace the original value >+ $(this).val(<!-- TMPL_VAR name="quantityrec" -->) >+ return false; >+ } >+ }); >+ <!-- /TMPL_IF --> >+ >+ $('#showallbudgets').click(function() { >+ if ( $('#budget_id .b_inactive').is(":visible") ) >+ { >+ $('#budget_id .b_inactive').hide(); >+ } >+ else { >+ $('#budget_id .b_inactive').show(); >+ } >+ }); >+ }); > //]]> > </script> > </head> >@@ -273,10 +305,14 @@ ff.submit(); > <!-- TMPL_IF NAME="b_sel" --> > <option value="<!-- TMPL_VAR NAME='b_id' -->" selected="selected"><!-- TMPL_VAR NAME="b_txt" --></option> > <!-- TMPL_ELSE --> >- <option value="<!-- TMPL_VAR NAME='b_id' -->"><!-- TMPL_VAR NAME="b_txt" --></option> >+ <!-- TMPL_IF NAME="b_active" --><option value="<!-- TMPL_VAR NAME='b_id' -->"><!-- TMPL_VAR NAME="b_txt" --></option> >+ <!-- TMPL_ELSE --><option value="<!-- TMPL_VAR NAME='b_id' -->" class="b_inactive" style="display : none;"><!-- TMPL_VAR NAME="b_txt" --></option> >+ <!-- /TMPL_IF --> > <!-- /TMPL_IF --> > <!-- /TMPL_LOOP --> > </select> >+ <label for="showallbudgets" style="float:none;width:auto;"> Show all:</label> >+ <input type="checkbox" id="showallbudgets" /> > <!--/TMPL_IF--> > </li> > <li> >-- >1.7.1 >
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 5963
:
3453
|
3571
|
3573
|
3576
| 3610