예제 #1
0
		$(this).parent().parent().remove();
	});
	
	$("#add_addtional_item_number").click(function()
	{
		$("#additional_item_numbers tbody").append('<tr><td><input type="text" class="form-control form-inps" size="40" name="additional_item_numbers[]" value="" /></td><td>&nbsp;</td></tr>');
	});
	
	$("#cancel").click(cancelItemAddingFromSaleOrRecv);
	
    setTimeout(function(){$(":input:visible:first","#item_form").focus();},100);
    $('#image_id').imagePreview({ selector : '#avatar' }); // Custom preview container
	
	$('.datepicker').datepicker({
		format: <?php 
echo json_encode(get_js_date_format());
?>
	});
   	
	$(".override_default_tax_checkbox, .override_prices_checkbox, .override_default_commission").change(function()
	{
		$(this).parent().parent().next().toggleClass('hidden')
	});
	
	$("#is_service").change(function()
	{
		if ($(this).prop('checked'))
		{
			$(".quantity-input").addClass('hidden');			
			$(".reorder-input").addClass('hidden');			
		}
예제 #2
0
		$.get($(this).attr('href'), function()
		{
			gritter(<?php 
echo json_encode(lang('common_success'));
?>
,'<?php 
echo lang('sales_receipt_sent');
?>
','gritter-item-success',false,false);
			
		});
		
		return false;
	});
	$('#date').datepicker({format: '<?php 
echo get_js_date_format();
?>
'});
	$("#sales_delete_form").submit(function()
	{
		if (!confirm(<?php 
echo json_encode(lang("sales_delete_confirmation"));
?>
))
		{
			return false;
		}
	});
	
	$("#sales_undelete_form").submit(function()
	{