Float parsing on StockItem tracking page

This commit is contained in:
Oliver Walters 2020-02-12 08:19:08 +11:00
parent 53d1040875
commit 265ed5115a
3 changed files with 5 additions and 26 deletions

View File

@ -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({

View File

@ -35,7 +35,9 @@
<hr>
<div class='panel panel-default'>
<div class='panel-content'>
{% if item.notes %}
{{ item.notes | markdownify }}
{% endif %}
</div>
</div>

View File

@ -1,26 +0,0 @@
{% extends "stock/stock_app_base.html" %}
{% load static %}
{% block content %}
<h3>Stock list here!</h3>
<table class='table table-striped table-condensed' data-toolbar='#button-toolbar' id='tracking-table'>
</table>
{% endblock %}
{% block js_ready %}
{{ block.super }}
loadStockTrackingTable($("#tracking-table"), {
params: function(p) {
return {
ordering: '-date',
};
},
partColumn: true,
url: "{% url 'api-stock-track' %}",
});
{% endblock %}