Example #1
0
 /**
  * Delete line items for given entity.
  *
  * @param int $entityId
  * @param int $entityTable
  *
  * @access public
  * @static
  */
 public static function deleteLineItems($entityId, $entityTable)
 {
     $result = false;
     if (!$entityId || !$entityTable) {
         return $result;
     }
     require_once 'CRM/Core/Transaction.php';
     $transaction = new CRM_Core_Transaction();
     $lineItem = new CRM_Price_DAO_LineItem();
     $lineItem->entity_id = $entityId;
     $lineItem->entity_table = $entityTable;
     $result = $lineItem->delete();
     $transaction->commit();
     return $result;
 }