From a72a4499379602da1cce8ad1deb093bc92f44b6a Mon Sep 17 00:00:00 2001 From: Bouzid Fergani Date: Mon, 30 Nov 2015 16:40:55 -0500 Subject: [PATCH] Bug 11371 - fix problem with right data in each column in csv file fix problem with right data in each column correct format date tidying up in template file --- .../csv_headers/reports/orders_by_budget.tt | 2 +- .../prog/en/modules/reports/orders_by_budget.tt | 158 ++++++++++---------- reports/orders_by_fund.pl | 5 +- 3 files changed, 80 insertions(+), 85 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/reports/orders_by_budget.tt b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/reports/orders_by_budget.tt index c80440f..49dfc9d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/reports/orders_by_budget.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/reports/orders_by_budget.tt @@ -1 +1 @@ -Fund[% sep %]Basket[% sep %]Basket by[% sep %]biblionumber[% sep %]Title[% sep %]Currency[% sep %]Vendor Price[% sep %]RRP[% sep %]Budgeted Cost[% sep %]Quantity[% sep %]Total RRP[% sep %]Total Cost[% sep %]Entry Date[% sep %]Date Received[% sep %]Notes +Fund[% sep %]"Basket Num"[% sep %]"Basket Name"[% sep %]"authorised By"[% sep %]"Biblio Number"[% sep %]Title[% sep %]Currency[% sep %]"Vendor Price"[% sep %]RRP[% sep %]"Budgeted Cost"[% sep %]Quantity[% sep %]"Total RRP"[% sep %]"Total Cost"[% sep %]"Entry Date"[% sep %]"Date Received"[% sep %]Notes diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt index 88371b9..bc973ab 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt @@ -17,28 +17,26 @@
-
-
-
-[% IF ( current_budget_name ) %] -

Orders for fund '[% current_budget_name %]'

-[% ELSE %] -

Orders by fund

+
+
+
+ +[% IF ( current_budget_name ) %]

Orders for fund '[% current_budget_name %]'

+[% ELSE %]

Orders by fund

[% END %] [% IF ( get_orders ) %] - -
- [% IF ( total ) %] - Orders found: [% total %] - [% ELSE %] - No order found - [% END %] -
+
+ [% IF ( total ) %] + Orders found: [% total %] + [% ELSE %] + No order found + [% END %] +
[% IF ( ordersloop ) %] - - + + @@ -54,24 +52,18 @@ - - - - [% FOREACH ordersloo IN ordersloop %] - [% UNLESS ( loop.odd ) %] - - [% ELSE %] - - [% END %] + + + + [% FOREACH ordersloo IN ordersloop %] + [% UNLESS ( loop.odd ) %] + [% ELSE %] + [% END %] - + - - + + @@ -82,59 +74,63 @@ - - [% END %] - - - - -
Fund Basket Basket NameEntry Date Date Received Notes
[% ordersloo.budget_name |html %] - [% ordersloo.basketno |html %] - [% ordersloo.basketno |html %] [% ordersloo.basketname |html %][% ordersloo.authorisedbyname %] - [% ordersloo.title |html %] - [% ordersloo.authorisedbyname %] [% ordersloo.title |html %] [% ordersloo.currency %] [% ordersloo.listprice %] [% ordersloo.rrp %][% ordersloo.entrydate %] [% ordersloo.datereceived %] [% ordersloo.notes |html %]
TOTAL[% total_quantity %][% total_rrp %][% total_ecost %]
+ + [% END %] + + TOTAL[% total_quantity %][% total_rrp %][% total_ecost %] + [% END %] [% ELSE %] - -
-
- Filters -
  1. + + + [% FOREACH budgetsloo IN budgetsloop %] + [% IF ( budgetsloo.selected ) %] + + [% ELSE %] + [% END %] -
  2. -
- -
- Output -
  1. -
  2. - - -
-
+ + + + +
+ Output +
  1. +
  2. + + + + + + +
+
-
-
-
+
+ +
+ [% END %] diff --git a/reports/orders_by_fund.pl b/reports/orders_by_fund.pl index a8fc2a7..05c42ff 100755 --- a/reports/orders_by_fund.pl +++ b/reports/orders_by_fund.pl @@ -34,7 +34,6 @@ use C4::Output; use C4::Budgets; use C4::Biblio; use C4::Reports; -use C4::Dates qw/format_date/; use C4::Acquisition; #GetBasket() @@ -111,8 +110,8 @@ if ( $get_orders ) { $order->{'total_ecost'} = $order->{'quantity'} * $order->{'ecost'}; # Format the dates and currencies correctly - $order->{'datereceived'} = format_date($order->{'datereceived'}); - $order->{'entrydate'} = format_date($order->{'entrydate'}); + $order->{'datereceived'} = Koha::DateUtils::output_pref(Koha::DateUtils::dt_from_string($order->{'datereceived'})); + $order->{'entrydate'} = Koha::DateUtils::output_pref(Koha::DateUtils::dt_from_string($order->{'entrydate'})); $order->{'listprice'} = sprintf( "%.2f", $order->{'listprice'} ); $order->{'rrp'} = sprintf( "%.2f", $order->{'rrp'} ); $order->{'ecost'} = sprintf( "%.2f", $order->{'ecost'}); -- 1.7.9.5