View | Details | Raw Unified | Return to bug 7166
Collapse All | Expand All

(-)a/acqui/modordernotes.pl (+72 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
# Copyright 2011 BibLibre SARL
4
# This file is part of Koha.
5
#
6
# Koha is free software; you can redistribute it and/or modify it under the
7
# terms of the GNU General Public License as published by the Free Software
8
# Foundation; either version 2 of the License, or (at your option) any later
9
# version.
10
#
11
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
12
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
14
#
15
# You should have received a copy of the GNU General Public License along
16
# with Koha; if not, write to the Free Software Foundation, Inc.,
17
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
19
=head1 NAME
20
21
modordernotes.pl
22
23
=head1 DESCRIPTION
24
25
Modify just notes when basket is closed.
26
27
=cut
28
29
use Modern::Perl;
30
31
use CGI;
32
use C4::Auth;
33
use C4::Output;
34
use C4::Acquisition;
35
36
my $input = new CGI;
37
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
38
    template_name   => 'acqui/modordernotes.tmpl',
39
    query           => $input,
40
    type            => 'intranet',
41
    authnotrequired => 0,
42
    flagsrequired   => { 'acquisition' => '*' },
43
    debug           => 1,
44
} );
45
46
my $op = $input->param('op');
47
my $ordernumber = $input->param('ordernumber');
48
my $referrer = $input->param('referrer') || $input->referer();
49
50
my $order = GetOrder($ordernumber);
51
52
if($op and $op eq 'save') {
53
    my $ordernotes = $input->param('ordernotes');
54
    $order->{'notes'} = $ordernotes;
55
    ModOrder($order);
56
} else {
57
    $template->param(
58
        ordernotes => $order->{'notes'},
59
    );
60
}
61
62
if($op) {
63
    $template->param($op => 1);
64
}
65
66
$template->param(
67
    ordernumber => $ordernumber,
68
    referrer => $referrer,
69
);
70
71
72
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/acqui/neworderempty.pl (+5 lines)
Lines 121-126 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
121
    }
121
    }
122
);
122
);
123
123
124
if(!$basketno) {
125
    my $order = GetOrder($ordernumber);
126
    $basketno = $order->{'basketno'};
127
}
128
124
my $basket = GetBasket($basketno);
129
my $basket = GetBasket($basketno);
125
my $contract = &GetContract($basket->{contractnumber});
130
my $contract = &GetContract($basket->{contractnumber});
126
131
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-6 / +11 lines)
Lines 277-289 Link Here
277
                        <td>
277
                        <td>
278
                            <p>[% IF ( books_loo.order_received ) %] (rcvd)[% END %]
278
                            <p>[% IF ( books_loo.order_received ) %] (rcvd)[% END %]
279
                                <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% books_loo.biblionumber %]">[% books_loo.title |html %]</a> by [% books_loo.author %]
279
                                <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% books_loo.biblionumber %]">[% books_loo.title |html %]</a> by [% books_loo.author %]
280
                                    [% IF ( books_loo.notes ) %] [% books_loo.notes %][% END %]
280
                                <br />
281
                                    [% IF ( books_loo.isbn ) %] - [% books_loo.isbn %][% END %]
281
                                [% IF ( books_loo.notes ) %]
282
                                    [% IF ( books_loo.issn ) %] - [% books_loo.issn %][% END %]
282
                                    [% 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>
283
                                    [% IF ( books_loo.publishercode ) %], [% books_loo.publishercode %][% END %]
283
                                [% ELSE %]
284
                                    [% IF ( books_loo.publicationyear ) %], [% books_loo.publicationyear %][% END %]
284
                                    <a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno %]">Add note</a>
285
                                [% END %]
286
                                [% IF ( books_loo.isbn ) %] - [% books_loo.isbn %][% END %]
287
                                [% IF ( books_loo.issn ) %] - [% books_loo.issn %][% END %]
288
                                [% IF ( books_loo.publishercode ) %], [% books_loo.publishercode %][% END %]
289
                                [% IF ( books_loo.publicationyear ) %], [% books_loo.publicationyear %][% END %]
285
                            </p>
290
                            </p>
286
                            </td>
291
                        </td>
287
                        <td class="number">[% books_loo.rrp %]</td>
292
                        <td class="number">[% books_loo.rrp %]</td>
288
                        <td class="number">[% books_loo.ecost %]</td>
293
                        <td class="number">[% books_loo.ecost %]</td>
289
                        <td class="number">[% books_loo.quantity %]</td>
294
                        <td class="number">[% books_loo.quantity %]</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/modordernotes.tt (+47 lines)
Line 0 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Acquisition &rsaquo; Change order notes</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
<script type="text/javascript">
5
//<![CDATA[
6
function returnToReferrer() {
7
    window.location.href = "[% referrer %]";
8
}
9
//]]>
10
</script>
11
</head>
12
13
<body>
14
[% INCLUDE 'header.inc' %]
15
16
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisition</a> &rsaquo; Change order notes</div>
17
18
<div id="doc3" class="yui-t2">
19
20
<div id="bd">
21
  <div id="yui-main">
22
    <div class="yui-b">
23
        [% IF ( save ) %]
24
            <p>Order [% ordernumber %] successfully modified.</p>
25
            <p>Return to <a href="[% referrer %]">previous page</a></p>
26
        [% ELSE %]
27
          <h1>Change order notes (order no. [% ordernumber %])</h1>
28
29
          <form action="/cgi-bin/koha/acqui/modordernotes.pl" method="post">
30
            <fieldset>
31
              <label for="ordernotes">Notes:</label>
32
              <textarea id="ordernotes" name="ordernotes">[% ordernotes %]</textarea>
33
            </fieldset>
34
            <input type="hidden" name="referrer" value="[% referrer %]" />
35
            <input type="hidden" name="ordernumber" value="[% ordernumber %]" />
36
            <input type="hidden" name="op" value="save" />
37
            <fieldset class="action">
38
              <input type="submit" value="Change" />
39
              <input type="button" value="Cancel" onclick="returnToReferrer();" />
40
            </fieldset>
41
          </form>
42
        [% END %]
43
    </div>
44
  </div>
45
</div>
46
[% INCLUDE 'intranet-bottom.inc' %]
47
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt (-6 / +6 lines)
Lines 171-179 $(document).ready(function() Link Here
171
171
172
[% IF ( basketno ) %]
172
[% IF ( basketno ) %]
173
    <div id="acqui_basket_summary"  class="yui-g">
173
    <div id="acqui_basket_summary"  class="yui-g">
174
	<fieldset class="rows">
174
    <fieldset class="rows">
175
        <legend>Basket details</legend>
175
        <legend>Basket details</legend>
176
		<ol>
176
        <ol>
177
        [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote %]</li>[% END %]
177
        [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote %]</li>[% END %]
178
        [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote %]</li>[% END %]
178
        [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote %]</li>[% END %]
179
        [% IF ( basketcontractno ) %]
179
        [% IF ( basketcontractno ) %]
Lines 199-210 $(document).ready(function() Link Here
199
                <input type="hidden" value="mod_basket" name="op" />
199
                <input type="hidden" value="mod_basket" name="op" />
200
                <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
200
                <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
201
            </li>
201
            </li>
202
		<fieldset class="action"><input type="submit" value="Change basketgroup" /></fieldset>
202
            <fieldset class="action"><input type="submit" value="Change basketgroup" /></fieldset>
203
        </form>
204
        [% END %]
203
        [% END %]
204
        </form>
205
        [% END %]
205
        [% END %]
206
			</ol>
206
        </ol>
207
</fieldset>
207
    </fieldset>
208
    </div>
208
    </div>
209
[% END %]
209
[% END %]
210
210
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt (-1 / +6 lines)
Lines 241-246 Link Here
241
                [% IF ( loop_order.author ) %] by [% loop_order.author %][% END %]
241
                [% IF ( loop_order.author ) %] by [% loop_order.author %][% END %]
242
                [% IF ( loop_order.isbn ) %] &ndash; [% loop_order.isbn %][% END %]
242
                [% IF ( loop_order.isbn ) %] &ndash; [% loop_order.isbn %][% END %]
243
                [% IF ( loop_order.publishercode ) %]<br />Publisher :[% loop_order.publishercode %][% END %]
243
                [% IF ( loop_order.publishercode ) %]<br />Publisher :[% loop_order.publishercode %][% END %]
244
                <br />
245
                [% IF ( loop_order.notes ) %]
246
                    [% 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>
247
                [% ELSE %]
248
                    <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>
249
                [% END %]
244
                </td>
250
                </td>
245
                <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&amp;id=[% loop_order.biblionumber %]" title="MARC" rel="gb_page_center[600,500]">Card</a></td>
251
                <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&amp;id=[% loop_order.biblionumber %]" title="MARC" rel="gb_page_center[600,500]">Card</a></td>
246
                <td>[% loop_order.quantity %]</td>
252
                <td>[% loop_order.quantity %]</td>
247
- 

Return to bug 7166