Bugzilla – Attachment 60960 Details for
Bug 13392
New statistics wizard for suggestions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13392 - Replace using of C4::Dates and C4::ItemType by Koha::DateUtils and Koha::ItemTypes
Bug-13392---Replace-using-of-C4Dates-and-C4ItemTyp.patch (text/plain), 1.96 KB, created by
Julian Maurice
on 2017-03-09 14:35:47 UTC
(
hide
)
Description:
Bug 13392 - Replace using of C4::Dates and C4::ItemType by Koha::DateUtils and Koha::ItemTypes
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2017-03-09 14:35:47 UTC
Size:
1.96 KB
patch
obsolete
>From a942eddcae2c4be968a39374ca91db02afbb800f Mon Sep 17 00:00:00 2001 >From: Alex Arnaud <alex.arnaud@biblibre.com> >Date: Mon, 14 Mar 2016 11:55:31 +0100 >Subject: [PATCH] Bug 13392 - Replace using of C4::Dates and C4::ItemType by > Koha::DateUtils and Koha::ItemTypes > >--- > reports/suggestions_stats.pl | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > >diff --git a/reports/suggestions_stats.pl b/reports/suggestions_stats.pl >index 6c0cef8fc5..10a5305bb1 100755 >--- a/reports/suggestions_stats.pl >+++ b/reports/suggestions_stats.pl >@@ -27,8 +27,7 @@ use C4::Output; > use C4::Branch; > use C4::Budgets; > use C4::Category; >-use C4::Dates qw/format_date format_date_in_iso/; >-use C4::ItemType; >+use Koha::DateUtils qw/output_pref dt_from_string/; > use C4::Koha; > use C4::Reports; > >@@ -123,7 +122,7 @@ foreach my $branch (@$branches) { > $display_values->{branchcode}->{$branchcode} = $branch->{branchname}; > } > >-my @itemtypes = C4::ItemType->all; >+my @itemtypes = Koha::ItemTypes->search; > foreach my $itemtype (@itemtypes) { > my $itype = $itemtype->itemtype; > $display_values->{itemtype}->{$itype} = $itemtype->description; >@@ -184,11 +183,15 @@ sub calculate { > foreach my $filter (qw(suggesteddate rejecteddate ordereddate)) { > if ($filters->{"${filter}_from"}) { > push @conditions, "$filter >= ?"; >- push @bind_values, format_date_in_iso($filters->{"${filter}_from"}); >+ push @bind_values, output_pref({ >+ dt => dt_from_string( $filters->{"${filter}_from"} ), >+ dateformat => 'iso', dateonly => 1 }); > } > if ($filters->{"${filter}_to"}) { > push @conditions, "$filter <= ?"; >- push @bind_values, format_date_in_iso($filters->{"${filter}_to"}); >+ push @bind_values, output_pref({ >+ dt => dt_from_string( $filters->{"${filter}_to"} ), >+ dateformat => 'iso', dateonly => 1 }); > } > } > >-- >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 13392
:
34124
|
34125
|
34135
|
34136
|
34328
|
34329
|
35835
|
35836
|
35837
|
36188
|
36189
|
36190
|
36343
|
36344
|
36345
|
40305
|
40306
|
40307
|
40308
|
48291
|
48292
|
48293
|
48294
|
49088
|
51995
|
51996
|
51997
|
51998
|
51999
|
56110
|
56889
|
60956
|
60957
|
60958
|
60959
|
60960
|
60961
|
60962
|
64459
|
64460
|
64461
|
64462
|
64463
|
64464
|
64465
|
78622
|
78623
|
78624
|
78625
|
78626
|
78627
|
78628
|
78629