mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 05:05:42 +00:00 
			
		
		
		
	Add some more functionality to StockLocation page
This commit is contained in:
		| @@ -63,7 +63,7 @@ | |||||||
|                         <li> |                         <li> | ||||||
|                             <a href='#' id='part-move'> |                             <a href='#' id='part-move'> | ||||||
|                                 <span class='fas fa-exchange-alt'></span> |                                 <span class='fas fa-exchange-alt'></span> | ||||||
|                                 {% trans "Move part stock" %} |                                 {% trans "Transfer part stock" %} | ||||||
|                             </a> |                             </a> | ||||||
|                         </li> |                         </li> | ||||||
|                     </ul> |                     </ul> | ||||||
|   | |||||||
| @@ -69,6 +69,12 @@ | |||||||
|                         {% trans "Count stock" %} |                         {% trans "Count stock" %} | ||||||
|                     </a> |                     </a> | ||||||
|                 </li> |                 </li> | ||||||
|  |                 <li> | ||||||
|  |                     <a href='#' id='location-move'> | ||||||
|  |                         <span class='fas fa-exchange-alt'></span> | ||||||
|  |                         {% trans "Transfer stock" %} | ||||||
|  |                     </a> | ||||||
|  |                 </li> | ||||||
|             </ul> |             </ul> | ||||||
|             </div> |             </div> | ||||||
|             {% endif %} |             {% endif %} | ||||||
| @@ -221,8 +227,8 @@ | |||||||
|     }); |     }); | ||||||
|  |  | ||||||
|     {% if location %} |     {% if location %} | ||||||
|     $("#location-count").click(function() { |  | ||||||
|  |  | ||||||
|  |     function adjustLocationStock(action) { | ||||||
|         inventreeGet( |         inventreeGet( | ||||||
|             '{% url "api-stock-list" %}', |             '{% url "api-stock-list" %}', | ||||||
|             { |             { | ||||||
| @@ -233,7 +239,7 @@ | |||||||
|             }, |             }, | ||||||
|             { |             { | ||||||
|                 success: function(items) { |                 success: function(items) { | ||||||
|                     adjustStock('count', items, { |                     adjustStock(action, items, { | ||||||
|                         onSuccess: function() { |                         onSuccess: function() { | ||||||
|                             location.reload(); |                             location.reload(); | ||||||
|                         } |                         } | ||||||
| @@ -241,6 +247,14 @@ | |||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|         ); |         ); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     $("#location-count").click(function() { | ||||||
|  |         adjustLocationStock('count'); | ||||||
|  |     }); | ||||||
|  |  | ||||||
|  |     $("#location-move").click(function() { | ||||||
|  |         adjustLocationStock('move'); | ||||||
|     }); |     }); | ||||||
|  |  | ||||||
|     $('#print-label').click(function() { |     $('#print-label').click(function() { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user