Minor refactoring for ordering js data.
This commit is contained in:
parent
f3773314a7
commit
45e0048490
2 changed files with 28 additions and 33 deletions
|
|
@ -1,27 +1,9 @@
|
|||
<script>
|
||||
//<![CDATA[
|
||||
$(function() {
|
||||
<% if Foodsoft.config[:tolerance_is_costly]
|
||||
for i in 0...@price.size %>
|
||||
addData(<%= @price[i] %>,
|
||||
<%= @unit[i] %>,
|
||||
<%= @price[i] * (@tolerance[i] + @quantity[i])%>,
|
||||
<%= @others_quantity[i] %>,
|
||||
<%= @others_tolerance[i] %>,
|
||||
<%= @used_quantity[i] %>,
|
||||
0);
|
||||
<% end
|
||||
else
|
||||
for j in 0...@price.size -%>
|
||||
addData(<%= @price[j] %>,
|
||||
<%= @unit[j] %>,
|
||||
<%= @price[j] * @quantity[j]%>,
|
||||
<%= @others_quantity[j] %>,
|
||||
<%= @others_tolerance[j] %>,
|
||||
<%= @used_quantity[j] %>,
|
||||
0);
|
||||
<% end
|
||||
end%>
|
||||
<% for row in @add_data_to_js %>
|
||||
addData(<%= row.join(", ") %>);
|
||||
<% end %>
|
||||
setGroupBalance(<%= @availableFunds %>);
|
||||
|
||||
// localization
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue