text: function save_product_list(a){var t=[],s=0;if($("#"+a+" tr").each(function(){var a=$(this).data("id"),e=$("#name-prod-"+a).data("name"),o=$("#cost-prod-"+a).val(),n=$("#qty-prod-"+a).val();(isNaN(o)||isNaN(n))&&(s+=1),t.push({id:a,qty:n,name:e,cost:o})}),s)alert("Invalid data input!");else{calc_table_sum(a);var e=$("#total-cost").val();$.post("/save-purchase-list",{suppliedProds:t,purchaseCost:e,_token:$('meta[name="csrf-token"]').attr("content")},function(a,t){})}}
  