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); |