try {
if (!aplopay.exists) { throw "aplopayObjUndefined"; }

aplopay.utils = {
    totalByClass: function(selector) {
        var total = 0
        var elems = $(selector).each(function(){
            total += parseFloat($(this).text());
        })
        return total
        
    },
    
    floatToPercent: function(val) {
        val = val * 100;
        return val.toFixed(2)
    },
    
    confirmDeleteSchedule: function(id) {
        var cancel = confirm("Are you sure you want to delete this recurring payment?")
        if (cancel){
            window.location = "/dashboard/renter/schedule/payment/remove/"+id+"/";
        }
        return false
    
    },
    
    init: function() {

    }
    
};
$(function(){aplopay.utils.init()});
} catch(e) { aplopay.standard_error_handler(e); }

