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

(-)a/acqui/newordersuggestion.pl (-7 / +16 lines)
Lines 103-116 my $input = CGI->new; Link Here
103
103
104
# getting the CGI params
104
# getting the CGI params
105
my $basketno        = $input->param('basketno');
105
my $basketno        = $input->param('basketno');
106
my $booksellerid      = $input->param('booksellerid');
106
my $booksellerid    = $input->param('booksellerid');
107
my $author          = $input->param('author');
107
my $author          = $input->param('author');
108
my $title           = $input->param('title');
108
my $title           = $input->param('title');
109
my $publishercode   = $input->param('publishercode');
109
my $publishercode   = $input->param('publishercode');
110
my $op              = $input->param('op');
110
my $op              = $input->param('op');
111
my $suggestionid    = $input->param('suggestionid');
111
my $suggestionid    = $input->param('suggestionid');
112
my $duplicateNumber = $input->param('duplicateNumber');
112
my $duplicateNumber = $input->param('duplicateNumber');
113
my $uncertainprice = $input->param('uncertainprice');
113
my $uncertainprice  = $input->param('uncertainprice');
114
my $link_order      = $input->param('link_order');
114
115
115
$op = 'else' unless $op;
116
$op = 'else' unless $op;
116
117
Lines 128-133 if ( $op eq 'connectDuplicate' ) { Link Here
128
    ConnectSuggestionAndBiblio( $suggestionid, $duplicateNumber );
129
    ConnectSuggestionAndBiblio( $suggestionid, $duplicateNumber );
129
}
130
}
130
131
132
if ( $op eq 'link_order' and $link_order ) {
133
    my $order      = Koha::Acquisition::Orders->find($link_order);
134
    my $suggestion = Koha::Suggestions->find($suggestionid);
135
    $suggestion->update( { biblionumber => $order->biblionumber } ) if $order->biblionumber;
136
    print $input->redirect( "/cgi-bin/koha/acqui/basket.pl?basketno=" . $basketno );
137
}
138
131
my $suggestions = [ Koha::Suggestions->search_limited(
139
my $suggestions = [ Koha::Suggestions->search_limited(
132
    {
140
    {
133
        ( $author        ? ( author        => $author )        : () ),
141
        ( $author        ? ( author        => $author )        : () ),
Lines 140-150 my $suggestions = [ Koha::Suggestions->search_limited( Link Here
140
148
141
my $vendor = Koha::Acquisition::Booksellers->find( $booksellerid );
149
my $vendor = Koha::Acquisition::Booksellers->find( $booksellerid );
142
$template->param(
150
$template->param(
143
    suggestions             => $suggestions,
151
    suggestions  => $suggestions,
144
    basketno                => $basketno,
152
    basketno     => $basketno,
145
    booksellerid              => $booksellerid,
153
    booksellerid => $booksellerid,
146
    name                    => $vendor->name,
154
    name         => $vendor->name,
147
    "op_$op"                => 1,
155
    "op_$op"     => 1,
156
    link_order   => $link_order,
148
);
157
);
149
158
150
output_html_with_http_headers $input, $cookie, $template->output;
159
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (+4 lines)
Lines 723-728 Link Here
723
                                                                    <a href="neworderempty.pl?ordernumber=[% books_loo.ordernumber | uri %]&amp;booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]">Modify</a>
723
                                                                    <a href="neworderempty.pl?ordernumber=[% books_loo.ordernumber | uri %]&amp;booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]">Modify</a>
724
                                                                    <br />
724
                                                                    <br />
725
                                                                    <a href="#" class="transfer_order" data-ordernumber="[% books_loo.ordernumber | html %]">Transfer</a>
725
                                                                    <a href="#" class="transfer_order" data-ordernumber="[% books_loo.ordernumber | html %]">Transfer</a>
726
                                                                    <br />
727
                                                                [% END %]
728
                                                                [% UNLESS ( books_loo.suggestionid ) %]
729
                                                                    <a href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;link_order=[% books_loo.ordernumber | uri %]">Search for suggestion to link</a>
726
                                                                [% END %]
730
                                                                [% END %]
727
                                                            </td>
731
                                                            </td>
728
                                                        [% END %]
732
                                                        [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt (-2 / +3 lines)
Lines 100-106 Link Here
100
                                [% suggestion.total | $Price %]
100
                                [% suggestion.total | $Price %]
101
                            </td>
101
                            </td>
102
                            <td class="actions">
102
                            <td class="actions">
103
                                [% IF ( suggestion.biblionumber ) %]
103
                                [% IF link_order %]
104
                                    <a href="/cgi-bin/koha/acqui/newordersuggestion.pl?op=link_order&amp;link_order=[% link_order | uri %]&amp;booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;suggestionid=[% suggestion.suggestionid | uri %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> [% tp('verb', 'Link suggestion') | html %]</a>
105
                                [% ELSIF ( suggestion.biblionumber ) %]
104
                                    <a href="neworderempty.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;suggestionid=[% suggestion.suggestionid | uri %]&amp;biblio=[% suggestion.biblionumber | uri %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> [% tp('verb', 'Order') | html %]</a>
106
                                    <a href="neworderempty.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;suggestionid=[% suggestion.suggestionid | uri %]&amp;biblio=[% suggestion.biblionumber | uri %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> [% tp('verb', 'Order') | html %]</a>
105
                                [% ELSE %]
107
                                [% ELSE %]
106
                                    <a href="neworderempty.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;suggestionid=[% suggestion.suggestionid | uri %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> [% tp('verb', 'Order') | html %]</a>
108
                                    <a href="neworderempty.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;suggestionid=[% suggestion.suggestionid | uri %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> [% tp('verb', 'Order') | html %]</a>
107
- 

Return to bug 31632