Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -55,9 +55,8 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<% puts "'''''''''''''''''''"
|
||||
puts @response
|
||||
if @response["status"] == true %>
|
||||
<%
|
||||
if @response["data"].present? %>
|
||||
<tr>
|
||||
<th colspan="5">Membership Transactions</th>
|
||||
<% if @response["status"] == true %>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
<!--
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-sm-6 col-md-offset-4 col-sm-offset-3">
|
||||
<%= simple_form_for(@login_form, url: login_path, method: "POST") do |f| %>
|
||||
<%= simple_form_for(@login_form, url: login_path, method: "POST") do |f| %>
|
||||
<div class="card">
|
||||
<h4 class="card-title text-center" style="margin:10px">Login</h4>
|
||||
<div class="content" style="margin:10px">
|
||||
@@ -22,4 +22,40 @@
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-12">
|
||||
<div class="card-deck">
|
||||
|
||||
<% @employees.each do |employee| %>
|
||||
|
||||
<div data-formid="#form_<%= employee.emp_id %>" class="empBtn card card-inverse card-primary mb-3 text-center" style="width: 15rem;height:15rem;">
|
||||
<form id="form_<%=employee.emp_id%>" action="<%= emp_login_path(employee.emp_id) %>" method="PATCH"></form>
|
||||
<div class="card-block">
|
||||
<h4 class="card-title">
|
||||
<%= employee.name %>
|
||||
</h4>
|
||||
<div class="card-content">
|
||||
(<%= employee.emp_id%>)
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<small><%= employee.role %></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).on('turbolinks:load', function() {
|
||||
$(".empBtn").click(function(event){
|
||||
event.preventDefault();
|
||||
console.log($(this).data("formid"));
|
||||
var item = $(this).data("formid");
|
||||
$(item).submit();
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
68
app/views/home/show.html.erb
Normal file
68
app/views/home/show.html.erb
Normal file
@@ -0,0 +1,68 @@
|
||||
<style>
|
||||
.pin_pad {
|
||||
width:10rem;
|
||||
height:10rem;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
line-height: 10rem;
|
||||
margin:2px;
|
||||
margin-top:4px;
|
||||
margin-bottom:4px;
|
||||
font-size:3rem;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-sm-6 col-md-offset-4 col-sm-offset-3">
|
||||
<%= simple_form_for(@login_form, url: emp_login_update_path, method: "PATCH") do |f| %>
|
||||
<div class="card">
|
||||
<div class="content" style="margin:10px">
|
||||
<div class="form-group">
|
||||
<%= f.input :emp_id,as: :hidden, label: "Access PIN", required: false, class: "form-control" %>
|
||||
|
||||
<%= f.input :password, label: "Access PIN", required: false, class: "form-control" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content" style="margin:10px; margin-top:0px; text-align:center">
|
||||
<button class="pin_pad" data-value="1">1</button>
|
||||
<button class="pin_pad" data-value="2">2</button>
|
||||
<button class="pin_pad" data-value="3">3</button>
|
||||
<button class="pin_pad" data-value="4">4</button>
|
||||
<button class="pin_pad" data-value="5">5</button>
|
||||
<button class="pin_pad" data-value="6">6</button>
|
||||
<button class="pin_pad" data-value="7">7</button>
|
||||
<button class="pin_pad" data-value="8">8</button>
|
||||
<button class="pin_pad" data-value="9">9</button>
|
||||
<button class="pin_pad" data-value="CLR">CLR</button>
|
||||
<button class="pin_pad" data-value="8">0</button>
|
||||
<button class="pin_pad btn-warning" data-value="ENT">ENT</button>
|
||||
|
||||
</div>
|
||||
<div class="footer text-center" style="margin:10px">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).on('turbolinks:load', function() {
|
||||
$(".pin_pad").click(function(event){
|
||||
event.preventDefault();
|
||||
console.log($(this).data("value"));
|
||||
var value = $(this).data("value");
|
||||
|
||||
if (value == "CLR") {
|
||||
$("#login_form_password").val("");
|
||||
} else if(value == "ENT") {
|
||||
$("#new_login_form").submit();
|
||||
} else {
|
||||
var old_value = $("#login_form_password").val();
|
||||
$("#login_form_password").val(old_value + value);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= %>">Home</a></li>
|
||||
<li><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<li>Daily Sale Report</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= %>">Home</a></li>
|
||||
<li><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<li>Daily Sale Report</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= %>">Home</a></li>
|
||||
<li><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<li>Receipt List Report</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= %>">Home</a></li>
|
||||
<li><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<li>Daily Sale Report</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= %>">Home</a></li>
|
||||
<li><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<li>Daily Sale Report</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -11,13 +11,13 @@
|
||||
<hr />
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<!-- <div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right">
|
||||
<a href="javascript:export_to('<%=reports_sale_items_path%>.xls')" class = "btn btn-default">Export to Excel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="container margin-top-20">
|
||||
<div class="card row">
|
||||
|
||||
70
app/views/transactions/credit_notes/index.html.erb
Normal file
70
app/views/transactions/credit_notes/index.html.erb
Normal 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> -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user