mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 04:26:44 +00:00
Merge remote-tracking branch 'inventree/master' into sales-order-allocation-fixes
This commit is contained in:
commit
cbd2732622
@ -1254,7 +1254,7 @@ function showAllocationSubTable(index, row, element, options) {
|
|||||||
html += makeIconButton('fa-trash-alt icon-red', 'button-allocation-delete', pk, '{% trans "Delete stock allocation" %}');
|
html += makeIconButton('fa-trash-alt icon-red', 'button-allocation-delete', pk, '{% trans "Delete stock allocation" %}');
|
||||||
}
|
}
|
||||||
|
|
||||||
html += "</div>";
|
html += '</div>';
|
||||||
|
|
||||||
return html;
|
return html;
|
||||||
},
|
},
|
||||||
@ -1390,7 +1390,7 @@ function loadSalesOrderLineItemTable(table, options={}) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
footerFormatter: function() {
|
footerFormatter: function() {
|
||||||
return '{% trans "Total" %}'
|
return '{% trans "Total" %}';
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1404,11 +1404,11 @@ function loadSalesOrderLineItemTable(table, options={}) {
|
|||||||
field: 'quantity',
|
field: 'quantity',
|
||||||
title: '{% trans "Quantity" %}',
|
title: '{% trans "Quantity" %}',
|
||||||
footerFormatter: function(data) {
|
footerFormatter: function(data) {
|
||||||
return data.map(function (row) {
|
return data.map(function(row) {
|
||||||
return +row['quantity']
|
return +row['quantity'];
|
||||||
}).reduce(function (sum, i) {
|
}).reduce(function(sum, i) {
|
||||||
return sum + i
|
return sum + i;
|
||||||
}, 0)
|
}, 0);
|
||||||
},
|
},
|
||||||
switchable: false,
|
switchable: false,
|
||||||
},
|
},
|
||||||
@ -1432,12 +1432,13 @@ function loadSalesOrderLineItemTable(table, options={}) {
|
|||||||
currency: row.sale_price_currency
|
currency: row.sale_price_currency
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
return formatter.format(total);
|
return formatter.format(total);
|
||||||
},
|
},
|
||||||
footerFormatter: function(data) {
|
footerFormatter: function(data) {
|
||||||
var total = data.map(function (row) {
|
var total = data.map(function(row) {
|
||||||
return +row['sale_price'] * row['quantity'];
|
return +row['sale_price'] * row['quantity'];
|
||||||
}).reduce(function (sum, i) {
|
}).reduce(function(sum, i) {
|
||||||
return sum + i;
|
return sum + i;
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user