Merge branch 'crm' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
Yan
2017-06-26 19:28:21 +06:30
9 changed files with 114 additions and 6 deletions

View File

@@ -47,7 +47,7 @@
<tbody>
<% @i = 0 %>
<% @crm_customers.each do |crm_customer| %>
<% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %>
<% if crm_customer.customer_id != "CUS-00001" && crm_customer.customer_id != "CUS-000000000" %>
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
<td>
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>

View File

@@ -33,6 +33,7 @@
<ul class="dropdown-menu">
<li><%= link_to "Orders ", transactions_orders_path, :tabindex =>"-1" %></li>
<li><%= link_to "Sales ", transactions_sales_path, :tabindex =>"-1" %></li>
<!-- <li><%= link_to "Sales ", transactions_credit_notes_path, :tabindex =>"-1" %></li> -->
</ul>
</li>
<li class="navbar-nav mr-auto dropdown">

View File

@@ -41,7 +41,7 @@
<% if @crm_customers.count > 0 %>
<% @i = 0 %>
<% @crm_customers.each do |crm_customer| %>
<% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %>
<% if crm_customer.customer_id != "CUS-00000" && crm_customer.customer_id != "CUS-00000000" %>
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
<td>
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>

View File

@@ -0,0 +1,70 @@
<div class="row">
<div class="col-lg-12">
<ol class="breadcrumb">
<li><a href="<%= crm_root_path %>">Home</a></li>
<li class="active">
<a href="<%= transactions_credit_notes_path %>">Credit Note</a>
</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="main-box-body clearfix">
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Sale Id </th>
<th>Receipt no </th>
<th>Credit Amount</th>
<th>Cashier</th>
<th>Customer Name</th>
<th>Receipt Date</th>
</tr>
</thead>
<tbody>
<% @sales.each do |sale| %>
<tr>
<td><%= link_to sale.sale_id, transactions_sale_path(sale) %></td>
<td><%= sale.receipt_no %></td>
<td><%credit = SalePayment.where('sale_id = ? AND payment_method=?', sale.sale_id,"creditnote").first %>
<%= credit.payment_amount rescue '-' %>
</td>
<td><%= sale.cashier_name rescue '-' %></td>
<td><%= link_to sale.customer.name, crm_customer_path(sale.customer_id) %></td>
<td> <%= sale.receipt_date.strftime("%d-%m-%Y") %> </td>
</tr>
<% end %>
</tbody>
</table>
<br>
</div>
</div>
</div>
</div>
<!--
<script type="text/javascript">
$(function () {
$('.datepicker').datepicker({
format : 'dd-mm-yyyy',
autoclose: true
});
$('.datepicker').attr('ReadOnly','true');
$('.datepicker').css('cursor','pointer');
});
</script> -->