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

(-)a/C4/Acquisition.pm (-2 / +3 lines)
Lines 714-721 sub GetPendingOrders { Link Here
714
    my $dbh = C4::Context->dbh;
714
    my $dbh = C4::Context->dbh;
715
    my $strsth = "
715
    my $strsth = "
716
        SELECT    ".($grouped?"count(*),":"")."aqbasket.basketno,
716
        SELECT    ".($grouped?"count(*),":"")."aqbasket.basketno,
717
                    surname,firstname,aqorders.*,biblio.*,biblioitems.isbn,
717
                    surname,firstname,biblio.*,biblioitems.isbn,
718
                    aqbasket.closedate, aqbasket.creationdate, aqbasket.basketname
718
                    aqbasket.closedate, aqbasket.creationdate, aqbasket.basketname,
719
                    aqorders.*
719
        FROM      aqorders
720
        FROM      aqorders
720
        LEFT JOIN aqbasket ON aqbasket.basketno=aqorders.basketno
721
        LEFT JOIN aqbasket ON aqbasket.basketno=aqorders.basketno
721
        LEFT JOIN borrowers ON aqbasket.authorisedby=borrowers.borrowernumber
722
        LEFT JOIN borrowers ON aqbasket.authorisedby=borrowers.borrowernumber
(-)a/acqui/modordernotes.pl (+82 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
use C4::Bookseller qw( GetBookSellerFromId);
36
37
my $input = new CGI;
38
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
39
    template_name   => 'acqui/modordernotes.tmpl',
40
    query           => $input,
41
    type            => 'intranet',
42
    authnotrequired => 0,
43
    flagsrequired   => { 'acquisition' => '*' },
44
    debug           => 1,
45
} );
46
47
my $op = $input->param('op');
48
my $ordernumber = $input->param('ordernumber');
49
my $referrer = $input->param('referrer') || $input->referer();
50
51
my $order = GetOrder($ordernumber);
52
my $basket = GetBasket($order->{basketno});
53
my ($bookseller) = GetBookSellerFromId($basket->{booksellerid});
54
55
56
if($op and $op eq 'save') {
57
    my $ordernotes = $input->param('ordernotes');
58
    $order->{'notes'} = $ordernotes;
59
    ModOrder($order);
60
    print $input->redirect($referrer);
61
    exit;
62
} else {
63
    $template->param(
64
        ordernotes => $order->{'notes'},
65
    );
66
}
67
68
if($op) {
69
    $template->param($op => 1);
70
}
71
72
$template->param(
73
    basketname           => $basket->{'basketname'},
74
    basketno             => $order->{basketno},
75
    booksellerid         => $bookseller->{'id'},
76
    booksellername       => $bookseller->{'name'},
77
    ordernumber => $ordernumber,
78
    referrer => $referrer,
79
);
80
81
82
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/acqui/neworderempty.pl (+6 lines)
Lines 123-128 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
123
);
123
);
124
124
125
my $marcflavour = C4::Context->preference('marcflavour');
125
my $marcflavour = C4::Context->preference('marcflavour');
126
127
if(!$basketno) {
128
    my $order = GetOrder($ordernumber);
129
    $basketno = $order->{'basketno'};
130
}
131
126
my $basket = GetBasket($basketno);
132
my $basket = GetBasket($basketno);
127
my $contract = &GetContract($basket->{contractnumber});
133
my $contract = &GetContract($basket->{contractnumber});
128
134
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-12 / +17 lines)
Lines 278-296 Link Here
278
                        <td>
278
                        <td>
279
                            <p>[% IF ( books_loo.order_received ) %] (rcvd)[% END %]
279
                            <p>[% IF ( books_loo.order_received ) %] (rcvd)[% END %]
280
                                <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% books_loo.biblionumber %]">[% books_loo.title |html %]</a> by [% books_loo.author %]
280
                                <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% books_loo.biblionumber %]">[% books_loo.title |html %]</a> by [% books_loo.author %]
281
                                    [% IF ( books_loo.notes ) %] [% books_loo.notes %][% END %]
281
                                <br />
282
                                    [% IF ( books_loo.isbn ) %] - [% books_loo.isbn %][% END %]
282
                                [% IF ( books_loo.isbn ) %] - [% books_loo.isbn %][% END %]
283
                                    [% IF ( books_loo.issn ) %] - [% books_loo.issn %][% END %]
283
                                [% IF ( books_loo.issn ) %] - [% books_loo.issn %][% END %]
284
                                    [% IF ( books_loo.publishercode ) %], [% books_loo.publishercode %][% END %]
284
                                [% IF ( books_loo.publishercode ) %], [% books_loo.publishercode %][% END %]
285
                                    [% IF ( books_loo.publicationyear ) %], [% books_loo.publicationyear %][% END %]
285
                                [% IF ( books_loo.publicationyear ) %], [% books_loo.publicationyear %][% END %]
286
                                    [% IF ( books_loo.suggestionid ) %]
286
                                [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement %][% END %]
287
                                        <br/>
287
                                [% IF ( books_loo.suggestionid ) %]
288
                                        Suggested by: [% books_loo.surnamesuggestedby %][% IF ( books_loo.firstnamesuggestedby ) %], [% books_loo.firstnamesuggestedby %] [% END %]
288
                                    <br/>
289
                                        (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% books_loo.suggestionid %]&op=show">suggestion #[% books_loo.suggestionid %]</a>)
289
                                    Suggested by: [% books_loo.surnamesuggestedby %][% IF ( books_loo.firstnamesuggestedby ) %], [% books_loo.firstnamesuggestedby %] [% END %]
290
                                    [% END %]
290
                                    (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% books_loo.suggestionid %]&op=show">suggestion #[% books_loo.suggestionid %]</a>)
291
                                    [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement %][% END %]
291
                                [% END %]
292
                                [% IF ( books_loo.notes ) %]
293
                                    <p class="ordernote"><strong>Note: </strong>[% books_loo.notes|html %] [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]">Change note</a>]</p>
294
                                [% ELSE %]
295
                                    [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]">Add note</a>]
296
                                [% END %]
292
                            </p>
297
                            </p>
293
                            </td>
298
                        </td>
294
                        <td class="number">[% books_loo.rrp %]</td>
299
                        <td class="number">[% books_loo.rrp %]</td>
295
                        <td class="number">[% books_loo.ecost %]</td>
300
                        <td class="number">[% books_loo.ecost %]</td>
296
                        <td class="number">[% books_loo.quantity %]</td>
301
                        <td class="number">[% books_loo.quantity %]</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/modordernotes.tt (+32 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
</head>
5
6
<body>
7
[% INCLUDE 'header.inc' %]
8
9
<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; <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername|html %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Basket [% basketname|html %] ([% basketno %])</a> &rsaquo; Change order notes</div>
10
11
<div id="doc" class="yui-t7">
12
13
<div id="bd">
14
  <div id="yui-main">
15
      <h1>Change order notes (order no. [% ordernumber %])</h1>
16
      <form action="/cgi-bin/koha/acqui/modordernotes.pl" method="post">
17
        <fieldset class="brief">
18
          <label for="ordernotes">Notes:</label>
19
          <textarea id="ordernotes" name="ordernotes" rows="3" cols="30">[% ordernotes %]</textarea>
20
        </fieldset>
21
        <input type="hidden" name="referrer" value="[% referrer %]" />
22
        <input type="hidden" name="ordernumber" value="[% ordernumber %]" />
23
        <input type="hidden" name="op" value="save" />
24
        <fieldset class="action">
25
          <input type="submit" value="Save" />
26
          <a class="cancel" href="[% referrer %]">Cancel</a>
27
        </fieldset>
28
      </form>
29
  </div>
30
</div>
31
[% INCLUDE 'intranet-bottom.inc' %]
32
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt (-6 / +6 lines)
Lines 170-178 $(document).ready(function() Link Here
170
170
171
[% IF ( basketno ) %]
171
[% IF ( basketno ) %]
172
    <div id="acqui_basket_summary"  class="yui-g">
172
    <div id="acqui_basket_summary"  class="yui-g">
173
	<fieldset class="rows">
173
    <fieldset class="rows">
174
        <legend>Basket details</legend>
174
        <legend>Basket details</legend>
175
		<ol>
175
        <ol>
176
        [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote %]</li>[% END %]
176
        [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote %]</li>[% END %]
177
        [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote %]</li>[% END %]
177
        [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote %]</li>[% END %]
178
        [% IF ( basketcontractno ) %]
178
        [% IF ( basketcontractno ) %]
Lines 198-209 $(document).ready(function() Link Here
198
                <input type="hidden" value="mod_basket" name="op" />
198
                <input type="hidden" value="mod_basket" name="op" />
199
                <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
199
                <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
200
            </li>
200
            </li>
201
		<fieldset class="action"><input type="submit" value="Change basketgroup" /></fieldset>
201
            <fieldset class="action"><input type="submit" value="Change basketgroup" /></fieldset>
202
        </form>
203
        [% END %]
202
        [% END %]
203
        </form>
204
        [% END %]
204
        [% END %]
205
			</ol>
205
        </ol>
206
</fieldset>
206
    </fieldset>
207
    </div>
207
    </div>
208
[% END %]
208
[% END %]
209
209
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt (-1 / +6 lines)
Lines 246-251 Link Here
246
                    Suggested by: [% loop_order.surnamesuggestedby %][% IF ( loop_order.firstnamesuggestedby ) %], [% loop_order.firstnamesuggestedby %] [% END %]
246
                    Suggested by: [% loop_order.surnamesuggestedby %][% IF ( loop_order.firstnamesuggestedby ) %], [% loop_order.firstnamesuggestedby %] [% END %]
247
                    (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% loop_order.suggestionid %]&amp;op=show">suggestion #[% loop_order.suggestionid %]</a>)
247
                    (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% loop_order.suggestionid %]&amp;op=show">suggestion #[% loop_order.suggestionid %]</a>)
248
                [% END %]
248
                [% END %]
249
                <br />
250
                [% IF ( loop_order.notes ) %]
251
                    <p class="ordernote"><strong>Note: </strong>[% loop_order.notes|html %] [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% loop_order.ordernumber %]&amp;referrer=/cgi-bin/koha/acqui/parcel.pl%3Fbooksellerid=[% loop_order.booksellerid %]&amp;datereceived=[% loop_order.invoicedatereceived %]&amp;invoice=[% loop_order.invoice %]">Change note</a>]</p>
252
                [% ELSE %]
253
                    [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% loop_order.ordernumber %]&amp;referrer=/cgi-bin/koha/acqui/parcel.pl%3Fbooksellerid=[% loop_order.booksellerid %]&amp;datereceived=[% loop_order.invoicedatereceived %]&amp;invoice=[% loop_order.invoice %]">Add note</a>]
254
                [% END %]
249
                </td>
255
                </td>
250
                <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>
256
                <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>[% loop_order.quantity %]</td>
257
                <td>[% loop_order.quantity %]</td>
252
- 

Return to bug 7166