Example #1
0
 /**
  * Function to delete the discount
  *
  * @param int $id   discount id
  *
  * @return boolean
  * @access public
  * @static
  *
  */
 static function del($id)
 {
     // delete all discount records with the selected discounted id
     $discount = new CRM_Core_DAO_Discount();
     $discount->id = $id;
     if ($discount->delete()) {
         return true;
     }
     return false;
 }
Example #2
0
 /**
  * Function to delete the discount
  *
  * @param int $id   discount id
  *
  * @return boolean
  * @access public
  * @static
  *
  */
 static function del($entityId, $entityTable)
 {
     // delete all discount records with the selected discounted id
     $discount = new CRM_Core_DAO_Discount();
     $discount->entity_id = $entityId;
     $discount->entity_table = $entityTable;
     if ($discount->delete()) {
         return TRUE;
     }
     return FALSE;
 }