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