anchor.diff:                        });
                     });
   
  +                  $('#submit-receipt').click( function(e) { 
  +
  +                      if( $('.receipt-line').length === 0 ) { 
  +                        toastr.error("You need to atleast add one commodity."); 
  +
  +                        e.preventDefault();
  +                        return; 
  +                      }
  +
  +                  });
  +
   
                 });
               </script>
  
positive.code: <%= form_for(receipt) do |f| %>
  
  <div class="wrapper wrapper-content">
    <div class="ibox float-e-margins">
  
negative.code: 
                        $newRow.find('td').last().html(REMOVE_RECEIPTLINE_BTN); 
  
                        $newRow.find(':input').attr('readonly', true).removeAttr('id'); 
  
                        $newRow.addClass('receipt-line');
  
                        $newRow.insertBefore( $receiptLineForm); 
  
  