Bug 15348: Store estimated delivery date when adding an order

When the estimated delivery date was entered on adding or modifying
and order, it was not saved to the database.

To test:
* Add new order, fill in estimated delivery date
* Save
* Verify the estimated delivery date is empty
* Modify order line, date will also not be saved
* Apply patch
* The date should now save and update correctly

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Katrin Fischer 2022-11-15 12:22:31 +00:00 committed by Tomas Cohen Arazi
parent dd2548c2ce
commit bbe63b5c45
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -258,6 +258,7 @@ my $orderinfo = {
sort1 => scalar $input->param('sort1'),
sort2 => scalar $input->param('sort2'),
subscriptionid => scalar $input->param('subscriptionid'),
estimated_delivery_date => scalar $input->param('estimated_delivery_date'),
};
$orderinfo->{uncertainprice} ||= 0;
@ -335,7 +336,6 @@ if ( $basket->{is_standing} || $orderinfo->{quantity} ne '0' ) {
}
$orderinfo->{unitprice} = $orderinfo->{ecost} if not defined $orderinfo->{unitprice} or $orderinfo->{unitprice} eq '';
$orderinfo->{estimated_delivery_date} = $orderinfo->{estimated_delivery_date} ? dt_from_string($orderinfo->{estimated_delivery_date}) : undef;
my $order;
my $log_action_name;