From e7e9befa3bf5d92eebae2e67f3d0372192735b8e Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Tue, 18 Jun 2024 03:29:32 +0000 Subject: [PATCH] Bug 37109: Don't initialise claims fields when duplicating acquisitions orders These fields don't exist in the aqorders table and don't need to be set/passed on. * claims_count (dropped in Bug 24161) * claimed_date (dropped in Bug 24161) * placed_on (no evidence of this field existing in aqorders) * received_on (no evidence of this field existing in aqorders) To test: 1. Go to Acquisitions 2. Create a vendor if you don't already have one 3. Create a basket if you don't already have one 4. Add an order to the basket and Save 5. Add another order to the basket, choose "From existing orders (copy)" 6. Continue through the process and confirm you're able to duplicate the order as normal 7. Confirm tests still pass t/db_dependent/Koha/Acquisition/Order.t Sponsored-by: Catalyst IT --- Koha/Acquisition/Order.pm | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Koha/Acquisition/Order.pm b/Koha/Acquisition/Order.pm index d869b9764da..b8399e3524c 100644 --- a/Koha/Acquisition/Order.pm +++ b/Koha/Acquisition/Order.pm @@ -450,20 +450,16 @@ sub duplicate_to { for my $field ( qw( ordernumber - received_on datereceived invoiceid datecancellationprinted cancellationreason - claims_count - claimed_date parent_ordernumber ) ) { undef $order_info->{$field}; } - $order_info->{placed_on} = dt_from_string; $order_info->{entrydate} = dt_from_string; $order_info->{orderstatus} = 'new'; $order_info->{quantityreceived} = 0; -- 2.39.2