anchor.diff:  
     $("#payment_tracking_invoice_selected").click(function (e) {
       e.preventDefault();
  +    if(!confirm("Send an email(s)?")) { return; }
       var rentalIds= $("input[type='checkbox'][id^='paymentTrackingCheck']:checked").toArray().map(function (checkbox) {
         return checkbox.id.match(/\d+/).shift();
       });
  
positive.code:     ]
    });
  
    $(".payment_tracking_send_invoice").click(function () {
      var rentalId = $(this).attr("id").match(/\d+/).shift();
      $.ajax({
        method: 'post',
  
negative.code: 
    $("#payment_tracking_invoice_all").click(function (e) {
      e.preventDefault();
      if(!confirm("Send an email(s)?")) { return; }
      //gon uses the value we set in the controller
      var rentalIds = gon.rentals.map(function (rental) { return rental.id })
  
  