From: Pradeep Nayak Date: Fri, 4 Aug 2017 05:40:03 +0000 (+0530) Subject: CRM-21005, set amount to default owed X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=aea78df06be810a7582ca464d4b97ef8d72bb139;p=civicrm-core.git CRM-21005, set amount to default owed ---------------------------------------- * CRM-21005: "Record Payment" dialogue lacks required field and is clunky https://issues.civicrm.org/jira/browse/CRM-21005 --- diff --git a/CRM/Contribute/Form/AdditionalPayment.php b/CRM/Contribute/Form/AdditionalPayment.php index 33ce175032..5364465de5 100644 --- a/CRM/Contribute/Form/AdditionalPayment.php +++ b/CRM/Contribute/Form/AdditionalPayment.php @@ -186,6 +186,9 @@ class CRM_Contribute_Form_AdditionalPayment extends CRM_Contribute_Form_Abstract if ($this->_refund) { $defaults['total_amount'] = abs($this->_refund); } + elseif ($this->_owed) { + $defaults['total_amount'] = number_format($this->_owed, 2); + } // Set $newCredit variable in template to control whether link to credit card mode is included $this->assign('newCredit', CRM_Core_Config::isEnabledBackOfficeCreditCardPayments());