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

(-)a/acqui/newordersuggestion.pl (-4 / +18 lines)
Lines 93-99 use Modern::Perl; Link Here
93
use CGI qw ( -utf8 );
93
use CGI qw ( -utf8 );
94
use C4::Auth qw( get_template_and_user );
94
use C4::Auth qw( get_template_and_user );
95
use C4::Output qw( output_html_with_http_headers );
95
use C4::Output qw( output_html_with_http_headers );
96
use C4::Suggestions qw( ConnectSuggestionAndBiblio );
96
use C4::Suggestions qw( ConnectSuggestionAndBiblio ModSuggestion );
97
use C4::Budgets;
97
use C4::Budgets;
98
98
99
use Koha::Acquisition::Booksellers;
99
use Koha::Acquisition::Booksellers;
Lines 131-138 if ( $op eq 'connectDuplicate' ) { Link Here
131
131
132
if ( $op eq 'cud-link_order' and $link_order ) {
132
if ( $op eq 'cud-link_order' and $link_order ) {
133
    my $order      = Koha::Acquisition::Orders->find($link_order);
133
    my $order      = Koha::Acquisition::Orders->find($link_order);
134
    my $suggestion = Koha::Suggestions->find($suggestionid);
134
135
    $suggestion->update( { biblionumber => $order->biblionumber } ) if $order->biblionumber;
135
    if($order->biblionumber) {
136
        ModSuggestion(
137
            {
138
                suggestionid => $suggestionid,
139
                biblionumber => $order->biblionumber,
140
                STATUS       => 'ORDERED',
141
            }
142
        );
143
        if ( C4::Context->preference('PlaceHoldsOnOrdersFromSuggestions') ) {
144
            my $suggestion = Koha::Suggestions->find($suggestionid);
145
            if ($suggestion) {
146
                $suggestion->place_hold();
147
            }
148
        }
149
    }
150
136
    print $input->redirect( "/cgi-bin/koha/acqui/basket.pl?basketno=" . $basketno );
151
    print $input->redirect( "/cgi-bin/koha/acqui/basket.pl?basketno=" . $basketno );
137
}
152
}
138
153
139
- 

Return to bug 31632