mirror of
https://github.com/inventree/InvenTree.git
synced 2025-12-17 20:35:01 -06:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a1908f1bf1 | ||
|
|
c29e58aeaa | ||
|
|
fdaf6d3e19 | ||
|
|
78badcd65b |
@@ -13,7 +13,7 @@ import common.models
|
||||
from InvenTree.api_version import INVENTREE_API_VERSION
|
||||
|
||||
# InvenTree software version
|
||||
INVENTREE_SW_VERSION = "0.11.0"
|
||||
INVENTREE_SW_VERSION = "0.11.1"
|
||||
|
||||
|
||||
def inventreeInstanceName():
|
||||
|
||||
@@ -390,7 +390,7 @@
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
{% if roles.salse_order.add %}
|
||||
{% if roles.sales_order.add %}
|
||||
$("#new-sales-order").click(function() {
|
||||
|
||||
createSalesOrder({
|
||||
|
||||
@@ -1188,7 +1188,12 @@ class StockTrackingList(ListAPI):
|
||||
"""List all stock tracking entries."""
|
||||
queryset = self.filter_queryset(self.get_queryset())
|
||||
|
||||
serializer = self.get_serializer(queryset, many=True)
|
||||
page = self.paginate_queryset(queryset)
|
||||
|
||||
if page is not None:
|
||||
serializer = self.get_serializer(page, many=True)
|
||||
else:
|
||||
serializer = self.get_serializer(queryset, many=True)
|
||||
|
||||
data = serializer.data
|
||||
|
||||
@@ -1262,6 +1267,8 @@ class StockTrackingList(ListAPI):
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if page is not None:
|
||||
return self.get_paginated_response(data)
|
||||
if request.is_ajax():
|
||||
return JsonResponse(data, safe=False)
|
||||
else:
|
||||
|
||||
@@ -76,7 +76,11 @@ function formatPriceRange(price_min, price_max, options={}) {
|
||||
var p_min = price_min || price_max;
|
||||
var p_max = price_max || price_min;
|
||||
|
||||
var quantity = options.quantity || 1;
|
||||
var quantity = 1;
|
||||
|
||||
if ('quantity' in options) {
|
||||
quantity = options.quantity;
|
||||
}
|
||||
|
||||
if (p_min == null && p_max == null) {
|
||||
return null;
|
||||
|
||||
@@ -2063,6 +2063,10 @@ function loadStockTable(table, options) {
|
||||
currency = baseCurrency();
|
||||
}
|
||||
|
||||
if (row.quantity <= 0) {
|
||||
return '-';
|
||||
}
|
||||
|
||||
return formatPriceRange(
|
||||
min_price,
|
||||
max_price,
|
||||
|
||||
Reference in New Issue
Block a user