# use deliverydate for sales and purchase invoice, if it exists
# also use deliverydate for credit notes
$transdate = $form->{tax_point} || $form->{deliverydate} || $form->{invdate};
# use deliverydate for sales and purchase invoice, if it exists
# also use deliverydate for credit notes
$transdate = $form->{tax_point} || $form->{deliverydate} || $form->{invdate};