make naming more abstract

This commit is contained in:
Matthias 2022-03-11 00:49:49 +01:00
parent b7e5f6a109
commit 8fbd776419
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -2291,21 +2291,21 @@ function showFulfilledSubTable(index, row, element, options) {
}); });
} }
var soTotalPriceRef = ''; // reference to total price field var TotalPriceRef = ''; // reference to total price field
var soTotalPriceOptions = {}; // options to reload the price var TotalPriceOptions = {}; // options to reload the price
function loadOrderTotal(reference, options={}) { function loadOrderTotal(reference, options={}) {
soTotalPriceRef = reference; TotalPriceRef = reference;
soTotalPriceOptions = options; TotalPriceOptions = options;
} }
function reloadTotal() { function reloadTotal() {
inventreeGet( inventreeGet(
soTotalPriceOptions.url, TotalPriceOptions.url,
{}, {},
{ {
success: function(data) { success: function(data) {
$(soTotalPriceRef).html(data.total_price_string); $(TotalPriceRef).html(data.total_price_string);
} }
} }
); );