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

(-)a/acqui/addorder.pl (-8 / +19 lines)
Lines 132-138 use C4::Output; Link Here
132
use Koha::Acquisition::Currencies;
132
use Koha::Acquisition::Currencies;
133
use Koha::Acquisition::Orders;
133
use Koha::Acquisition::Orders;
134
use C4::Barcodes;
134
use C4::Barcodes;
135
135
use Data::Dumper;
136
### "-------------------- addorder.pl ----------"
136
### "-------------------- addorder.pl ----------"
137
137
138
# FIXME: This needs to do actual error checking and possibly return user to the same form,
138
# FIXME: This needs to do actual error checking and possibly return user to the same form,
Lines 268-280 if ( $basket->{is_standing} || $orderinfo->{quantity} ne '0' ) { Link Here
268
268
269
    $orderinfo->{unitprice} = $orderinfo->{ecost} if not defined $orderinfo->{unitprice} or $orderinfo->{unitprice} eq '';
269
    $orderinfo->{unitprice} = $orderinfo->{ecost} if not defined $orderinfo->{unitprice} or $orderinfo->{unitprice} eq '';
270
270
271
    $orderinfo = C4::Acquisition::populate_order_with_prices(
271
    my $modify = $input->param('modify');
272
        {
272
    if ($orderinfo->{ordernumber} && !$modify) {
273
            order        => $orderinfo,
273
        $orderinfo = C4::Acquisition::populate_order_with_prices(
274
            booksellerid => $orderinfo->{booksellerid},
274
            {
275
            ordering     => 1,
275
               order        => $orderinfo,
276
        }
276
               booksellerid => $orderinfo->{booksellerid},
277
    );
277
               receiving     => 1,
278
            }
279
        );
280
    } elsif ( $modify ) {
281
        $orderinfo = C4::Acquisition::populate_order_with_prices(
282
            {
283
                order       => $orderinfo,
284
                booksellerid  => $orderinfo->{booksellerid},
285
                ordering => 1,
286
            }
287
        );
288
    }
278
289
279
    # if we already have $ordernumber, then it's an ordermodif
290
    # if we already have $ordernumber, then it's an ordermodif
280
    my $order = Koha::Acquisition::Order->new($orderinfo);
291
    my $order = Koha::Acquisition::Order->new($orderinfo);
(-)a/acqui/neworderempty.pl (+7 lines)
Lines 106-111 my $close = $input->param('close'); Link Here
106
my $uncertainprice  = $input->param('uncertainprice');
106
my $uncertainprice  = $input->param('uncertainprice');
107
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 !
107
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 !
108
my $subscriptionid  = $input->param('subscriptionid');
108
my $subscriptionid  = $input->param('subscriptionid');
109
my $modify = $input->param('modifying');
109
my $data;
110
my $data;
110
my $new = 'no';
111
my $new = 'no';
111
112
Lines 300-305 my $quantity = $input->param('rr_quantity_to_order') ? Link Here
300
      $data->{'quantity'};
301
      $data->{'quantity'};
301
$quantity //= 0;
302
$quantity //= 0;
302
303
304
if ($modify) {
305
    $template->param(
306
        modify => $modify
307
    );
308
}
309
303
$template->param(
310
$template->param(
304
    existing         => $biblionumber,
311
    existing         => $biblionumber,
305
    ordernumber           => $ordernumber,
312
    ordernumber           => $ordernumber,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-1 / +1 lines)
Lines 646-652 Link Here
646
                        [% IF ( active ) %]
646
                        [% IF ( active ) %]
647
                            [% UNLESS ( closedate ) %]
647
                            [% UNLESS ( closedate ) %]
648
                            <td>
648
                            <td>
649
                                <a href="neworderempty.pl?ordernumber=[% books_loo.ordernumber %]&amp;booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">Modify</a>
649
                                <a href="neworderempty.pl?ordernumber=[% books_loo.ordernumber %]&amp;booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]&amp;modifying=1">Modify</a>
650
                                [% UNLESS (books_loo.order_received) %]
650
                                [% UNLESS (books_loo.order_received) %]
651
                                    <br />
651
                                    <br />
652
                                    <a href="#" class="transfer_order" data-ordernumber="[% books_loo.ordernumber %]">Transfer</a>
652
                                    <a href="#" class="transfer_order" data-ordernumber="[% books_loo.ordernumber %]">Transfer</a>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt (-1 / +3 lines)
Lines 641-646 $(document).ready(function() Link Here
641
    </fieldset>
641
    </fieldset>
642
    <fieldset class="action">
642
    <fieldset class="action">
643
        <input type="hidden" name="subscriptionid" value="[% subscriptionid %]" />
643
        <input type="hidden" name="subscriptionid" value="[% subscriptionid %]" />
644
        [% IF (modify) %]
645
            <input type="hidden" name="modify" value="[% modify %]" />
646
        [% END %]
644
        <input type="submit" value="Save" />
647
        <input type="submit" value="Save" />
645
        [% IF (suggestionid) %]
648
        [% IF (suggestionid) %]
646
            <a class="cancel" href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">Cancel</a>
649
            <a class="cancel" href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">Cancel</a>
647
- 

Return to bug 19780