(function() {
  var selectOption = function(selector, value) {
    var options = $('option', selector);
    options.filter(function() {
      return ($(this).text() == value);
    }).prop('selected', true);
  };

  var highlight = function(selector) {
    $(selector).effect('highlight', 1500);
  };

  var setVAT = function(value) {
    var selector = '#purchase_sales_tax_rate';
    selectOption(selector, value);
    highlight(selector);
  };

  var setEcStatus = function(value) {
    var ecStatusOptions = {
      'Non-EC': '#bank_account_entry_ec_status_',
      'EC Goods': '#bank_account_entry_ec_status_2',
      'EC Services': '#bank_account_entry_ec_status_1'
    };

    var ecStatusSelector = ecStatusOptions[value];
    $(ecStatusSelector).prop('checked', true);
    highlight('#ec_status_options');
  };

  var setCategory = function(value) {
    var selector = $('#spending_category');
    selectOption(selector, value);
    highlight(selector);
  };

  var setDescription = function(value) {
    var selector = '#description';
    var descriptionField = $(selector);
    descriptionField.val(value);
    highlight(selector);
  };

  var promptForAnAttachment = function() {
    var selector = '#attachment_form h2';
    $(selector).text('Now upload an attachment!');
    $(selector).css('color', '#f00');
    highlight(selector);
  }

  var tryToExplainTransaction = function() {
    var unexplainedTransactionText = $('.transaction.unexplained').text();

    if (unexplainedTransactionText) {
      var rulesURL = 'https://rawgit.com/freerange/free_agent_transaction_explainer/master/rules.json';
      $.getJSON(rulesURL, function(rules) {
        $(rules).each(function(index, rule) {
          var textToMatch = rule['textToMatch'];
          var description = rule['description'];
          var vat = rule['vat'];
          var category = rule['category'];
          var shouldHaveAttachment = rule['shouldHaveAttachment'];
          var ecStatus = rule['ecStatus'];

          console.log('Testing: ' + textToMatch);
          if (unexplainedTransactionText.match(textToMatch)) {
            console.log('Found: ' + description);

            setVAT(vat);
            setEcStatus(ecStatus);
            setCategory(category);
            setDescription(description);
            if (shouldHaveAttachment) {
              promptForAnAttachment();
            };

            return false; // We don't need to continue having found a match
          };
        });
      });
    } else {
      console.log('Ignoring previously explained transactions');
    };
  }

  tryToExplainTransaction();
})();

(function() {
  var selectOption = function(selector, value) {
    var options = $('option', selector);
    options.filter(function() {
      return ($(this).text() == value);
    }).prop('selected', true);
  };

  var highlight = function(selector) {
    $(selector).effect('highlight', 1500);
  };

  var setVAT = function(value) {
    var selector = '#purchase_sales_tax_rate';
    selectOption(selector, value);
    highlight(selector);
  };

  var setEcStatus = function(value) {
    var ecStatusOptions = {
      'Non-EC': '#bank_account_entry_ec_status_',
      'EC Goods': '#bank_account_entry_ec_status_2',
      'EC Services': '#bank_account_entry_ec_status_1'
    };

    var ecStatusSelector = ecStatusOptions[value];
    $(ecStatusSelector).prop('checked', true);
    highlight('#ec_status_options');
  };

  var setCategory = function(value) {
    var selector = $('#spending_category');
    selectOption(selector, value);
    highlight(selector);
  };

  var setDescription = function(value) {
    var selector = '#description';
    var descriptionField = $(selector);
    descriptionField.val(value);
    highlight(selector);
  };

  var promptForAnAttachment = function() {
    var selector = '#attachment_form h2';
    $(selector).text('Now upload an attachment!');
    $(selector).css('color', '#f00');
    highlight(selector);
  }

  var tryToExplainTransaction = function() {
    var unexplainedTransactionText = $('.transaction.unexplained').text();

    if (unexplainedTransactionText) {
      var rulesURL = 'https://rawgit.com/freerange/free_agent_transaction_explainer/master/rules.json';
      $.getJSON(rulesURL, function(rules) {
        $(rules).each(function(index, rule) {
          console.log('Testing: ' + rule.textToMatch);
          if (unexplainedTransactionText.match(rule.textToMatch)) {
            console.log('Found: ' + rule.description);

            setVAT(rule.vat);
            setEcStatus(rule.ecStatus);
            setCategory(rule.category);
            setDescription(rule.description);
            if (rule.shouldHaveAttachment) {
              promptForAnAttachment();
            };

            return false; // We don't need to continue having found a match
          };
        });
      });
    } else {
      console.log('Ignoring previously explained transactions');
    };
  }

  tryToExplainTransaction();
})();

Simplify by using object properties instead of dictionary lookup.