<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
$this->_fromEmails = CRM_Event_BAO_Event::getFromEmailIds($eventId);
$paymentInfo = CRM_Core_BAO_FinancialTrxn::getPartialPaymentWithType($this->_id, $enitityType);
- $paymentDetails = CRM_Contribute_BAO_Contribution::getPaymentInfo($this->_id, $this->_component);
+ $paymentDetails = CRM_Contribute_BAO_Contribution::getPaymentInfo($this->_id, $this->_component, FALSE, TRUE);
$this->_amtPaid = $paymentDetails['paid'];
$this->_amtTotal = $paymentDetails['total'];
}
}
+ /**
+ * This virtual function is used to set the default values of
+ * various form elements
+ *
+ * access public
+ *
+ * @return array reference to the array of default values
+ *
+ */
+ /**
+ * @return array
+ */
public function setDefaultValues() {
if ($this->_view == 'transaction' && ($this->_action & CRM_Core_Action::BROWSE)) {
return;
}
// Set $newCredit variable in template to control whether link to credit card mode is included
- CRM_Core_Payment::allowBackofficeCreditCard($this);
+ $this->assign('newCredit', CRM_Core_Config::isEnabledBackOfficeCreditCardPayments());
return $defaults;
}
$this->addFormRule(array('CRM_Contribute_Form_AdditionalPayment', 'formRule'), $this);
}
+ /**
+ * @param $fields
+ * @param $files
+ * @param $self
+ *
+ * @return array
+ */
static function formRule($fields, $files, $self) {
$errors = array();
if ($self->_paymentType == 'owed' && $fields['total_amount'] > $self->_owed) {
}
}
+ /**
+ * @param $submittedValues
+ */
public function processCreditCard($submittedValues) {
$config = CRM_Core_Config::singleton();
$session = CRM_Core_Session::singleton();
}
}
+ /**
+ * @param $params
+ *
+ * @return mixed
+ */
function emailReceipt(&$params) {
// email receipt sending
// send message template
list($mailSent, $subject, $message, $html) = CRM_Core_BAO_MessageTemplate::sendTemplate($sendTemplateParams);
return $mailSent;
}
-}
\ No newline at end of file
+}