Bug 24277: Fix date received editing when receiving an order

Bug 8417 added the ability to edit the date received, but a merge
conflict was wrongly resolved during a rebase of
  commit 20d9ed618f
  Bug 13321: Rename variables

Test plan:
Create an order
Receive it
Set a date (different from today)
=> The date you picked should have been set in DB for the order

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2019-12-23 16:19:47 +01:00 committed by Martin Renvoize
parent 1b651eea45
commit f5739acdd8
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
2 changed files with 11 additions and 2 deletions

View File

@ -1395,8 +1395,8 @@ sub ModItemOrder {
user => $user,
invoice => $invoice,
budget_id => $budget_id,
datereceived => $datereceived,
received_itemnumbers => \@received_itemnumbers,
order_internalnote => $order_internalnote,
}
);
@ -1419,10 +1419,18 @@ sub ModReceiveOrder {
my $quantrec = $params->{quantityreceived};
my $user = $params->{user};
my $budget_id = $params->{budget_id};
my $datereceived = $params->{datereceived};
my $received_items = $params->{received_items};
my $dbh = C4::Context->dbh;
my $datereceived = ( $invoice and $invoice->{datereceived} ) ? $invoice->{datereceived} : dt_from_string;
$datereceived = output_pref(
{
dt => ( $datereceived ? dt_from_string( $datereceived ) : dt_from_string ),
dateformat => 'iso',
dateonly => 1,
}
);
my $suggestionid = GetSuggestionFromBiblionumber( $biblionumber );
if ($suggestionid) {
ModSuggestion( {suggestionid=>$suggestionid,

View File

@ -123,6 +123,7 @@ if ($quantityrec > $origquantityrec ) {
user => $user,
invoice => $invoice,
budget_id => $bookfund,
datereceived => $datereceived,
received_items => \@received_items,
}
);