Cleanup date handling on Payment.create
authoreileen <emcnaughton@wikimedia.org>
Wed, 30 Oct 2019 21:53:13 +0000 (10:53 +1300)
committereileen <emcnaughton@wikimedia.org>
Fri, 1 Nov 2019 03:14:38 +0000 (16:14 +1300)
commit4c68d684c143c5a3ce632eba2ab7448279e93bd9
tree0d648c47ea949bcf4ebd0df67f66745d0cc0b3c7
parentf512329a0ea87b3f0cb5b7b0f0cb143c66d5673a
Cleanup date handling on Payment.create

Fix a bug identified by @kcristiano whereby adding a payment with the
additional payment form changes the contribution receive_date.

Also, add a default to Payment.create of 'now' for the
trxn_date and require it to be set. Use that value later on.

Some string fixes
CRM/Contribute/Form/AdditionalPayment.php
CRM/Financial/BAO/Payment.php
api/v3/Payment.php
tests/phpunit/CRM/Contribute/Form/AdditionalPaymentTest.php