Bugzilla – Attachment 65442 Details for
Bug 18941
C4::Budgets GetBudgetByCode should return active budgets over inactive budgets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 18941 - C4::Budgets GetBudgetByCode should return active budgets over inactive budgets
SIGNED-OFF-Bug-18941---C4Budgets-GetBudgetByCode-s.patch (text/plain), 1.35 KB, created by
Mark Tompsett
on 2017-08-03 02:12:32 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 18941 - C4::Budgets GetBudgetByCode should return active budgets over inactive budgets
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2017-08-03 02:12:32 UTC
Size:
1.35 KB
patch
obsolete
>From 099254ab265e61536dafc089620780b56b243a32 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 14 Jul 2017 11:25:42 +0000 >Subject: [PATCH] [SIGNED-OFF] Bug 18941 - C4::Budgets GetBudgetByCode should > return active budgets over inactive budgets > >To test: >1 - Create an active budget >2 - Create an inactive budget >3 - Ensure they each have a fund with the same code >4 - Set MarcFieldsToOrder to get the budget_code from a marc field >5 - Stage a file using the duplicated code >6 - Add to a basket from the staged file >7 - Add the items >8 - Note funds are encumbered from the inactive budget >9 - Apply patch >10 - Repeat 5-8 with a new basket >11 - Note the active budget is now used > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > C4/Budgets.pm | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/C4/Budgets.pm b/C4/Budgets.pm >index bcc84db83a..1c0c201f1f 100644 >--- a/C4/Budgets.pm >+++ b/C4/Budgets.pm >@@ -777,10 +777,11 @@ sub GetBudgetByCode { > > my $dbh = C4::Context->dbh; > my $query = qq{ >- SELECT * >+ SELECT aqbudgets.* > FROM aqbudgets >+ JOIN aqbudgetperiods USING (budget_period_id) > WHERE budget_code = ? >- ORDER BY budget_id DESC >+ ORDER BY budget_period_active DESC, budget_id DESC > LIMIT 1 > }; > my $sth = $dbh->prepare( $query ); >-- >2.11.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 18941
:
65049
|
65050
|
65125
|
65126
|
65441
|
65442
|
65847
|
65848