update addorder sale item xls
This commit is contained in:
@@ -59,16 +59,18 @@
|
|||||||
<% unless @sale_data.blank? %>
|
<% unless @sale_data.blank? %>
|
||||||
<% @sale_data.each do |sale| %>
|
<% @sale_data.each do |sale| %>
|
||||||
<!-- all total qty sum -->
|
<!-- all total qty sum -->
|
||||||
<!--
|
|
||||||
<% if sale.status_type != "Discount" && sale.status_type != "foc"
|
<% if sale.status_type != "Discount" && sale.status_type != "foc"
|
||||||
total_qty += sale.total_item
|
total_qty += sale.total_item
|
||||||
end %>
|
end %>
|
||||||
<% if sale.status_type == "foc" && sale.price > 0
|
<% if sale.status_type == "foc" && sale.price > 0
|
||||||
total_qty += sale.total_item
|
total_qty += sale.total_item
|
||||||
end %>
|
end %>
|
||||||
-->
|
<% if sale.status_type == "Discount"
|
||||||
|
total_qty += sale.total_item*(-1)
|
||||||
|
end %>
|
||||||
<!-- end all total qty -->
|
<!-- end all total qty -->
|
||||||
<!--
|
|
||||||
<% if sale.status_type == "foc" && sale.grand_total < 0
|
<% if sale.status_type == "foc" && sale.grand_total < 0
|
||||||
total_item_foc += sale.grand_total*(-1)
|
total_item_foc += sale.grand_total*(-1)
|
||||||
end %>
|
end %>
|
||||||
@@ -76,7 +78,7 @@
|
|||||||
<% if sale.status_type == "Discount" && sale.grand_total < 0
|
<% if sale.status_type == "Discount" && sale.grand_total < 0
|
||||||
total_item_dis += sale.grand_total*(-1)
|
total_item_dis += sale.grand_total*(-1)
|
||||||
end %>
|
end %>
|
||||||
-->
|
|
||||||
<% if !acc_arr.include?(sale.account_id) %>
|
<% if !acc_arr.include?(sale.account_id) %>
|
||||||
<tr>
|
<tr>
|
||||||
<td><b><%= sale.account_name %></b></td>
|
<td><b><%= sale.account_name %></b></td>
|
||||||
@@ -103,7 +105,12 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<td><%= sale.item_code rescue '-' %></td>
|
<td><%= sale.item_code rescue '-' %></td>
|
||||||
<td><%= sale.product_name rescue '-' %></td>
|
<td><%= sale.product_name rescue '-' %></td>
|
||||||
|
<% if sale.status_type != "Discount" %>
|
||||||
<td><%= sale.total_item rescue '-' %></td>
|
<td><%= sale.total_item rescue '-' %></td>
|
||||||
|
<%else%>
|
||||||
|
<td><%= sale.total_item*(-1) rescue '-' %></td>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<td><%= number_with_precision(sale.unit_price , precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
|
<td><%= number_with_precision(sale.unit_price , precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
|
||||||
<td><%= number_with_precision(sale.grand_total , precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
|
<td><%= number_with_precision(sale.grand_total , precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -117,7 +124,9 @@
|
|||||||
<% if sale.status_type !="Discount" && (!sale.product_name.include? "FOC")
|
<% if sale.status_type !="Discount" && (!sale.product_name.include? "FOC")
|
||||||
sub_qty += sale.total_item
|
sub_qty += sale.total_item
|
||||||
end %>
|
end %>
|
||||||
|
<% if sale.status_type =="Discount"
|
||||||
|
sub_qty += sale.total_item*(-1)
|
||||||
|
end %>
|
||||||
<% if count == value %>
|
<% if count == value %>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3"> </td>
|
<td colspan="3"> </td>
|
||||||
|
|||||||
@@ -20,11 +20,11 @@ class ActionController::Base
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
#check for license file
|
#check for license file
|
||||||
# if check_license
|
if check_license
|
||||||
# current_license(ENV["SX_PROVISION_URL"])
|
current_license(ENV["SX_PROVISION_URL"])
|
||||||
# else
|
else
|
||||||
# redirect_to activate_path
|
redirect_to activate_path
|
||||||
# end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user