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

(-)a/acqui/addorder.pl (-8 / +19 lines)
Lines 131-137 use C4::Output; Link Here
131
use Koha::Acquisition::Currencies;
131
use Koha::Acquisition::Currencies;
132
use Koha::Acquisition::Orders;
132
use Koha::Acquisition::Orders;
133
use C4::Barcodes;
133
use C4::Barcodes;
134
134
use Data::Dumper;
135
### "-------------------- addorder.pl ----------"
135
### "-------------------- addorder.pl ----------"
136
136
137
# FIXME: This needs to do actual error checking and possibly return user to the same form,
137
# FIXME: This needs to do actual error checking and possibly return user to the same form,
Lines 278-290 if ( $basket->{is_standing} || $orderinfo->{quantity} ne '0' ) { Link Here
278
278
279
    $orderinfo->{unitprice} = $orderinfo->{ecost} if not defined $orderinfo->{unitprice} or $orderinfo->{unitprice} eq '';
279
    $orderinfo->{unitprice} = $orderinfo->{ecost} if not defined $orderinfo->{unitprice} or $orderinfo->{unitprice} eq '';
280
280
281
    $orderinfo = C4::Acquisition::populate_order_with_prices(
281
    my $modify = $input->param('modify');
282
        {
282
    if ($orderinfo->{ordernumber} && !$modify) {
283
            order        => $orderinfo,
283
        $orderinfo = C4::Acquisition::populate_order_with_prices(
284
            booksellerid => $orderinfo->{booksellerid},
284
            {
285
            ordering     => 1,
285
               order        => $orderinfo,
286
        }
286
               booksellerid => $orderinfo->{booksellerid},
287
    );
287
               receiving     => 1,
288
            }
289
        );
290
    } elsif ( $modify ) {
291
        $orderinfo = C4::Acquisition::populate_order_with_prices(
292
            {
293
                order       => $orderinfo,
294
                booksellerid  => $orderinfo->{booksellerid},
295
                ordering => 1,
296
            }
297
        );
298
    }
288
299
289
    # if we already have $ordernumber, then it's an ordermodif
300
    # if we already have $ordernumber, then it's an ordermodif
290
    my $order = Koha::Acquisition::Order->new($orderinfo);
301
    my $order = Koha::Acquisition::Order->new($orderinfo);
(-)a/acqui/neworderempty.pl (+8 lines)
Lines 110-115 my $close = $input->param('close'); Link Here
110
my $uncertainprice  = $input->param('uncertainprice');
110
my $uncertainprice  = $input->param('uncertainprice');
111
my $import_batch_id = $input->param('import_batch_id'); # if this is filled, we come from a staged file, and we will return here after saving the order !
111
my $import_batch_id = $input->param('import_batch_id'); # if this is filled, we come from a staged file, and we will return here after saving the order !
112
my $from_subscriptionid  = $input->param('from_subscriptionid');
112
my $from_subscriptionid  = $input->param('from_subscriptionid');
113
my $subscriptionid  = $input->param('subscriptionid');
114
my $modify = $input->param('modifying');
113
my $data;
115
my $data;
114
my $new = 'no';
116
my $new = 'no';
115
117
Lines 407-412 my $quantity = $input->param('rr_quantity_to_order') ? Link Here
407
      $data->{'quantity'};
409
      $data->{'quantity'};
408
$quantity //= 0;
410
$quantity //= 0;
409
411
412
if ($modify) {
413
    $template->param(
414
        modify => $modify
415
    );
416
}
417
410
$template->param(
418
$template->param(
411
    existing         => $biblionumber,
419
    existing         => $biblionumber,
412
    ordernumber           => $ordernumber,
420
    ordernumber           => $ordernumber,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-1 / +1 lines)
Lines 533-539 Link Here
533
                        [% IF ( active ) %]
533
                        [% IF ( active ) %]
534
                            [% UNLESS ( closedate ) %]
534
                            [% UNLESS ( closedate ) %]
535
                            <td>
535
                            <td>
536
                                <a href="neworderempty.pl?ordernumber=[% books_loo.ordernumber | uri %]&amp;booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]">Modify</a>
536
                                <a href="neworderempty.pl?ordernumber=[% books_loo.ordernumber | uri %]&amp;booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;modifying=1">Modify</a>
537
                                [% UNLESS (books_loo.order_received) %]
537
                                [% UNLESS (books_loo.order_received) %]
538
                                    <br />
538
                                    <br />
539
                                    <a href="#" class="transfer_order" data-ordernumber="[% books_loo.ordernumber | html %]">Transfer</a>
539
                                    <a href="#" class="transfer_order" data-ordernumber="[% books_loo.ordernumber | html %]">Transfer</a>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt (-1 / +3 lines)
Lines 484-489 Link Here
484
    </fieldset>
484
    </fieldset>
485
    <fieldset class="action">
485
    <fieldset class="action">
486
        <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
486
        <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
487
        [% IF (modify) %]
488
            <input type="hidden" name="modify" value="[% modify %]" />
489
        [% END %]
487
        <input type="submit" value="Save" />
490
        <input type="submit" value="Save" />
488
        [% IF (suggestionid) %]
491
        [% IF (suggestionid) %]
489
            <a class="cancel" href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid | html %]&amp;basketno=[% basketno | html %]">Cancel</a>
492
            <a class="cancel" href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid | html %]&amp;basketno=[% basketno | html %]">Cancel</a>
490
- 

Return to bug 19780