Guest User

Untitled

a guest
Nov 20th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. $('.chkbox').click(function(){
  2. var sum=0;
  3. $(".ordertable input:checked").each(function() {
  4.  
  5. var priceofthis = $(this).parents('.ordertable').find('.chkprice').text();
  6. var nameid = $(this).parents('.ordertable').find('.nameid').text();
  7. var quan = $('.quantity').val();
  8. var mulprice = Number($(this).val()) * Number(priceofthis);
  9. sum=Number(sum)+Number(mulprice);
  10. $.post('<?php echo $this->Html->url('/transactions/set_quantity') ?>',{quantity:quan,mulprice:mulprice,nameid:nameid},function(reply){
  11. alert(reply);
  12. });
  13. });
  14. $('#hash').html(sum);
  15. });
Add Comment
Please, Sign In to add comment