# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <http://www.gnu.org/licenses>.
-use strict;
-use warnings;
+use Modern::Perl;
use CGI qw ( -utf8 );
use C4::Auth;
use C4::Output;
my $quantityrec = $input->param('quantityrec');
my $quantity = $input->param('quantity');
my $unitprice = $input->param('unitprice');
+my $replacementprice = $input->param('replacementprice');
my $datereceived = $input->param('datereceived'),
my $invoiceid = $input->param('invoiceid');
my $invoice = GetInvoice($invoiceid);
my $new_ordernumber = $ordernumber;
$unitprice = Koha::Number::Price->new( $unitprice )->unformat();
+$replacementprice = Koha::Number::Price->new( $replacementprice )->unformat();
my $basket = Koha::Acquisition::Orders->find( $ordernumber )->basket;
-#need old recievedate if we update the order, parcel.pl only shows the right parcel this way FIXME
+#need old receivedate if we update the order, parcel.pl only shows the right parcel this way FIXME
if ($quantityrec > $origquantityrec ) {
my @received_items = ();
if ($basket->effective_create_items eq 'ordering') {
$order->{order_internalnote} = $input->param("order_internalnote");
$order->{tax_rate_on_receiving} = $input->param("tax_rate");
+ $order->{replacementprice} = $replacementprice;
$order->{unitprice} = $unitprice;
$order = C4::Acquisition::populate_order_with_prices(
dateaccessioned => $datereceived,
datelastseen => $datereceived,
price => $unitprice,
- replacementprice => $order->{rrp},
+ replacementprice => $replacementprice,
replacementpricedate => $datereceived,
},
$biblionumber,