Merge branch 'crm'

This commit is contained in:
Aung Myo
2017-06-16 10:21:56 +06:30
15 changed files with 221 additions and 82 deletions

View File

@@ -16,9 +16,9 @@
</ul>
<!-- Nav tabs - End -->
<div class="tab-content" style="min-height:670px; max-height:670px; overflow-y:scroll">
<div class="tab-content">
<div class="tab-pane active" id="queue" role="tabpanel" style="min-height:670px; max-height:670px; overflow-y:">
<div class="tab-pane active" id="queue" role="tabpanel"">
<div class="row">
<div class="col-md-3"></div>
<div class="col-md-6">
@@ -115,7 +115,7 @@
</div>
</div>
<div class="tab-pane" id="customer" role="tabpanel" style="min-height:670px; max-height:670px; overflow-y:">
<div class="tab-pane" id="customer" role="tabpanel">
<h3>Sale Details</h3>
<div class="table-responsive">
<table class="table table-striped">

View File

@@ -383,6 +383,6 @@
<button type="button" id="discount" class="btn btn-primary btn-lg btn-block">Discount</button>
<!-- <button type="button" class="btn btn-primary btn-lg btn-block" disabled>Tax</button> -->
<button type="button" id="pay-bill" class="btn btn-primary btn-lg btn-block">Pay</button>
<button type="button" class="btn btn-primary btn-lg btn-block" disabled>Re.Print</button>
<button type="button" id="re-print" class="btn btn-primary btn-lg btn-block">Re.Print</button>
</div>
</div>

View File

@@ -42,5 +42,5 @@
<% end %>
</tbody>
</table>
<%= paginate @settings_order_queue_stations %>
</div>

View File

@@ -60,19 +60,15 @@
var reason = $('input[type="radio"]:checked').val();
console.log(reason)
var url = '<% transactions_manual_void_sale_path()%>';
var sale_id = $(this).find(".customer-id").text();
$.ajax({
type: 'POST',
url: 'sales/manual_void_sale',
url: 'manual_void_sale',
data: {reason: reason, sale_id: sale_id},
success: function(data){
window.location.href = "transactions/sales"
// window.location.href = "transactions/sales"
}
});
});
});

View File

@@ -20,9 +20,9 @@
<td colspan="8">
<%= form_tag transactions_sales_path, :method => :get do %>
<div class="input-append form-group pull-right col-md-6">
<!-- <input class="datepicker col-md-3 form-control" name="date" id="date" type="text" placeholder="Receipt date" style="margin-right: 10px"> -->
<input class="datepicker col-md-3 form-control" name="date" id="date" type="text" placeholder="Receipt date" style="margin-right: 10px">
<input type="text" name="receipt_no" class="col-md-6 form-control" placeholder="Receipt No" style="margin-right: 10px">
<input type="text" name="receipt_no" class="col-md-5 form-control" placeholder="Receipt No" style="margin-right: 10px">
<button type="submit" class="btn btn-primary btn">Search</button>
</div>
<% end %>
@@ -41,23 +41,28 @@
</thead>
<tbody>
<% @sales.each do |sale| %>
<tr>
<td><%= sale.sale_id %></td>
<td><%= sale.receipt_no %></td>
<td><%= sale.grand_total rescue '-' %></td>
<td><%= sale.total_tax %></td>
<td><%= sale.cashier_name rescue '-' %></td>
<td> <%= sale.sale_status %> </td>
<td> <%= sale.receipt_date.strftime("%d-%m-%Y") %> </td>
<td><%= link_to 'Show', transactions_sale_path(sale) %></td>
</tr>
<% if @sales != 0 %>
<% @sales.each do |sale| %>
<tr>
<td><%= sale.sale_id %></td>
<td><%= sale.receipt_no %></td>
<td><%= sale.grand_total rescue '-' %></td>
<td><%= sale.total_tax %></td>
<td><%= sale.cashier_name rescue '-' %></td>
<td> <%= sale.sale_status %> </td>
<td> <%= sale.receipt_date.strftime("%d-%m-%Y") %> </td>
<td><%= link_to 'Show', transactions_sale_path(sale) %></td>
</tr>
<% end %>
<% else %>
<tr><td colspan="8"><strong><p style="text-align: center">There is no data for search....</p></strong></td></tr>
<% end %>
</tbody>
</table>
<br>
<%= paginate @sales %>
<% if @sales != 0 %>
<%= paginate @sales %>
<% end %>
</div>
</div>

View File

@@ -6,7 +6,7 @@
<a href="<%= transactions_sales_path %>">Sale</a>
</li>
<li class="active">
<a href="<%= transactions_sales_path %>"><%= @sale.sale_id %></a>
<a href="<%= transactions_sale_path(@sale.sale_id) %>"><%= @sale.sale_id %></a>
</li>
</ol>
</div>
@@ -21,11 +21,11 @@
<a class="nav-link active" data-toggle="tab" href="#queue" role="tab">Sale Details </a>
</li>
<li class="nav-item">
<a class="nav-link " data-toggle="tab" href="#booking" role="tab">Orders </a>
<a class="nav-link " data-toggle="tab" href="#booking" role="tab">Orders Details</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#customer" role="tab">Customer Details</a>
</li>
<!-- <li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#customer" role="tab">Sales</a>
</li> -->
</ul>
<!-- Nav tabs - End -->
@@ -124,6 +124,9 @@
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<td colspan="8">&nbsp;</td>
</tr>
<tr>
<th>Order ID</th>
<th>Menu Item</th>
@@ -154,11 +157,11 @@
</div>
</div>
<div class="tab-pane" id="customer" role="tabpanel" style="min-height:670px; max-height:670px; overflow-y:">
<h3>Sale Details</h3>
<div class="table-responsive">
<div class="tab-pane" id="customer" role="tabpanel">
</div>
<div class="table-responsive">
<!-- -->
</div>
</div>
</div>
@@ -171,13 +174,13 @@
</a>
<!-- Temporary No Needs -->
<!-- <a href="<%= transactions_void_path(@sale)%>" style="margin-top: 10px " class="btn btn-primary pull-right btn-lg">
<a href="<%= transactions_void_path(@sale)%>" style="margin-top: 10px " class="btn btn-danger pull-right btn-lg">
<i class="fa fa-trash fa-lg"></i> Void Sale
</a>
<a href="<%= %>" style="margin-top: 10px " class="btn btn-primary pull-right btn-lg">
<a href="<%= transactions_manual_complete_sale_path(@sale)%>" style="margin-top: 10px " class="btn btn-success pull-right btn-lg">
<i class="fa fa-invoice fa-lg"></i> Complete Sale
</a> -->
</a>
</div>
</div>