예제 #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;
 }
예제 #2
0
파일: Discount.php 프로젝트: hguru/224Civi
 /**
  * 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;
 }