Bugzilla – Attachment 7848 Details for
Bug 7166
Modify order notes when basket is closed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7166 Adds edit order notes when the basket is closed
0001-Bug-7166-Adds-edit-order-notes-when-the-basket-is-cl.patch (text/plain), 12.24 KB, created by
Jonathan Druart
on 2012-02-24 08:18:22 UTC
(
hide
)
Description:
Bug 7166 Adds edit order notes when the basket is closed
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2012-02-24 08:18:22 UTC
Size:
12.24 KB
patch
obsolete
>From 02890d72f201be8ad7ec5fa70d7ef51952b96d1b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 17 Feb 2012 16:16:47 +0100 >Subject: [PATCH 1/1] Bug 7166: Adds edit order notes when the basket is > closed > > When you are on parcel.pl or basket.pl you can now add or edit a note > for each order. > > To test: > Create orders with and without note. > Edit/Add the note on basket.pl page > > Close the basket. > Check you can add/edit the order note on parcel.pl page >--- > acqui/modordernotes.pl | 72 ++++++++++++++++++++ > acqui/neworderempty.pl | 6 ++ > .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 29 +++++--- > .../prog/en/modules/acqui/modordernotes.tt | 47 +++++++++++++ > .../prog/en/modules/acqui/neworderempty.tt | 12 ++-- > .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 6 ++ > 6 files changed, 154 insertions(+), 18 deletions(-) > create mode 100755 acqui/modordernotes.pl > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/acqui/modordernotes.tt > >diff --git a/acqui/modordernotes.pl b/acqui/modordernotes.pl >new file mode 100755 >index 0000000..1518ad4 >--- /dev/null >+++ b/acqui/modordernotes.pl >@@ -0,0 +1,72 @@ >+#!/usr/bin/perl >+ >+# Copyright 2011 BibLibre SARL >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it under the >+# terms of the GNU General Public License as published by the Free Software >+# Foundation; either version 2 of the License, or (at your option) any later >+# version. >+# >+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY >+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR >+# A PARTICULAR PURPOSE. See the GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License along >+# with Koha; if not, write to the Free Software Foundation, Inc., >+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. >+ >+=head1 NAME >+ >+modordernotes.pl >+ >+=head1 DESCRIPTION >+ >+Modify just notes when basket is closed. >+ >+=cut >+ >+use Modern::Perl; >+ >+use CGI; >+use C4::Auth; >+use C4::Output; >+use C4::Acquisition; >+ >+my $input = new CGI; >+my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( { >+ template_name => 'acqui/modordernotes.tmpl', >+ query => $input, >+ type => 'intranet', >+ authnotrequired => 0, >+ flagsrequired => { 'acquisition' => '*' }, >+ debug => 1, >+} ); >+ >+my $op = $input->param('op'); >+my $ordernumber = $input->param('ordernumber'); >+my $referrer = $input->param('referrer') || $input->referer(); >+ >+my $order = GetOrder($ordernumber); >+ >+if($op and $op eq 'save') { >+ my $ordernotes = $input->param('ordernotes'); >+ $order->{'notes'} = $ordernotes; >+ ModOrder($order); >+} else { >+ $template->param( >+ ordernotes => $order->{'notes'}, >+ ); >+} >+ >+if($op) { >+ $template->param($op => 1); >+} >+ >+$template->param( >+ ordernumber => $ordernumber, >+ referrer => $referrer, >+); >+ >+ >+output_html_with_http_headers $input, $cookie, $template->output; >diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl >index f3d107d..e56ba77 100755 >--- a/acqui/neworderempty.pl >+++ b/acqui/neworderempty.pl >@@ -123,6 +123,12 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > ); > > my $marcflavour = C4::Context->preference('marcflavour'); >+ >+if(!$basketno) { >+ my $order = GetOrder($ordernumber); >+ $basketno = $order->{'basketno'}; >+} >+ > my $basket = GetBasket($basketno); > my $contract = &GetContract($basket->{contractnumber}); > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >index 59f647c..ce43f45 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >@@ -278,19 +278,24 @@ > <td> > <p>[% IF ( books_loo.order_received ) %] (rcvd)[% END %] > <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% books_loo.biblionumber %]">[% books_loo.title |html %]</a> by [% books_loo.author %] >- [% IF ( books_loo.notes ) %] [% books_loo.notes %][% END %] >- [% IF ( books_loo.isbn ) %] - [% books_loo.isbn %][% END %] >- [% IF ( books_loo.issn ) %] - [% books_loo.issn %][% END %] >- [% IF ( books_loo.publishercode ) %], [% books_loo.publishercode %][% END %] >- [% IF ( books_loo.publicationyear ) %], [% books_loo.publicationyear %][% END %] >- [% IF ( books_loo.suggestionid ) %] >- <br/> >- Suggested by: [% books_loo.surnamesuggestedby %][% IF ( books_loo.firstnamesuggestedby ) %], [% books_loo.firstnamesuggestedby %] [% END %] >- (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% books_loo.suggestionid %]">suggestion #[% books_loo.suggestionid %]</a>) >- [% END %] >- [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement %][% END %] >+ <br /> >+ [% IF ( books_loo.notes ) %] >+ [% books_loo.notes|html %] - <a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno %]">Change note</a> >+ [% ELSE %] >+ <a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno %]">Add note</a> >+ [% END %] >+ [% IF ( books_loo.isbn ) %] - [% books_loo.isbn %][% END %] >+ [% IF ( books_loo.issn ) %] - [% books_loo.issn %][% END %] >+ [% IF ( books_loo.publishercode ) %], [% books_loo.publishercode %][% END %] >+ [% IF ( books_loo.publicationyear ) %], [% books_loo.publicationyear %][% END %] >+ [% IF ( books_loo.suggestionid ) %] >+ <br/> >+ Suggested by: [% books_loo.surnamesuggestedby %][% IF ( books_loo.firstnamesuggestedby ) %], [% books_loo.firstnamesuggestedby %] [% END %] >+ (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% books_loo.suggestionid %]">suggestion #[% books_loo.suggestionid %]</a>) >+ [% END %] >+ [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement %][% END %] > </p> >- </td> >+ </td> > <td class="number">[% books_loo.rrp %]</td> > <td class="number">[% books_loo.ecost %]</td> > <td class="number">[% books_loo.quantity %]</td> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/modordernotes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/modordernotes.tt >new file mode 100644 >index 0000000..ea205d7 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/modordernotes.tt >@@ -0,0 +1,47 @@ >+[% INCLUDE 'doc-head-open.inc' %] >+<title>Koha › Acquisition › Change order notes</title> >+[% INCLUDE 'doc-head-close.inc' %] >+<script type="text/javascript"> >+//<![CDATA[ >+function returnToReferrer() { >+ window.location.href = "[% referrer %]"; >+} >+//]]> >+</script> >+</head> >+ >+<body> >+[% INCLUDE 'header.inc' %] >+ >+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisition</a> › Change order notes</div> >+ >+<div id="doc3" class="yui-t2"> >+ >+<div id="bd"> >+ <div id="yui-main"> >+ <div class="yui-b"> >+ [% IF ( save ) %] >+ <p>Order [% ordernumber %] successfully modified.</p> >+ <p>Return to <a href="[% referrer %]">previous page</a></p> >+ [% ELSE %] >+ <h1>Change order notes (order no. [% ordernumber %])</h1> >+ >+ <form action="/cgi-bin/koha/acqui/modordernotes.pl" method="post"> >+ <fieldset> >+ <label for="ordernotes">Notes:</label> >+ <textarea id="ordernotes" name="ordernotes">[% ordernotes %]</textarea> >+ </fieldset> >+ <input type="hidden" name="referrer" value="[% referrer %]" /> >+ <input type="hidden" name="ordernumber" value="[% ordernumber %]" /> >+ <input type="hidden" name="op" value="save" /> >+ <fieldset class="action"> >+ <input type="submit" value="Change" /> >+ <input type="button" value="Cancel" onclick="returnToReferrer();" /> >+ </fieldset> >+ </form> >+ [% END %] >+ </div> >+ </div> >+</div> >+[% INCLUDE 'intranet-bottom.inc' %] >+ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >index a27d151..51933e6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >@@ -170,9 +170,9 @@ $(document).ready(function() > > [% IF ( basketno ) %] > <div id="acqui_basket_summary" class="yui-g"> >- <fieldset class="rows"> >+ <fieldset class="rows"> > <legend>Basket details</legend> >- <ol> >+ <ol> > [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote %]</li>[% END %] > [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote %]</li>[% END %] > [% IF ( basketcontractno ) %] >@@ -198,12 +198,12 @@ $(document).ready(function() > <input type="hidden" value="mod_basket" name="op" /> > <input type="hidden" name="booksellerid" value="[% booksellerid %]" /> > </li> >- <fieldset class="action"><input type="submit" value="Change basketgroup" /></fieldset> >- </form> >+ <fieldset class="action"><input type="submit" value="Change basketgroup" /></fieldset> > [% END %] >+ </form> > [% END %] >- </ol> >-</fieldset> >+ </ol> >+ </fieldset> > </div> > [% END %] > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >index afc9b65..7570663 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >@@ -246,6 +246,12 @@ > Suggested by: [% loop_order.surnamesuggestedby %][% IF ( loop_order.firstnamesuggestedby ) %], [% loop_order.firstnamesuggestedby %] [% END %] > (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% loop_order.suggestionid %]">suggestion #[% loop_order.suggestionid %]</a>) > [% END %] >+ <br /> >+ [% IF ( loop_order.notes ) %] >+ [% loop_order.notes|html %] - <a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% loop_order.ordernumber %]&referrer=/cgi-bin/koha/acqui/parcel.pl%3Fsupplierid=[% loop_order.supplierid %]&datereceived=[% loop_order.invoicedatereceived %]&invoice=[% loop_order.invoice %]">Change note</a> >+ [% ELSE %] >+ <a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% loop_order.ordernumber %]&referrer=/cgi-bin/koha/acqui/parcel.pl%3Fsupplierid=[% loop_order.supplierid %]&datereceived=[% loop_order.invoicedatereceived %]&invoice=[% loop_order.invoice %]">Add note</a> >+ [% END %] > </td> > <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% loop_order.biblionumber %]" title="MARC" rel="gb_page_center[600,500]">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% loop_order.biblionumber %]" title="MARC" rel="gb_page_center[600,500]">Card</a></td> > <td>[% loop_order.quantity %]</td> >-- >1.7.7.3 >
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 7166
:
7068
|
7736
|
7848
|
7887
|
7888
|
7889
|
7943
|
7950
|
7955
|
8289