/**
  * Deletes tax.
  *
  * @param
  * @return
  */
 function deleteTaxName($id)
 {
     global $application;
     $tables = $this->getTables();
     $tn = $tables['tax_names']['columns'];
     $query = new DB_Delete('tax_names');
     $query->deleteMultiLangField($tn['name'], $tn['id'], 'Taxes');
     $query->WhereValue($tn['id'], DB_EQ, $id);
     $application->db->getDB_Result($query);
     $td = $tables['tax_display']['columns'];
     $query = new DB_Delete('tax_display');
     $query->deleteMultiLangField($td['view'], $td['id'], 'Taxes');
     $query->WhereValue($td['formula'], DB_LIKE, '%{' . $id . '}%');
     $application->db->getDB_Result($query);
     $tr = $tables['tax_rates']['columns'];
     $query = new DB_Delete('tax_rates');
     $query->WhereValue($tr['tn_id'], DB_EQ, $id);
     $query->WhereOr();
     $query->WhereValue($tr['formula'], DB_LIKE, '%{t_' . $id . '}%');
     $application->db->getDB_Result($query);
 }