// number key pad
$(document).on('click', '.cashier_number', function(event){
        event.stopPropagation();
        event.preventDefault();
        if(event.handled !== true) {
            var original_value;
            original_value = $('#amount').text();

            var input_value = $(this).attr("data-value");

            var input_type = $(this).attr("data-type");
            	switch (input_type) {
              		case 'num':
		              	if (original_value == "0.0"){
			                $('#amount').text(input_value);
			            }else{
			                $('#amount').append(input_value);
			            }
              		break;

              		case 'add':
	                	var input_value = $(this).attr("data-value");
	                	amount = parseInt(input_value) + parseInt(original_value);
	                	$('#amount').html(amount);

             		break;
             		case 'clr':
             			$('#amount').html("0.0");
             		break;
             		case 'del' :
			          var cash=$('#amount').text();
			          $('#amount').text(cash.substr(0,cash.length-1));
			        break;

          		}
          	event.handled = true;
        } else {
            return false;
        }
});
