From 265ed5115ac4539073ba165dc782a7c20ae8d180 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 12 Feb 2020 08:19:08 +1100 Subject: [PATCH] Float parsing on StockItem tracking page --- .../static/script/inventree/stock.js | 3 +++ .../stock/templates/stock/item_notes.html | 2 ++ InvenTree/stock/templates/stock/tracking.html | 26 ------------------- 3 files changed, 5 insertions(+), 26 deletions(-) delete mode 100644 InvenTree/stock/templates/stock/tracking.html diff --git a/InvenTree/InvenTree/static/script/inventree/stock.js b/InvenTree/InvenTree/static/script/inventree/stock.js index 612c8b5c88..1495d04cae 100644 --- a/InvenTree/InvenTree/static/script/inventree/stock.js +++ b/InvenTree/InvenTree/static/script/inventree/stock.js @@ -385,6 +385,9 @@ function loadStockTrackingTable(table, options) { cols.push({ field: 'quantity', title: 'Quantity', + formatter: function(value, row, index, field) { + return parseFloat(value); + }, }); cols.push({ diff --git a/InvenTree/stock/templates/stock/item_notes.html b/InvenTree/stock/templates/stock/item_notes.html index a5abd13781..c97830a59c 100644 --- a/InvenTree/stock/templates/stock/item_notes.html +++ b/InvenTree/stock/templates/stock/item_notes.html @@ -35,7 +35,9 @@
+ {% if item.notes %} {{ item.notes | markdownify }} + {% endif %}
diff --git a/InvenTree/stock/templates/stock/tracking.html b/InvenTree/stock/templates/stock/tracking.html deleted file mode 100644 index ecd9772897..0000000000 --- a/InvenTree/stock/templates/stock/tracking.html +++ /dev/null @@ -1,26 +0,0 @@ -{% extends "stock/stock_app_base.html" %} -{% load static %} - -{% block content %} - -

Stock list here!

- - -
- -{% endblock %} - -{% block js_ready %} -{{ block.super }} - - loadStockTrackingTable($("#tracking-table"), { - params: function(p) { - return { - ordering: '-date', - }; - }, - partColumn: true, - url: "{% url 'api-stock-track' %}", - }); - -{% endblock %} \ No newline at end of file