3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
19 * This class contains all the function that are called using AJAX
21 class CRM_Pledge_Page_AJAX
{
24 * Function to setDefaults according to Pledge Id
25 * for batch entry pledges
27 public function getPledgeDefaults() {
29 if (!empty($_POST['pid'])) {
30 $pledgeID = CRM_Utils_Type
::escape($_POST['pid'], 'Integer');
31 $details = CRM_Pledge_BAO_PledgePayment
::getOldestPledgePayment($pledgeID);
33 CRM_Utils_JSON
::output($details);