+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
/**
- * This form records additional payments needed when
- * event/contribution is partially paid
- *
+ * This form records additional payments needed when event/contribution is partially paid.
*/
class CRM_Contribute_Form_AdditionalPayment extends CRM_Contribute_Form_AbstractEditPayment {
public $_contributeMode = 'direct';
'id' => $type,
);
- CRM_Core_Payment_Form::buildPaymentForm($this, $this->_paymentProcessor, FALSE);
+ CRM_Core_Payment_Form::buildPaymentForm($this, $this->_paymentProcessor, FALSE, TRUE);
$qfKey = $this->controller->_key;
$this->assign('qfKey', $qfKey);
$attributes = CRM_Core_DAO::getAttribute('CRM_Financial_DAO_FinancialTrxn');
$this->add('select', 'payment_processor_id', ts('Payment Processor'), $this->_processors, NULL);
- $label = ($this->_refund) ? 'Refund Amount' : 'Payment Amount';
+ $label = ($this->_refund) ? ts('Refund Amount') : ts('Payment Amount');
$this->addMoney('total_amount',
- ts('%1', array(1 => $label)),
+ $label,
FALSE,
$attributes['total_amount'],
TRUE, 'currency', NULL
$this->add('textarea', 'receipt_text', ts('Confirmation Message'));
// add various dates
- $dateLabel = ($this->_refund) ? 'Refund Date' : 'Received Date';
- $this->addDateTime('trxn_date', ts('%1', array(1 => $dateLabel)), FALSE, array('formatType' => 'activityDateTime'));
+ $dateLabel = ($this->_refund) ? ts('Refund Date') : ts('Received Date');
+ $this->addDateTime('trxn_date', $dateLabel, FALSE, array('formatType' => 'activityDateTime'));
if ($this->_contactId && $this->_id) {
if ($this->_component == 'event') {
$this->_params,
$config->defaultCurrency
);
- $this->_params['payment_action'] = 'Sale';
+
if (!empty($this->_params['trxn_date'])) {
$this->_params['receive_date'] = CRM_Utils_Date::processDate($this->_params['trxn_date'], $this->_params['trxn_date_time']);
}