Clean up some inventory batch UI logic; prefer units by default
This commit is contained in:
		
							parent
							
								
									d61d9cc574
								
							
						
					
					
						commit
						c7496d7018
					
				
					 5 changed files with 22 additions and 17 deletions
				
			
		|  | @ -143,7 +143,7 @@ | |||
|                         if (data.product.type2) { | ||||
|                             $('#units').focus().select(); | ||||
|                         } else { | ||||
|                             % if allow_cases: | ||||
|                             % if allow_cases and prefer_cases: | ||||
|                             if ($('#cases').val()) { | ||||
|                                 $('#cases').focus().select(); | ||||
|                             } else if ($('#units').val()) { | ||||
|  |  | |||
|  | @ -5,19 +5,6 @@ | |||
| ## TODO: this is broken for actual page (header) title | ||||
| <%def name="title()">${h.link_to("Inventory", url('mobile.batch.inventory'))} » ${h.link_to(batch.id_str, url('mobile.batch.inventory.view', uuid=batch.uuid))} » ${row.upc.pretty()}</%def> | ||||
| 
 | ||||
| <% | ||||
|    unit_uom = 'LB' if row.product and row.product.weighed else 'EA' | ||||
| 
 | ||||
|    if row.cases and allow_cases: | ||||
|        uom = 'CS' | ||||
|    elif row.units: | ||||
|        uom = unit_uom | ||||
|    elif row.case_quantity and allow_cases: | ||||
|        uom = 'CS' | ||||
|    else: | ||||
|        uom = unit_uom | ||||
| %> | ||||
| 
 | ||||
| <div class="ui-grid-a"> | ||||
|   <div class="ui-block-a"> | ||||
|     % if instance.product: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lance Edgar
						Lance Edgar