From 658b420a5e2d0f3eb14cee87fe85b590f86df5ef Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Thu, 4 Aug 2022 11:10:54 +1000 Subject: [PATCH] dev/core#3774 Ensure that if we are in live credit card mode that the receive date field is a non required field --- CRM/Contribute/Form/Contribution.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Contribute/Form/Contribution.php b/CRM/Contribute/Form/Contribution.php index 07de9c6489..b8ef62d7fc 100644 --- a/CRM/Contribute/Form/Contribution.php +++ b/CRM/Contribute/Form/Contribution.php @@ -703,8 +703,8 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP } } - // If contribution is a template receive date is not required - $receiveDateRequired = !$this->_values['is_template']; + // If contribution is a template receive date is not required and if we are in a live credit card mode + $receiveDateRequired = !$this->_values['is_template'] && !$this->_mode; // add various dates $this->addField('receive_date', ['entity' => 'contribution'], $receiveDateRequired, FALSE); $this->addField('receipt_date', ['entity' => 'contribution'], FALSE, FALSE); -- 2.25.1