Allow zero quantity for inventory batch desktop entry form
This commit is contained in:
		
							parent
							
								
									edbf7e6723
								
							
						
					
					
						commit
						c1e2c5551c
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
					@ -10,11 +10,13 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    function assert_quantity() {
 | 
					    function assert_quantity() {
 | 
				
			||||||
        % if allow_cases:
 | 
					        % if allow_cases:
 | 
				
			||||||
        if ($('#cases').val() && parseFloat($('#cases').val())) {
 | 
					        var cases = parseFloat($('#cases').val());
 | 
				
			||||||
 | 
					        if (!isNaN(cases)) {
 | 
				
			||||||
            return true;
 | 
					            return true;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        % endif
 | 
					        % endif
 | 
				
			||||||
        if ($('#units').val() && parseFloat($('#units').val())) {
 | 
					        var units = parseFloat($('#units').val());
 | 
				
			||||||
 | 
					        if (!isNaN(units)) {
 | 
				
			||||||
            return true;
 | 
					            return true;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        alert("Please provide case and/or unit quantity");
 | 
					        alert("Please provide case and/or unit quantity");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue