mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-04 07:05:41 +00:00 
			
		
		
		
	Add stocktake_date field to stock API, and to stock table
This commit is contained in:
		@@ -131,7 +131,6 @@ $.fn.inventreeTable = function(options) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // Callback when a column is changed
 | 
					    // Callback when a column is changed
 | 
				
			||||||
    options.onColumnSwitch = function(field, checked) {
 | 
					    options.onColumnSwitch = function(field, checked) {
 | 
				
			||||||
        console.log(`${field} -> ${checked}`);
 | 
					 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        var columns = table.bootstrapTable('getVisibleColumns');
 | 
					        var columns = table.bootstrapTable('getVisibleColumns');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -208,6 +208,7 @@ class StockItemSerializer(InvenTreeModelSerializer):
 | 
				
			|||||||
            'stale',
 | 
					            'stale',
 | 
				
			||||||
            'status',
 | 
					            'status',
 | 
				
			||||||
            'status_text',
 | 
					            'status_text',
 | 
				
			||||||
 | 
					            'stocktake_date',
 | 
				
			||||||
            'supplier_part',
 | 
					            'supplier_part',
 | 
				
			||||||
            'supplier_part_detail',
 | 
					            'supplier_part_detail',
 | 
				
			||||||
            'tracking_items',
 | 
					            'tracking_items',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -590,6 +590,11 @@ function loadStockTable(table, options) {
 | 
				
			|||||||
                    return locationDetail(row);
 | 
					                    return locationDetail(row);
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                field: 'stocktake_date',
 | 
				
			||||||
 | 
					                title: '{% trans "Stocktake" %}',
 | 
				
			||||||
 | 
					                sortable: true,
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
            {% settings_value "STOCK_ENABLE_EXPIRY" as expiry %}
 | 
					            {% settings_value "STOCK_ENABLE_EXPIRY" as expiry %}
 | 
				
			||||||
            {% if expiry %}
 | 
					            {% if expiry %}
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user