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

(-)a/C4/Acquisition.pm (-7 / +2 lines)
Lines 1674-1692 sub DelOrder { Link Here
1674
        SET    datecancellationprinted=now()
1674
        SET    datecancellationprinted=now()
1675
    ";
1675
    ";
1676
    if($reason) {
1676
    if($reason) {
1677
        $query .= "
1677
        $query .= ", cancellationreason = ? ";
1678
            , notes = IF(notes IS NULL,
1679
                CONCAT('Cancellation reason: ', ?),
1680
                CONCAT(notes, ' - Cancellation reason: ', ?)
1681
            )
1682
        ";
1683
    }
1678
    }
1684
    $query .= "
1679
    $query .= "
1685
        WHERE biblionumber=? AND ordernumber=?
1680
        WHERE biblionumber=? AND ordernumber=?
1686
    ";
1681
    ";
1687
    my $sth = $dbh->prepare($query);
1682
    my $sth = $dbh->prepare($query);
1688
    if($reason) {
1683
    if($reason) {
1689
        $sth->execute($reason, $reason, $bibnum, $ordernumber);
1684
        $sth->execute($reason, $bibnum, $ordernumber);
1690
    } else {
1685
    } else {
1691
        $sth->execute( $bibnum, $ordernumber );
1686
        $sth->execute( $bibnum, $ordernumber );
1692
    }
1687
    }
(-)a/acqui/addorder.pl (-4 / +4 lines)
Lines 122-131 if it is an order from an existing suggestion : the id of this suggestion. Link Here
122
use strict;
122
use strict;
123
use warnings;
123
use warnings;
124
use CGI;
124
use CGI;
125
use C4::Auth;			# get_template_and_user
125
use C4::Auth;           # get_template_and_user
126
use C4::Acquisition;	# NewOrder ModOrder
126
use C4::Acquisition;    # NewOrder ModOrder
127
use C4::Suggestions;	# ModStatus
127
use C4::Suggestions;    # ModStatus
128
use C4::Biblio;			# AddBiblio TransformKohaToMarc
128
use C4::Biblio;         # AddBiblio TransformKohaToMarc
129
use C4::Items;
129
use C4::Items;
130
use C4::Output;
130
use C4::Output;
131
131
(-)a/acqui/cancelorder.pl (-5 lines)
Lines 33-43 use Modern::Perl; Link Here
33
use CGI;
33
use CGI;
34
use C4::Auth;
34
use C4::Auth;
35
use C4::Output;
35
use C4::Output;
36
# FIXME: C4::Search is needed by C4::Items::GetAnalyticsCount, which is called
37
# by C4::Acquisition::DelOrder. But C4::Search is not imported by C4::Items.
38
# Once this problem is resolved, the following line can be removed.
39
# See Bug 7847.
40
use C4::Search;
41
use C4::Acquisition;
36
use C4::Acquisition;
42
37
43
my $input = new CGI;
38
my $input = new CGI;
(-)a/installer/data/mysql/kohastructure.sql (+1 lines)
Lines 2910-2915 CREATE TABLE `aqorders` ( -- information related to the basket line items Link Here
2910
  `quantityreceived` smallint(6) NOT NULL default 0, -- the quantity that have been received so far
2910
  `quantityreceived` smallint(6) NOT NULL default 0, -- the quantity that have been received so far
2911
  `cancelledby` varchar(10) default NULL, -- not used? always NULL
2911
  `cancelledby` varchar(10) default NULL, -- not used? always NULL
2912
  `datecancellationprinted` date default NULL, -- the date the line item was deleted
2912
  `datecancellationprinted` date default NULL, -- the date the line item was deleted
2913
  cancellationreason text default NULL, -- reason of cancellation
2913
  `notes` mediumtext, -- notes related to this order line
2914
  `notes` mediumtext, -- notes related to this order line
2914
  `supplierreference` mediumtext, -- not used? always NULL
2915
  `supplierreference` mediumtext, -- not used? always NULL
2915
  `purchaseordernumber` mediumtext, -- not used? always NULL
2916
  `purchaseordernumber` mediumtext, -- not used? always NULL
(-)a/installer/data/mysql/updatedatabase.pl (+10 lines)
Lines 7010-7015 CREATE TABLE IF NOT EXISTS borrower_files ( Link Here
7010
    SetVersion($DBversion);
7010
    SetVersion($DBversion);
7011
}
7011
}
7012
7012
7013
$DBversion = "XXX";
7014
if ( CheckVersion($DBversion) ) {
7015
    $dbh->do("
7016
        ALTER TABLE aqorders
7017
        ADD COLUMN cancellationreason TEXT DEFAULT NULL AFTER datecancellationprinted
7018
    ");
7019
    print "Upgrade to $DBversion done (Bug 7162: Add aqorders.cancellationreason)\n";
7020
    SetVersion($DBversion);
7021
}
7022
7013
=head1 FUNCTIONS
7023
=head1 FUNCTIONS
7014
7024
7015
=head2 TableExists($table)
7025
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (+4 lines)
Lines 410-415 Link Here
410
                        [% IF ( order.publishercode ) %], [% order.publishercode %][% END %]
410
                        [% IF ( order.publishercode ) %], [% order.publishercode %][% END %]
411
                        [% IF ( order.publicationyear ) %], [% order.publicationyear %][% END %]
411
                        [% IF ( order.publicationyear ) %], [% order.publicationyear %][% END %]
412
                        [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement %][% END %]
412
                        [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement %][% END %]
413
                        [% IF ( order.cancellationreason ) %]
414
                          <br />
415
                          Cancellation reason: [% order.cancellationreason %]
416
                        [% END %]
413
                      </p>
417
                      </p>
414
                    </td>
418
                    </td>
415
                    <td class="number gste">[% order.rrpgste %]</td>
419
                    <td class="number gste">[% order.rrpgste %]</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/cancelorder.tt (-6 / +5 lines)
Lines 41-58 Link Here
41
      [% ELSE %]
41
      [% ELSE %]
42
        [% IF ( success_cancelorder ) %]
42
        [% IF ( success_cancelorder ) %]
43
            <div class="dialog message">
43
            <div class="dialog message">
44
                The order has been successfully canceled
44
                The order has been successfully cancelled
45
        [% ELSE %]
45
        [% ELSE %]
46
            <div class="dialog alert">
46
            <div class="dialog alert">
47
                An error has occured.
47
                An error has occurred.
48
                [% IF ( error_delitem ) %]
48
                [% IF ( error_delitem ) %]
49
                    <p>The order has been canceled, although one or more items could not have been deleted.</p>
49
                    <p>The order has been cancelled, although one or more items could not have been deleted.</p>
50
                [% END %]
50
                [% END %]
51
                [% IF ( error_delbiblio ) %]
51
                [% IF ( error_delbiblio ) %]
52
                <p>The order has been canceled, although the record has not been deleted.</p>
52
                <p>The order has been cancelled, although the record has not been deleted.</p>
53
                [% END %]
53
                [% END %]
54
        [% END %]
54
        [% END %]
55
                <p>Click <a href="[% referrer %]">here</a> to return to previous page</p>
55
                <p><a href="[% referrer %]">OK</a></p>
56
            </div>
56
            </div>
57
      [% END %]
57
      [% END %]
58
58
59
- 

Return to bug 7162