ui updating for report

This commit is contained in:
Yan
2017-06-13 09:59:56 +06:30
parent 8fc4fa5cf1
commit 3404c5e0bd
7 changed files with 98 additions and 76 deletions

View File

@@ -316,7 +316,7 @@
sub_total = 0
if @selected_item_type == "Sale"
@selected_item.sale_items.each do |sale_item|
sub_total += sale_item.qty*sale_item.unit_price
sub_total += (sale_item.qty*sale_item.unit_price)
%>
<tr>
<td class='item-name'><%= sale_item.product_name %></td>
@@ -351,7 +351,7 @@
<table class="table" id="order-charges-table" border="0">
<tr>
<td class="charges-name"><strong>Sub Total:</strong></td>
<td class="item-attr"><strong id="order-sub-total"><%=sub_total%></strong></td>
<td class="item-attr"><strong id="order-sub-total"><%= sub_total %></strong></td>
</tr>
<!-- <tr>
<td class="charges-name"><strong>Food:</strong></td>

View File

@@ -1,5 +1,6 @@
<%= form_tag report_path, :method => :get, :id=>"frm_report" do %>
<div class="row">
<div class="col-md-12"></div>
<div class="span3">
<% if defined? product_account %>
<%= select_tag "account", options_from_collection_for_select(@accounts,"id","title", :selected => params[:account])%>

View File

@@ -8,6 +8,7 @@
</span>
</ul>
</div>
<div class="card">
<table class="table table-striped">
<thead>