Bugzilla – Attachment 29427 Details for
Bug 12164
Rollover outstanding orders not yet received
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 12164: Add UI report
PASSED-QA-Bug-12164-Add-UI-report.patch (text/plain), 7.76 KB, created by
Katrin Fischer
on 2014-07-02 06:55:26 UTC
(
hide
)
Description:
[PASSED QA] Bug 12164: Add UI report
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-07-02 06:55:26 UTC
Size:
7.76 KB
patch
obsolete
>From 094a1390e71b09874a963b1b3a348cbb4d844c04 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 2 May 2014 10:00:11 +0200 >Subject: [PATCH] [PASSED QA] Bug 12164: Add UI report > >Signed-off-by: Paola Rossi <paola.rossi@cineca.it> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >--- > admin/aqbudgetperiods.pl | 12 +++ > .../prog/en/modules/admin/aqbudgetperiods.tt | 101 ++++++++++++++++++++- > 2 files changed, 110 insertions(+), 3 deletions(-) > >diff --git a/admin/aqbudgetperiods.pl b/admin/aqbudgetperiods.pl >index 17350ff..8e89aba 100755 >--- a/admin/aqbudgetperiods.pl >+++ b/admin/aqbudgetperiods.pl >@@ -243,6 +243,7 @@ elsif ( $op eq 'close_form' ) { > > elsif ( $op eq 'close_confirmed' ) { > my $to_budget_period_id = $input->param('to_budget_period_id'); >+ my $from_budget_period_id = $input->param('from_budget_period_id'); > my $move_remaining_unspent = $input->param('move_remaining_unspent'); > my $report = C4::Budgets::MoveOrders( > { >@@ -251,6 +252,17 @@ elsif ( $op eq 'close_confirmed' ) { > move_remaining_unspent => $move_remaining_unspent, > } > ); >+ >+ my $from_budget_period = GetBudgetPeriod($from_budget_period_id); >+ my $to_budget_period = GetBudgetPeriod($to_budget_period_id); >+ $template->param( >+ closed => 1, >+ budget_period_id => $from_budget_period->{budget_period_id}, >+ budget_period_description => $from_budget_period->{budget_period_description}, >+ from_budget_period => $from_budget_period, >+ to_budget_period => $to_budget_period, >+ report => $report, >+ ); > } > > # DEFAULT - DISPLAY AQPERIODS TABLE >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt >index 5161152..ffb4c26 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt >@@ -104,6 +104,45 @@ > return confirm ( alert_message ); > }); > [% END %] >+ [% IF closed %] >+ var oTable = $("#closed_report").dataTable($.extend(true, {}, dataTablesDefaults, { >+ // The following is a c/p from aqbudgets.tt and is a candidate for refactoring. >+ "fnDrawCallback": function ( oSettings ) { >+ if ( oSettings.aiDisplay.length == 0 ) >+ { >+ return; >+ } >+ >+ var nTrs = $('#closed_report tbody tr'); >+ var iColspan = nTrs[1].getElementsByTagName('td').length; >+ var sLastGroup = ""; >+ for ( var i=0 ; i<nTrs.length ; i++ ) >+ { >+ var iDisplayIndex = oSettings._iDisplayStart + i; >+ var sGroup = oSettings.aoData[ oSettings.aiDisplay[iDisplayIndex] ]._aData[0]; >+ if ( sGroup != sLastGroup ) >+ { >+ var nGroup = document.createElement( 'tr' ); >+ var nCell = document.createElement( 'td' ); >+ nCell.colSpan = iColspan; >+ nCell.className = "group"; >+ nCell.innerHTML = sGroup; >+ nGroup.appendChild( nCell ); >+ nTrs[i].parentNode.insertBefore( nGroup, nTrs[i] ); >+ sLastGroup = sGroup; >+ } >+ } >+ }, >+ "aoColumnDefs": [ >+ { "bVisible": false, "aTargets": [ 0, 1 ] }, >+ { "bSortable": false, "aTargets": ["_all"] } >+ ], >+ 'bSort': true, >+ 'aaSortingFixed': [[ 1, 'asc' ]], >+ 'bPaginate': false, >+ "bAutoWidth": false >+ })); >+ [% END %] > }); > </script> > >@@ -127,6 +166,9 @@ > [% IF close_form %]› > Close budget [% budget_period_description %] > [% END %] >+ [% IF closed %]› >+ Budget [% budget_period_description %] closed >+ [% END %] > </title> > > >@@ -175,7 +217,13 @@ > <!-- close a budget --> > [% IF close_form %] > <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> › >- Close budget <a href="cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id %]">[% budget_period_description %]</a> >+ Close budget <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id %]">[% budget_period_description %]</a> >+ [% END %] >+ >+ <!-- budget closed --> >+ [% IF closed %] >+ <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> › >+ Budget <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id %]">[% budget_period_description %]</a> closed > [% END %] > <!-- display budget periods list --> > <!-- ########################################## --> >@@ -189,7 +237,7 @@ > <div id="yui-main"> > <div class="yui-b"> > >-[% UNLESS close_form %] >+[% UNLESS close_form OR closed%] > [% INCLUDE 'budgets-admin-toolbar.inc' %] > [% END %] > >@@ -349,7 +397,7 @@ > <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Back</a> > [% ELSE %] > <h3>Choose the funds you want to move unreceived orders:</h3> >- Fund list of budget <a href="cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id %]">[% budget_period_description %]</a>: >+ Fund list of budget <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id %]">[% budget_period_description %]</a>: > <table id="budgeth"> > <thead> > <tr> >@@ -396,6 +444,53 @@ > </fieldset> > </form> > [% END %] >+[% ELSIF closed %] >+ <h3>Report after moving unreceived orders from budget [% from_budget_period.budget_period_description %] ([% from_budget_period.budget_period_startdate | $KohaDates %] - [% to_budget_period.budget_period_enddate | $KohaDates %]) to [% to_budget_period.budget_period_description %] ([% to_budget_period.budget_period_startdate | $KohaDates %] - [% to_budget_period.budget_period_enddate | $KohaDates%])</h3> >+ >+ <table id="closed_report"> >+ <thead> >+ <tr> >+ <td>Budget id</td> >+ <td>Basket</td> >+ <td>Ordernumber</td> >+ <td>Informations</td> >+ </tr> >+ </thead> >+ <tbody> >+ [% FOR r IN report %] >+ [% IF r.moved %] >+ [% IF r.orders_moved.size > 0 %] >+ [% FOR order IN r.orders_moved %] >+ <tr> >+ <td>[% r.budget.budget_name %] (id=[% r.budget.budget_id %]) Amount=[% r.budget.budget_amount %][% IF r.unspent_moved %] ([% r.unspent_moved %] remaining has been moved)[% END %]</td> >+ <td>[% order.basketname %]</td> >+ <td>[% order.ordernumber %]</td> >+ <td>Moved!</td> >+ </tr> >+ [% END %] >+ [% ELSE %] >+ <tr> >+ <td>[% r.budget.budget_name %] (id=[% r.budget.budget_id %])</td> >+ <td></td> >+ <td></td> >+ <td>There was no unreceived orders for this fund.</td> >+ </tr> >+ [% END %] >+ [% ELSE %] >+ [% IF r.error == 'budget_code_not_exists' %] >+ <tr> >+ <td>[% r.budget.budget_id %] [% r.budget.budget_amount %][% IF r.unspent_moved %] ([% r.unspent_moved %] remaining has been moved)[% END %]</td> >+ <td></td> >+ <td></td> >+ <td>This fund code does not exist in the destination budget.</td> >+ </tr> >+ [% END %] >+ [% END %] >+ </tr> >+ [% END %] >+ </tbody> >+ </table> >+ <a class="cancel" href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Back</a> > [% END %] > > <!-- DEFAULT display budget periods list --> >-- >1.9.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 12164
:
27905
|
27906
|
27907
|
27908
|
27909
|
27910
|
27911
|
28588
|
28589
|
28590
|
28591
|
28592
|
28593
|
28695
|
28702
|
28703
|
28704
|
28705
|
28706
|
28707
|
28708
|
29354
|
29355
|
29356
|
29422
|
29423
|
29424
|
29425
|
29426
|
29427
|
29428
|
29429
|
29430
|
29733
|
29734
|
29735
|
29736
|
29737
|
29738
|
29739
|
29740
|
29741
|
30043
|
30044