Guest User

Untitled

a guest
Jan 11th, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.   $.ajax({
  3.     type: "POST",
  4.     url: base_url + "/finance/payment-history",
  5.     data: dataString,
  6.     success: function(response) {
  7.  
  8.       var json_obj = $.parseJSON(response);
  9.  
  10.       var output = "<ul>";
  11.  
  12.       for (i=0; i < json_obj.payments.length; i++)
  13.       {
  14.         var payment = json_obj.payments[i];
  15.         var date = moment(payment.pdate).format('Do MMM YYYY');
  16.         output += "<li>&pound;" + payment.amount + " - " + date + " (" + payment.club + ")</li>";
  17.       }
  18.  
  19.       output += "</ul>";
  20.  
  21.       $('.history-section').html(output);
  22.  
  23.     },
  24.     dataType: "html"
  25.   });
Advertisement
Add Comment
Please, Sign In to add comment