From aea78df06be810a7582ca464d4b97ef8d72bb139 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Fri, 4 Aug 2017 11:10:03 +0530 Subject: [PATCH] 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 --- CRM/Contribute/Form/AdditionalPayment.php | 3 +++ 1 file changed, 3 insertions(+) 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()); -- 2.25.1