Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into adminbsb_ui_changes

This commit is contained in:
phyusin
2017-11-15 13:28:18 +06:30
80 changed files with 1225 additions and 469 deletions

View File

@@ -77,6 +77,11 @@
<span><%= t :transactions %></span>
</a>
<ul class="ml-menu">
<% if can? :menage, Booking %>
<li>
<a href="<%= transactions_bookings_path %>"><%= t :bookings %></a>
</li>
<% end %>
<% if can? :menage, Order %>
<li>
<a href="<%= transactions_orders_path %>"><%= t :orders %></a>
@@ -89,7 +94,7 @@
<% end %>
<% if can? :menage, Sale %>
<li>
<a href="<%= transactions_credit_notes_path %>"><%= (t :credit) + " " + (t :reports) %></a>
<a href="<%= transactions_credit_notes_path %>"><%= (t :credit) %></a>
</li>
<% end %>
</ul>

View File

@@ -1,5 +1,5 @@
<div class="page-header">
<!-- <div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item active">OQS</li>
@@ -7,9 +7,9 @@
<%= link_to 'Back', oqs_root_path %>
</span>
</ol>
</div>
</div> -->
<div class="row">
<div class="col-md-12">
<div class="col-md-5">
<div class="card">
<div class="card-header">Update Quantity</div>
<div class="card-body">
@@ -32,36 +32,74 @@
</div>
</div> -->
<div class="row clearfix">
<div class="col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label">
<label for="">Quantity :</label>
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-6 form-control-label">
<label for="">QTY :</label>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-2">
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-6">
<input type="text" name="qty_weight" class="text-right form-control" value="<%= @order_item[0].qty %>" />
<input type="text" name="qty_weight" class="text-center form-control qty" id="qty" value="<%= @order_item[0].qty %>" />
<!-- <input type="text" id="email_address_2" class="form-control" placeholder="Enter your email address"> -->
</div>
</div>
<div class="row clearfix">
<div class="col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label">
<label for="">Remark :</label>
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 form-control-label">
<label class ="m-t-20">Remark :</label>
</div>
<div class="col-lg-10 col-md-10 col-sm-8 col-xs-7">
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-7">
<textarea name="remarks" class="form-control"></textarea>
<!-- <input type="text" id="email_address_2" class="form-control" placeholder="Enter your email address"> -->
</div>
</div>
<button id="qty-update" class="btn btn-info" data-id="<%= @order_item[0].order_items_id %>">Update</button>
<br><br>
<button id="qty-update" class="btn btn-info float-right" data-id="<%= @order_item[0].order_items_id %>">Update</button>
</div>
</div>
</div>
<div class="col-md-5">
<div class="m-t- p-l-20">
<div class="row">
<div class="col-lg-11 col-md-11 col-sm-11">
<div class="row bottom">
<div class="col-md-4 cashier_number border-left" data-value="1" data-type="num">1</div>
<div class="col-md-4 cashier_number border-left" data-value="2" data-type="num">2</div>
<div class="col-md-4 cashier_number border-left" data-value="3" data-type="num">3</div>
</div>
<div class="row bottom">
<div class="col-md-4 cashier_number border-left" data-value="4" data-type="num">4</div>
<div class="col-md-4 cashier_number border-left" data-value="5" data-type="num">5</div>
<div class="col-md-4 cashier_number border-left" data-value="6" data-type="num">6</div>
</div>
<div class="row bottom">
<div class="col-md-4 cashier_number border-left" data-value="7" data-type="num">7</div>
<div class="col-md-4 cashier_number border-left" data-value="8" data-type="num">8</div>
<div class="col-md-4 cashier_number border-left" data-value="9" data-type="num">9</div>
</div>
<div class="row bottom">
<div class="col-md-4 cashier_number border-left" data-value="0" data-type="num">0</div>
<div class="col-md-4 cashier_number red border-left" data-type="del">Del</div>
<div class="col-md-4 cashier_number orange border-left" data-type="clr">Clr</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-1">
<button type="button" class="btn btn-block btn-default waves-effect" id='back'>
<i class="material-icons m-t--10">reply</i>
Back
</button>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
// Qty update for OQS Edit Controller
original_value = $('#qty').val();
$('#qty-update').on('click', function(){
var qty_weight = $("input[name='qty_weight']").val();
var remarks = $("textarea[name='remarks']").val();
@@ -77,6 +115,35 @@ $(document).ready(function(){
}
});
});
$('#back').on('click', function () {
window.location.href = '/oqs/';
})
// number key pad
$(document).on('click', '.cashier_number', function(event){
qty = $('#qty').val();
var input_value = $(this).attr("data-value");
var input_type = $(this).attr("data-type");
switch (input_type) {
case 'num':
if (original_value == qty){
$('#qty').val(input_value);
}else{
$('#qty').val(qty+input_value);
}
break;
break;
case 'clr':
$('#qty').val(original_value);
break;
case 'del' :
$('#qty').val(original_value);
break;
}
});
});
</script>

View File

@@ -1,14 +1,14 @@
<div class="page-header">
<!-- <div class="page-header">
<ul class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t :OQS %></li>
<!-- <li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li> -->
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>
</span>
</ul>
</div>
</div> -->
<!-- Column One -->
<div class="row clearfix">
@@ -83,32 +83,33 @@
%>
<div class="card queue_station">
<div class="card-block">
<!-- <h5 class="card-"> -->
<span class="order-zone-type font-14"><%= qid.type %> - </span>
<span class="order-zone font-14"><%= qid.zone %></span>
<small class="pull-right font-14"><%= qid.order_id %></small>
<!-- </h5> -->
<!-- <h5> -->
<div class="row">
<span class="col-md-4 order-zone-type font-13"><%= qid.type %>-<%= qid.zone %></span>
<span class="order-zone hidden font-13"><%= qid.zone %></span>
<span class="col-md-8"><small class="float-right font-13"><%= qid.order_id %></small></span>
</div>
<p class="m-b--10">
<span class="order-item font-16">
<%= qid.item_name %>
</span> [x
<span class="order-qty">
<%= qid.qty %>
</span> ]
<!-- </h5> -->
</p>
<p class="card-text item-options"><%= qid.options == "[]"? "" : qid.options %></p>
<p class="card-text">
<span class="text-muted">Order at
<span class="order-at">
<span class="card-text">
<span class="text-muted">Order at -
<span class="order-at font-13">
<%= qid.created_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %>
</span> -
<span class="order-by">
<%= qid.item_order_by %>
</span> <br>
Order By - <span class="order-by font-13">
<%= qid.item_order_by %>
</span>
</span>
</p>
</span>
<p class="hidden order-status">completed</p>
<p class="hidden order-customer"><%= qid.customer_name %></p>
<p class="hidden assigned-order-item"><%= qid.assigned_order_item_id %></p>
@@ -133,27 +134,27 @@
<div class="col-lg-3 col-md-3 col-sm-3">
<div class="card" >
<div class="card-header">
<div><strong id="order-title">ORDER DETAILS - Table</strong></div>
<div><strong id="order-title">ORDER DETAILS</strong></div>
</div>
<div class="card-block">
<div class="card-title">
<table class="table">
<table class="">
<thead>
<tr>
<th style="width:; text-align:left">Order By</th>
<th style="width:; text-align:right">Order At</td>
<th style="width:; text-align:right">Customer</td>
</tr>
</thead>
<tbody>
<tr>
<td id="order-by" style="width:33%; text-align:left"></td>
<td id="order-at" style="width:33%; text-align:right"></td>
<td id="order-customer" style="width:33%; text-align:right"></td>
<th style="width:33%; text-align:">Order By</th>
<th style="width:33%; text-align:">Order At</th>
<!-- <th style="width:33%; text-align:">Customer</th> -->
</tr>
</thead>
<tbody>
<tr>
<td id="order-by" style="width:33%; text-align:"></td>
<td id="order-at" style="width:33%; text-align:"></td>
<!-- <td id="order-customer" style="width:33%; text-align:"></td> -->
</tr>
<tr>
<td><strong>Table/Room</strong></td>
<td id="order-from" colspan="2"></td>
<td><strong class="hidden cus_name">Customer</strong></td>
<td id="order-customer" colspan="2"></td>
</tr>
</tbody>
</table>

View File

@@ -62,7 +62,7 @@
<td class="item-attr"><strong id="sub_total">0.00</strong></td>
</tr>
</table>
<button type="button" class="btn btn-success create" id="create_order" disabled="disabled">Create Order</button>
<button type="button" class="btn btn-success btn-block create" id="create_order" disabled="disabled">Create Order</button>
</div>
</div>
</div>

View File

@@ -1,14 +1,15 @@
<div class="container-fluid">
<div class="page-header">
<!-- <div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%=origami_root_path %>"><%= t :home %></a></li>
<!-- <li class="breadcrumb-item"><a href="/origami/sale/<%=@sale_id %>/payment"><%= t("views.btn.payment") %></a></li> -->
<li class="breadcrumb-item"><a href="/origami/sale/<%=@sale_id %>/payment"><%= t("views.btn.payment") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.details.credit") %></li>
<span class="float-right">
<%= link_to t('.back',:default => t("views.btn.back")),'/origami/sale/'+@sale_id +'/payment'%>
</span>
</ol>
</div>
</div> -->
<h5>Credit Payment</h5>
<div class="row">
<div class="col-lg-5 col-md-5 col-sm-3">
<div class="card m-t-10 p-l-20" style="padding-top:20px;">
@@ -64,7 +65,7 @@
</div>
<div class="col-lg-6 col-md-6 col-sm-6" style="margin-top:;">
<div class=" m-t-10 p-l-20">
<div class="row clearfix">
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="row bottom">
@@ -107,12 +108,12 @@
</div>
</div>
</div>
</div>
<!--
<div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn bg-default m-l-10 btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment';"> Back </button>
</div> -->
</div>
<div class="col-lg-1 col-md-1 col-sm-1 m-t-10">
<button type="button" class="btn bg-default m- btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment';"> <i class="material-icons m-t--5">reply</i>Back </button>
</div>
</div>
</div>
<script>

View File

@@ -1,15 +1,14 @@
<div class="container-fluid">
<div class="page-header">
<!-- <div class="page-header">
<ul class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item active">CRM</li>
<!-- <li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li> -->
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<span class="float-right">
<a href="#" id="back">Back</a>
<!-- <%= link_to 'Back', dashboard_path %> -->
</span>
</ul>
</div>
</div> -->
<div class="row">
@@ -101,7 +100,7 @@
</div>
<!-- <div class="col-lg-4 col-md-4 col-sm-4" style="min-height:600px; max-height:600px; overflow-x:scroll"> -->
<div class="col-lg-4 col-md-4 col-sm-4" >
<div class="col-lg-3 col-md-3 col-sm-3" >
<div id="custom-slimscroll">
<%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %>
@@ -113,14 +112,14 @@
<%= f.hidden_field :id, :class => "form-control col-md-6 " %>
<div class="form-group">
<label>Salutation :</label><br>
<label>Mr</label>
<%= f.radio_button :salutation,"Mr", :class => "salutation mr", :value=>"Mr", :style=>"width: 30px"%>
<label>Miss</label>
<%= f.radio_button :salutation,"Mrs", :class => "salutation mrs", :value=>"Mrs", :style=>"width: 30px"%>
<label>Mrs</label>
<%= f.radio_button :salutation,"Miss", :class => "salutation miss", :value=>"Miss", :style=>"width: 30px"%>
<label>Mdm</label>
<%= f.radio_button :salutation,"Mdm", :class => "salutation mdm", :value=>"Mdm", :style=>"width: 30px"%>
<label class="font-13">Mr</label>
<%= f.radio_button :salutation,"Mr", :class => "salutation mr", :value=>"Mr"%>
<label class="m-l--20">Miss</label>
<%= f.radio_button :salutation,"Mrs", :class => "salutation mrs", :value=>"Mrs"%>
<label class="m-l--20">Mrs</label>
<%= f.radio_button :salutation,"Miss", :class => "salutation miss", :value=>"Miss"%>
<label class="m-l--20">Mdm</label>
<%= f.radio_button :salutation,"Mdm", :class => "salutation mdm", :value=>"Mdm"%>
</div>
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
@@ -238,7 +237,10 @@
</div>
<%end%>
</div>
<!-- Column Three -->
<div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn btn-default btn-block" id='back'><i class="material-icons">reply</i>Back</button>
</div>
</div>
<div id="sxModal">

View File

@@ -13,6 +13,8 @@
<div class="card-block">
<div class="card-title row">
<div class="col-lg-6 col-md-6 col-sm-6">
<span class="hidden" id ="table_id" value="<%=@table.id%>"><%=@table.id%></span>
<span class="hidden" id="table_type" value="<%=@table.type%>"><%=@table.type%></span>
<p id="sale-id" class="hidden"><%=@sale_data.sale_id %></p>
<p class="m-l-10">Receipt No: <span id="receipt_no"><%=@sale_data.receipt_no rescue ' '%></span></p>
<!-- <p>Cashier: <span id="cashier"><%=@sale_data.cashier_name rescue ' '%></span></p> -->
@@ -209,7 +211,7 @@
<div class="col-lg-1 col-md-1 col-sm-1">
<!-- Action Panel -->
<div>
<button type="button" class="btn bg-default btn-block" onclick="window.location.href = '/origami';"><i class="material-icons">reply</i> Back </button>
<button type="button" class="btn bg-default btn-block" id="back" ><i class="material-icons">reply</i> Back </button>
<button id="remove-item-discount" class="btn btn-primary btn- action-btn">Remove Item Discount</button>
<button id="remove-all" class="btn bg-primary btn-block action-btn">Remove All</button>
<button id="pay-discount" class="btn bg-primary btn-block action-btn">Enter</button>
@@ -225,6 +227,19 @@
<script type="text/javascript">
$(document).ready(function(){
$('#back').on('click',function(){
var id = $("#table_id").text();
var type = $("#table_type").text();
console.log(id);
console.log(type);
if (type=="Table") {
window.location.href = '/origami/table/'+id
}else{
window.location.href = '/origami/room/'+id
}
})
$(".cashier_number").on('click', function(event){
if(event.handled !== true) {
var original_value=0;

View File

@@ -42,16 +42,14 @@
<% if table.status == 'occupied' %>
<% if table.get_booking.nil? %>
<div class="card tables red text-white" data-id="<%= table.id %>">
<div class="card-block">
<%= table.get_booking %>
<div class="card-block">
Zone <%= table.zone_id %> <br>
Table <%= table.name %> ( <%= table.seater %> Seat )
</div>
</div>
<% else %>
<div class="card tables blue text-white" data-id="<%= table.id %>">
<div class="card-block">
<%= table.get_booking %>
<div class="card-block">
Zone <%= table.zone_id %> <br>
Table <%= table.name %> ( <%= table.seater %> Seat )
</div>
@@ -109,17 +107,16 @@
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<!-- <button id="refreshbutton" type="button" class="btn btn-block radius-btn"> Refresh off </button> -->
<%if current_login_employee.role == "administrator" || current_login_employee.role == "manager" %>
<button id="back" type="button" class="btn btn-block btn-lg bg-default"> <i class="material-icons">reply</i> <%= t("views.btn.back") %>
</button>
<%end%>
<button id="cash_in" type="button" class="btn btn-block btn-lg bg-blue waves-effect"> <%= t("views.btn.cash_in") %> </button>
<button id="cash_out" type="button" class="btn btn-block btn-lg bg-blue waves-effect"> <%= t("views.btn.cash_out") %> </button>
<!-- Temporary Disabled -->
<button id="close_cashier" type="button" class="btn btn-block btn-lg bg-blue waves-effect"> <%= t("views.btn.close_cashier") %></button>
<%if current_login_employee.role == "administrator" || current_login_employee.role == "manager" %>
<button id="back" type="button" class="btn btn-block btn-lg bg-default"><i class="fa fa-home fa-lg"></i> <%= t("views.btn.back") %>
</button>
<%end%>
</div>
</div>
</div>

View File

@@ -120,9 +120,13 @@
<div class="card-header">
<% if @status_order == 'order' && @status_sale != 'sale' %>
<div id="save_order_id" data-order="<%= @obj_order.order_id %>">
<strong id="order-title">ORDER DETAILS </strong> | Table <%= @dining.name rescue "" %></div>
<strong id="order-title">ORDER DETAILS </strong> | Table <%= @dining.name rescue "" %>
<span class="float-right">Checkin Time : <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %></span>
</div>
<% elsif @status_sale == 'sale' %>
<div><strong id="order-title">INVOICE DETAILS </strong> | Table <%= @dining.name rescue "" %></div>
<div><strong id="order-title">INVOICE DETAILS </strong> | Table <%= @dining.name rescue "" %>
<span class="float-right">Checkin Time : <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %></span>
</div>
<% end %>
</div>
<div class="card-block">
@@ -154,7 +158,7 @@
</div>
</div>
</div>
<div id="order-detail-slimscroll" data-height="160">
<div id="order-detail-slimscroll" data-height="<%= @status_sale=="sale" ? 200 : 160%>">
<div class="card-text order-info" >
<table class="table table-striped" id="order-items-table">
<thead>
@@ -236,9 +240,17 @@
<td class="item-attr"><strong id="order-discount">(<%= @obj_sale.total_discount rescue 0 %>)</strong></td>
</tr>
<% if @status_sale == "sale" %>
<% if @status_sale == "sale" && @status_order == 'order' %>
<tr>
<td class="charges-name"><strong>Tax:</strong></td>
<td class="charges-name"><strong>Tax:
(<% @i = 0
@account_arr.each do |ct| %>
<%=ct.name%>
<% if @account_arr.count != @i+1%>
+ <% @i =+1 %>
<%end%>
<%end %>)
</strong></td>
<td class="item-attr"><strong id="order-Tax"><%= @obj_sale.total_tax rescue 0 %></strong></td>
</tr>
<tr>
@@ -322,15 +334,15 @@
<button type="button" id="survey" class="btn btn-block bg-blue waves-effect">Survey</button>
<% if @dining.status != "available" %>
<% if @status_order == 'order' %>
<button type="button" id="customer" class="btn btn-block bg-blue waves-effect" disabled>Customer</button>
<button type="button" class="btn btn-block bg-blue waves-effect" disabled>Edit</button>
<button type="button" id="discount" class="btn btn-block bg-blue waves-effect" disabled>Discount</button>
<button type="button" id="other-charges" class="btn btn-block bg-blue waves-effect" disabled>Charges</button>
<!-- <button type="button" id="customer" class="btn btn-block bg-blue waves-effect" disabled>Customer</button> -->
<!-- <button type="button" class="btn btn-block bg-blue waves-effect" disabled>Edit</button> -->
<!-- <button type="button" id="discount" class="btn btn-block bg-blue waves-effect" disabled>Discount</button> -->
<!-- <button type="button" id="other-charges" class="btn btn-block bg-blue waves-effect" disabled>Charges</button> -->
<button type="button" class="btn btn-block bg-blue waves-effect" id='move'>Move</button>
<button type="button" id="request_bills" class="btn btn-block bg-blue waves-effect">Req.Bill</button>
<button type="button" id="first_bill" class="btn btn-block bg-blue waves-effect" disabled>First Bill</button>
<button type="button" id="pay" class="btn btn-block bg-blue waves-effect" disabled>Pay</button>
<button type="button" class="btn btn-block bg-blue waves-effect" disabled> Void</button>
<!-- <button type="button" id="first_bill" class="btn btn-block bg-blue waves-effect" disabled>First Bill</button> -->
<!-- <button type="button" id="pay" class="btn btn-block bg-blue waves-effect" disabled>Pay</button> -->
<!-- <button type="button" class="btn btn-block bg-blue waves-effect" disabled> Void</button> -->
<% end %>
<% if @status_sale == 'sale' %>
<button type="button" id="customer" class="btn btn-block bg-blue waves-effect">Customer</button>
@@ -339,8 +351,8 @@
<button type="button" id="other-charges" class="btn btn-block bg-blue waves-effect">Charges</button>
<button type="button" id="commissions" class="btn btn-block bg-blue waves-effect">Commissions</button>
<button type="button" id="in_duties" class="btn btn-block bg-blue waves-effect">In Duties</button>
<button type="button" class="btn btn-block bg-blue waves-effect" id='move' disabled="">Move</button>
<button type="button" id="request_bills" class="btn btn-block bg-blue waves-effect" disabled> Req.Bill</button>
<!-- <button type="button" class="btn btn-block bg-blue waves-effect" id='move' disabled="">Move</button> -->
<!-- <button type="button" id="request_bills" class="btn btn-block bg-blue waves-effect" disabled> Req.Bill</button> -->
<button type="button" id="first_bill" class="btn btn-block bg-blue waves-effect">First Bill</button>
<button type="button" id="pay" class="btn btn-block bg-blue waves-effect">Pay</button>
<button type="button" id="void" class="btn btn-block bg-blue waves-effect"> Void</button>

View File

@@ -16,7 +16,7 @@
<%= f.button :submit, "Update", :class => 'btn btn-primary ', :disabled => '', :id => 'update' %>
<%= f.button :button, "Reset", :class => 'btn btn-danger ', :id => 'reset' %>
<button type="button" class="btn btn-inverse pull-right" id='back'><i class="fa fa-arrow-left"></i> Back</button>
<button type="button" class="btn btn-inverse pull-right" id='back'> <button type="button" class="btn bg-default btn-block" onclick="window.location.href = "origami_index_in_duty_path(@table.id)"><i class="material-icons">reply</i> Back </button>Back</button>
</div>
<% end %>

View File

@@ -49,14 +49,14 @@
<%= paginate @duties_in %>
</div>
</div>
<div class="col-md-3 partial">
<%= render 'form', in_duty: @in_duty, table: @table %>
</div>
<div class="col-md-1">
<br>
<button type="button" class="form-control btn btn-default btn-block" id='back'>Back</button>
<button type="button" class="btn bg-default btn-block" onclick="window.location.href = '/origami/<%=@table.type.downcase%>/<%=@table.id%>'"><i class="material-icons m-t--5">reply</i> Back </button>
<button class="form-control btn btn-info btn-block" id="reset">New</button>
</div>
</div>
@@ -103,9 +103,9 @@
});
});
$('#back').on('click', function () {
window.location.href = '/origami/table/' + "<%= @table.id %>";
});
// $('#back').on('click', function () {
// window.location.href = '/origami/table/' + "<%= @table.id %>";
// });
$('#reset').click(function () {
location.reload();
/*var url = "<%= origami_index_in_duty_path %>";

View File

@@ -1,5 +1,5 @@
<div class="container-fluid">
<div class="page-header">
<!-- <div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%=origami_root_path %>"><%= t :home %></a></li>
<li class="breadcrumb-item"><a href="/origami/sale/<%=@sale_id %>/payment"><%= t("views.btn.payment") %></a></li>
@@ -8,7 +8,8 @@
<%= link_to t('.back',:default => t("views.btn.back")),'/origami/sale/'+@sale_id+'/payment/others_payment'%>
</span>
</ol>
</div>
</div> -->
<h5>JCB Payment</h5>
<div class="row">
<div class="col-lg-5 col-md-5 col-sm-3">
<span class="hidden" id="membership_id"><%= @membership_id%></span>
@@ -97,9 +98,9 @@
</div>
</div>
<!-- <div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn btn-default m-l-10 btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment/others_payment';"> Back </button>
</div> -->
<div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn btn-default btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment/others_payment';"> <i class="material-icons m-t--5">reply</i>Back </button>
</div>
</div>
</div>
<script>

View File

@@ -1,5 +1,5 @@
<div class="container-fluid">
<div class="page-header">
<!-- <div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%=origami_root_path %>"><%= t :home %></a></li>
<li class="breadcrumb-item"><a href="/origami/sale/<%=@sale_id %>/payment"><%= t("views.btn.payment") %></a></li>
@@ -8,7 +8,8 @@
<%= link_to t('.back',:default => t("views.btn.back")),'/origami/sale/'+@sale_id+'/payment/others_payment'%>
</span>
</ol>
</div>
</div> -->
<h5>Master Payment</h5>
<div class="row">
<div class="col-lg-5 col-md-5 col-sm-3">
<span class="hidden" id="membership_id"><%= @membership_id%></span>
@@ -97,9 +98,9 @@
</div>
</div>
<!-- <div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn btn-default m-l-3 btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment/others_payment';"> Back </button>
</div> -->
<div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn btn-default m-t-10 btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment/others_payment';"><i class="material-icons m-t--5">reply</i> Back </button>
</div>
</div>
</div>
<script>

View File

@@ -1,5 +1,5 @@
<div class="container-fluid">
<div class="page-header">
<!-- <div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%=origami_root_path %>"><%= t :home %></a></li>
<li class="breadcrumb-item"><a href="/origami/sale/<%=@sale_id %>/payment"><%= t("views.btn.payment") %></a></li>
@@ -8,7 +8,8 @@
<%= link_to t('.back',:default => t("views.btn.back")),'/origami/sale/'+@sale_id+'/payment/others_payment'%>
</span>
</ol>
</div>
</div> -->
<h5>MPU Payment</h5>
<div class="row">
<div class="col-lg-5 col-md-5 col-sm-5">
<span class="hidden" id="membership_id"><%= @membership_id%></span>
@@ -99,7 +100,10 @@
</div>
</div>
<div class="col-md-1 col-lg-1 col-sm-1">
<button type="button" class="btn bg-default btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment/others_payment';"><i class="material-icons m-t--5">reply</i> Back </button>
</div>
</div>
</div>
<script>

View File

@@ -142,7 +142,7 @@
</div>
</div>
<div id="order-detail-slimscroll" data-height="160">
<div id="order-detail-slimscroll" data-height="<%= @status_sale=="sale" ? 200 : 160%>">
<div class="card-text" style="">
<table class="table table-striped" id="order-items-table">
<thead>
@@ -172,8 +172,8 @@
</table>
</div>
</div>
<div class="card-footer">
<table class="table" id="order-charges-table" border="0">
<div class="card-footer ">
<table class="m-b--20" 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>
@@ -193,7 +193,7 @@
<!-- Column Three -->
<div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn bg-default btn-block" id='back'>Back</button>
<button type="button" class="btn bg-default btn-block " id='back'><i class="material-icons">reply</i>Back</button>
<% if @sale_status != 'completed' %>
<button type="button" class="btn bg-blue btn-block" id='move'>MOVE</button>
<% end %>

View File

@@ -192,7 +192,7 @@
<div class="col-lg-1 col-md-1 col-sm-1">
<!-- Action Panel -->
<div>
<button type="button" class="btn bg-default btn-block" onclick="window.location.href = '/origami';"><i class="material-icons">reply</i> Back </button>
<button type="button" class="btn bg-default btn-block" onclick="window.location.href = '/origami/<%=@table.type.downcase%>/<%=@table.id%>'"><i class="material-icons">reply</i> Back </button>
<button id="charge_other" class="btn bg-success btn-block action-btn">Enter</button>
</div>
</div>

View File

@@ -1,5 +1,5 @@
<div class="container-fluid">
<div class="page-header">
<!-- <div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%=origami_root_path %>"><%= t :home %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.other_payment") %></li>
@@ -8,8 +8,8 @@
<%= link_to t('.back',:default => t("views.btn.back")),'/origami/sale/'+@sale_id+'/payment'%>
</span>
</ol>
</div>
</div> -->
<div class="row">
<div class="col-lg-11col-md-11 col-sm-11">
<div >
@@ -20,6 +20,9 @@
</div>
</div>
</div>
<div class="col-lg-1 col-md-1 col-sm-1 m-t-10">
<button type="button" class="btn bg-default m- btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment';"> <i class="material-icons m-t--5">reply</i>Back </button>
</div>
</div>
</div>
<script type="text/javascript">

View File

@@ -10,7 +10,7 @@
<div id="order-title">
<div class="row p-l-5 p-r-5">
<div class="col-lg-6 col-md-6 col-sm-6"><strong>Receipt No :</strong> <span id="receipt_no"><%=@sale_data.receipt_no rescue ' '%></span></div>
<div class="col-lg-6 col-md-6 col-sm-6 text-left"><strong>Receipt Date :</strong> <span id="receipt_date"><%=@sale_data.receipt_date.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-' %></span></div>
<div class="col-lg-6 col-md-6 col-sm-6 text-left"><strong>Receipt Date :</strong> <span id="receipt_date"><%=@sale_data.receipt_date.utc.getlocal.strftime("%d/%m/%Y-%I:%M %p") rescue '-' %></span></div>
</div>
<div class="row p-l-5 p-r-5">
<div class="col-lg-6 col-md-6 col-sm-6"><strong>Table No :</strong> <%=@table_no%></div>
@@ -20,7 +20,7 @@
<div class="row p-l-5 p-r-5">
<div class="col-lg-6 col-md-6 col-sm-6"><strong>Customer :</strong> <%= @sale_data.customer.name%> <span class="hidden" id="membership_id"><%= @sale_data.customer.membership_id%></span>
<span class="hidden" id="member_discount"><%= @member_discount%></span></div>
<div class="col-lg-6 col-md-6 col-sm-6 text-left"><strong>Customer ID :</strong> <%= @sale_data.customer.customer_id%></div>
<div class="col-lg-6 col-md-6 col-sm-6 text-left"><strong>Checkin Time : </strong> <%= @checkin_time.utc.getlocal.strftime("%I:%M %p") %></div>
</div>
</div>
</div>
@@ -40,7 +40,7 @@
</table>
</div>
</div>
<div id="order-detail-slimscroll" data-height="280">
<div id="order-detail-slimscroll" data-height="300">
<!-- <div id="table-details" class="card-text" style="min-height:400px; max-height:400px; overflow-x:scroll"> -->
<div id="table-details" class="card-text m-t--10" >
<table class="table" id="append-table">
@@ -81,7 +81,15 @@
<td class="item-attr"><strong><span>(<%=@sale_data.total_discount rescue 0%>)</span></strong></td>
</tr>
<tr>
<td class="charges-name"><strong>Tax</strong></td>
<td class="charges-name"><strong>Tax
(<% @i = 0
@account_arr.each do |ct| %>
<%=ct.name%>
<% if @account_arr.count != @i+1%>
+ <% @i =+1 %>
<%end%>
<%end %>)
</strong></td>
<td class="item-attr"><strong><span><%=@sale_data.total_tax rescue 0%></span></strong></td>
</tr>
<tr>

View File

@@ -9,5 +9,8 @@
<% end %>
</div>
</div>
<div class="col-lg-1 col-md-1 col-sm-1 m-t-10">
<button type="button" class="btn bg-default m- btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment';"> Back </button>
</div>
<div>

View File

@@ -1,5 +1,5 @@
<div class="container-fluid">
<div class="page-header">
<!-- <div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%=origami_root_path %>"><%= t :home %></a></li>
<li class="breadcrumb-item"><a href="/origami/sale/<%=@sale_id %>/payment"><%= t("views.btn.payment") %></a></li>
@@ -8,7 +8,8 @@
<%= link_to t('.back',:default => t("views.btn.back")),'/origami/sale/'+@sale_id+'/payment/others_payment'%>
</span>
</ol>
</div>
</div> -->
<h5>Reedem Payment</h5>
<div class="row">
<div class="col-lg-5 col-md-5 col-sm-5">
<div class="card m-l-10 m-t-10" style="padding:0px 20px;">
@@ -100,9 +101,9 @@
</div>
<!-- <div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn bg-default btn-lg btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment/others_payment';"> Back </button>
</div> -->
<div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn bg-default m-t-10 btn-lg btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment/others_payment';"> <i class="material-icons m-t--5">reply</i>Back </button>
</div>
</div>
</div>
<script type="text/javascript">

View File

@@ -123,9 +123,15 @@
<div class="card" >
<div class="card-header">
<% if @status_order == 'order' %>
<div id="save_order_id" data-order="<%= @obj_order.order_id %>"><strong id="order-title">ORDER DETAILS </strong> | Table <%= @room.name rescue "" %></div>
<div id="save_order_id" data-order="<%= @obj_order.order_id %>"><strong id="order-title">ORDER DETAILS </strong> | Table <%= @room.name rescue "" %>
<span class="float-right">Checkin Time : <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %></span>
</div>
<% elsif @status_sale == 'sale' %>
<div><strong id="order-title">INVOICE DETAILS </strong> | Table <%= @room.name rescue "" %></div>
<div><strong id="order-title">INVOICE DETAILS </strong> | Table <%= @room.name rescue "" %>
<span class="float-right">Checkin Time : <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %></span>
</div>
<% end %>
</div>
@@ -140,22 +146,22 @@
</span>
</div>
<div class="col-lg-6 col-md-6 col-sm-6 text-right">
Date: <span id="receipt_date"><%= @obj_sale.created_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span>
Date: <span id="receipt_date"><%= @date.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span>
</div>
</div>
<div class="card-title row customer_detail p-l-5 p-r-5" >
<div class="col-lg-6 col-md-6 col-sm-6">
<% if @status_sale == 'sale' %>
<p class="hidden customer-id"><%= @obj_sale_sale.customer_id rescue '' %></p>
Customer : <%= @obj_sale_sale.customer.name rescue '-' %>
Customer : <%= @obj_sale.customer.name rescue '-' %>
<%else%>
<p class="hidden customer-id"><%= @customer.customer_id rescue "" %></p>
<p class="hidden customer-id"><%= @obj_order.customer_id rescue "-" %></p>
Customer : <%= @customer.name rescue "-" %>
<%end%>
</div>
</div>
<div id="order-detail-slimscroll" data-height="160">
<div id="order-detail-slimscroll" data-height="<%= @status_sale=="sale" ? 240 : 160%>">
<div class="card-text order-info">
<table class="table table-striped" id="order-items-table">
<thead>
@@ -306,29 +312,31 @@
<!-- Column Three -->
<div class="col-lg-1 col-md-1 col-sm-1">
<!-- Waiter Buttons -->
<button type="button" class="btn btn-default btn-block" id='back'><i class="fa fa-arrow-left"></i> Back</button>
<button type="button" class="btn btn-default btn-block" id='back'><i class="material-icons">reply</i> Back</button>
<button type="button" id="add_order" class="btn btn-block btn- bg-blue waves-effect">Add Order</button>
<button type="button" id="survey" class="btn btn-block bg-blue waves-effect">Survey</button>
<% if @room.bookings.length >= 1 %>
<% if @status_order == 'order' && @status_sale != 'sale' %>
<!-- <button type="button" class="btn bg-blue btn-block" >Add Order</button> -->
<button type="button" id="customer" class="btn bg-blue btn-block" disabled>Customer</button>
<button type="button" class="btn bg-blue btn-block" disabled >Edit</button>
<button type="button" id="discount" class="btn bg-blue btn-block" disabled >Discount</button>
<button type="button" id="other-charges" class="btn bg-blue btn-block" disabled>Charges</button>
<!-- <button type="button" id="customer" class="btn bg-blue btn-block" disabled>Customer</button> -->
<!-- <button type="button" class="btn bg-blue btn-block" disabled >Edit</button> -->
<!-- <button type="button" id="discount" class="btn bg-blue btn-block" disabled >Discount</button> -->
<!-- <button type="button" id="other-charges" class="btn bg-blue btn-block" disabled>Charges</button> -->
<button type="button" class="btn bg-blue btn-block" id='move'>Move</button>
<button type="button" id="request_bills" class="btn bg-blue btn-block">Req.Bill</button>
<button type="button" id="first_bill" class="btn bg-blue btn-block" disabled>First Bill</button>
<button type="button" id="pay" class="btn bg-blue btn-block" disabled>Pay</button>
<button type="button" class="btn bg-blue btn-block" disabled=""> Void </button>
<!-- <button type="button" id="first_bill" class="btn bg-blue btn-block" disabled>First Bill</button> -->
<!-- <button type="button" id="pay" class="btn bg-blue btn-block" disabled>Pay</button> -->
<!-- <button type="button" class="btn bg-blue btn-block" disabled=""> Void </button> -->
<% else %>
<!-- <button type="button" class="btn bg-blue btn-block" disabled>Add Order</button> -->
<button type="button" id="customer" class="btn bg-blue btn-block" >Customer</button>
<button type="button" class="btn bg-blue btn-block" id='edit'>Edit</button>
<button type="button" id="discount" class="btn bg-blue btn-block" >Discount</button>
<button type="button" id="other-charges" class="btn bg-blue btn-block" >Charges</button>
<button type="button" class="btn bg-blue btn-block" id='move' disabled="">Move</button>
<button type="button" id="request_bills" class="btn bg-blue btn-block" disabled> Req.Bill</button>
<button type="button" id="commissions" class="btn btn-block bg-blue waves-effect">Commissions</button>
<button type="button" id="in_duties" class="btn btn-block bg-blue waves-effect">In Duties</button>
<!-- <button type="button" class="btn bg-blue btn-block" id='move' disabled="">Move</button> -->
<!-- <button type="button" id="request_bills" class="btn bg-blue btn-block" disabled> Req.Bill</button> -->
<button type="button" id="first_bill" class="btn bg-blue btn-block">First Bill</button>
<button type="button" id="pay" class="btn bg-blue btn-block">Pay</button>
<button type="button" id="void" class="btn bg-blue btn-block" > Void </button>
@@ -412,19 +420,17 @@ $(document).ready(function(){
window.location.href = '/origami/order/' + order_id;
});
// bind survey to order or sale
$("#survey").on('click', function () {
var sale = $('#sale_id').val();
if (sale) {
var sale_id = sale
} else {
var sale_id = $('#save_order_id').attr('data-order');
}
var table_id = $('.tables').attr("data-id");
window.location.href = '/origami/' + sale_id + "/survey"
});
// bind survey to order or sale
$("#survey").on('click', function () {
var sale = $('#sale_id').val();
if (sale) {
var sale_id = sale
} else {
var sale_id = "<%= @room.id %>";
}
//var table_id = $('.tables').attr("data-id");
window.location.href = '/origami/' + sale_id + "/surveys"
});
// bind customer to order or sale
$("#customer").on('click', function(){
var sale = $('#sale_id').val();
@@ -659,6 +665,17 @@ $('#add_invoice').on('click',function(){
}
});
$('#commissions').on('click', function () {
var dining_id = "<%= @room.id %>"
var sale_id = "<%= @obj_sale.sale_id rescue "" %>"
window.location.href = '/origami/table/' + dining_id + "/sale/" + sale_id + "/load_commissioners";
});
$('#in_duties').on('click', function () {
var dining_id = "<%= @room.id %>"
window.location.href = '/origami/assign_in_duty/'+ dining_id;
});
// Ordering
$('#add_order').on('click', function () {
var dining_id = "<%= @room.id %>"

View File

@@ -197,7 +197,7 @@
<!-- Column Three -->
<div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn btn-default btn-block" id='back'>Back</button>
<button type="button" class="btn btn-default btn-block" id='back'><i class="material-icons">reply</i>Back</button>
<% if @sale.sale_status != 'void' %>
<button type="button" id="void" class="btn bg-danger btn-block">VOID</button>
<% end %>

View File

@@ -1,72 +1,91 @@
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<%= simple_form_for(@survey, :url => origami_create_surveys_path) do |f| %>
<%= f.error_notification %>
<div class="form-inputs p-l-10">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<%= simple_form_for(@survey, :url => origami_create_surveys_path) do |f| %>
<%= f.error_notification %>
<div class="form-inputs p-l-10">
<%= f.input :child%>
<%= f.input :adult %>
<%= f.input :male %>
<%= f.input :female %>
<%= f.input :local %>
<%= f.input :child%>
<%= f.input :adult %>
<%= f.input :male %>
<%= f.input :female %>
<%= f.input :local %>
<div class="row clearfix">
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
<div class="form-group">
<div class="row clearfix">
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
<div class="form-group">
<label>Foreigner</label>
<select class="form-control col-md-12 selectpicker show-tick" name="survey[foreigner][][]" style="height: " >
<select class="form-control col-md-12 selectpicker show-tick" name="survey[foreigner][][]" style="height: " >
<% Lookup.where("lookup_type = ?", "country" ).each do |ct| %>
<option value="<%= ct.value %>">
<option value="<%= ct.value %>">
<%= ct.name %></option>
<%end %>
</select>
<%end %>
</select>
</div>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
<div class="form-group">
<label>Number</label>
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
<div class="form-group">
<label>Number</label>
<input type="number" name="survey[foreigner][][]" class="form-control">
</div>
</div>
</div>
<%= f.input :total_customer %>
<input type="hidden" name="table_id" value="<%=@dining_facility.id%>">
<%= f.input :dining_name, :as => :hidden, :input_html => { :value => @dining_facility.name } %>
<%= f.input :created_by, :as => :hidden, :input_html => { :value => current_login_employee.name } %>
<%= f.input :receipt_no, :as => :hidden, :input_html => { :value => @receipt_no} %>
<%= f.input :total_amount, :as => :hidden, :input_html => { :value => @grand_total } %>
</div>
<%= f.input :total_customer %>
<input type="hidden" name="table_id" value="<%=@dining_facility.id%>">
<%= f.input :dining_name, :as => :hidden, :input_html => { :value => @dining_facility.name } %>
<%= f.input :created_by, :as => :hidden, :input_html => { :value => current_login_employee.name } %>
<%= f.input :receipt_no, :as => :hidden, :input_html => { :value => @receipt_no} %>
<%= f.input :total_amount, :as => :hidden, :input_html => { :value => @grand_total } %>
<div class="form-actions">
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
</div>
<% end %>
</div>
<div class="form-actions">
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
</div>
<% end %>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card">
<div class="body">
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="card">
<div class="body">
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
<p>
1) <%= t("views.right_panel.detail.title") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.title_txt") %> <br>
2) <%= t("views.right_panel.detail.account_type") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.account_type_txt") %> <br>
3) <%= t("views.right_panel.detail.discount") %> - <%= t("views.right_panel.detail.checkbox") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.discount_txt") %> <br>
4) <%= t("views.right_panel.detail.point") %> - <%= t("views.right_panel.detail.checkbox") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.point_txt") %> <br>
5) <%= t("views.right_panel.detail.bonus") %> - <%= t("views.right_panel.detail.checkbox") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.bonus_txt") %> <br>
6) <%= t("views.right_panel.detail.rebate") %> - <%= t("views.right_panel.detail.checkbox") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.rebate_txt") %> <br>
1) <%= t("views.right_panel.detail.title") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.title_txt") %> <br>
2) <%= t("views.right_panel.detail.account_type") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.account_type_txt") %> <br>
3) <%= t("views.right_panel.detail.discount") %> - <%= t("views.right_panel.detail.checkbox") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.discount_txt") %> <br>
4) <%= t("views.right_panel.detail.point") %> - <%= t("views.right_panel.detail.checkbox") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.point_txt") %> <br>
5) <%= t("views.right_panel.detail.bonus") %> - <%= t("views.right_panel.detail.checkbox") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.bonus_txt") %> <br>
6) <%= t("views.right_panel.detail.rebate") %> - <%= t("views.right_panel.detail.checkbox") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.rebate_txt") %> <br>
</p>
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
<p>
1) <%= t("views.right_panel.button.submit") %> - <%= t("views.right_panel.detail.submit_btn_txt") %> <%= t("views.right_panel.detail.account_txt") %> <br>
1) <%= t("views.right_panel.button.submit") %> - <%= t("views.right_panel.detail.submit_btn_txt") %> <%= t("views.right_panel.detail.account_txt") %> <br>
</p>
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
<p>
1) <%= t("views.right_panel.button.home") %> - <%= t("views.right_panel.detail.home_txt") %> <br>
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.account_txt") %> <br>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn btn-default btn-block" id='back'><i class="material-icons">reply</i>Back</button>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
$('#back').on('click',function(){
table_type = '<%=@table_type%>';
table_id = '<%=@dining_facility.id%>';
if(table_type == "Table"){
window.location.href = "/origami/table/" + table_id
}
else {
window.location.href = "/origami/room/" + table_id
}
})
});
</script>

View File

@@ -9,7 +9,7 @@
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<table class="table table-striped">
<thead>
@@ -70,5 +70,22 @@
</div>
</div>
</div>
<div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn btn-default btn-block" id='back'><i class="material-icons">reply</i>Back</button>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
$('#back').on('click',function(){
table_type = '<%=@table_type%>';
table = '<%=@dining_facility.id%>';
if(table_type == "Table"){
window.location.href = "/origami/table/" + table_id
}
else {
window.location.href = "/origami/room/" + table_id
}
})
});
</script>

View File

@@ -1,4 +1,4 @@
<div class="page-header">
<!-- <div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= '/origami/table/@dining_facility.id' %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.survey") %></li>
@@ -7,6 +7,6 @@
<%= link_to t('.back',:default => t("views.btn.back")),'/origami/table/'+@dining_facility.id.to_s %>
</span>
</ol>
</div>
</div> -->
<%= render 'form', survey: @survey %>

View File

@@ -1,5 +1,5 @@
<div class="container-fluid">
<div class="page-header">
<!-- <div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%=origami_root_path %>"><%= t :home %></a></li>
<li class="breadcrumb-item"><a href="/origami/sale/<%=@sale_id %>/payment"><%= t("views.btn.payment") %></a></li>
@@ -8,7 +8,8 @@
<%= link_to t('.back',:default => t("views.btn.back")),'/origami/sale/'+@sale_id+'/payment/others_payment'%>
</span>
</ol>
</div>
</div> -->
<h5>VISA Payment</h5>
<div class="row">
<div class="col-lg-5 col-md-5 col-sm-5">
<span class="hidden" id="membership_id"><%= @membership_id%></span>
@@ -97,9 +98,9 @@
</div>
</div>
<!-- <div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn bg-default m-l-10 btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment/others_payment';"> Back </button>
</div> -->
<div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn bg-default m-t-10 btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment/others_payment';"><i class="material-icons m-t--5">reply</i> Back </button>
</div>
</div>
</div>
<script>

View File

@@ -83,17 +83,21 @@
// OK button is clicked
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
$('#from').val(date.format("DD-MM-YYYY"))
$('#from').val(date)
search_by_date();
});
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
$('#to').val(date.format("DD-MM-YYYY"))
$('#to').val(date)
search_by_date();
});
function search_by_date(){
var from = $('#from').val();
var to = $('#to').val();
var to_date = new Date($('#to').val());
var to = to_date.getDate() + "-" + to_date.getMonth() + "-" + to_date.getFullYear();
var from_date = new Date($('#from').val());
var from = from_date.getDate() + "-" + from_date.getMonth() + "-" + from_date.getFullYear();
var period = 0;
var period_type = 1;

View File

@@ -141,20 +141,21 @@
// OK button is clicked
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
$('#from').val(date.format("DD-MM-YYYY"))
$('#from').val(date)
search_by_date();
});
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
$('#to').val(date.format("DD-MM-YYYY"))
$('#to').val(date)
search_by_date();
});
function search_by_date(){
var from = $('#from').val();
var to = $('#to').val();
console.log(from);
console.log(to);
var to_date = new Date($('#to').val());
var to = to_date.getDate() + "-" + to_date.getMonth() + "-" + to_date.getFullYear();
var from_date = new Date($('#from').val());
var from = from_date.getDate() + "-" + from_date.getMonth() + "-" + from_date.getFullYear();
var period = 0;
var period_type = 1;
if(to != '' && from != ''){

View File

@@ -147,17 +147,21 @@
// OK button is clicked
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
$('#from').val(date.format("DD-MM-YYYY"))
$('#from').val(date)
search_by_date();
});
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
$('#to').val(date.format("DD-MM-YYYY"))
$('#to').val(date)
search_by_date();
});
function search_by_date(){
var from = $('#from').val();
var to = $('#to').val();
var to_date = new Date($('#to').val());
var to = to_date.getDate() + "-" + to_date.getMonth() + "-" + to_date.getFullYear();
var from_date = new Date($('#from').val());
var from = from_date.getDate() + "-" + from_date.getMonth() + "-" + from_date.getFullYear();
var period = 0;
var period_type = 1;

View File

@@ -211,17 +211,19 @@
// OK button is clicked
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
$('#from').val(date.format("DD-MM-YYYY"))
$('#from').val(date)
search_by_date();
});
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
$('#to').val(date.format("DD-MM-YYYY"))
$('#to').val(date)
search_by_date();
});
function search_by_date(){
var from = $('#from').val();
var to = $('#to').val();
var to_date = new Date($('#to').val());
var to = to_date.getDate() + "-" + to_date.getMonth() + "-" + to_date.getFullYear();
var from_date = new Date($('#from').val());
var from = from_date.getDate() + "-" + from_date.getMonth() + "-" + from_date.getFullYear();
var period = 0;
var period_type = 1;

View File

@@ -145,17 +145,21 @@
// OK button is clicked
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
$('#from').val(date.format("DD-MM-YYYY"))
$('#from').val(date)
search_by_date();
});
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
$('#to').val(date.format("DD-MM-YYYY"))
$('#to').val(date)
search_by_date();
});
function search_by_date(){
var from = $('#from').val();
var to = $('#to').val();
var to_date = new Date($('#to').val());
var to = to_date.getDate() + "-" + to_date.getMonth() + "-" + to_date.getFullYear();
var from_date = new Date($('#from').val());
var from = from_date.getDate() + "-" + from_date.getMonth() + "-" + from_date.getFullYear();
var period = 0;
var period_type = 1;

View File

@@ -105,17 +105,19 @@
// OK button is clicked
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
$('#from').val(date.format("DD-MM-YYYY"))
$('#from').val(date)
search_by_date();
});
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
$('#to').val(date.format("DD-MM-YYYY"))
$('#to').val(date)
search_by_date();
});
function search_by_date(){
var from = $('#from').val();
var to = $('#to').val();
var to_date = new Date($('#to').val());
var to = to_date.getDate() + "-" + to_date.getMonth() + "-" + to_date.getFullYear();
var from_date = new Date($('#from').val());
var from = from_date.getDate() + "-" + from_date.getMonth() + "-" + from_date.getFullYear();
var period = 0;
var period_type = 1;

View File

@@ -0,0 +1,95 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t :booking %></li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="main-box-body clearfix p-l-5 p-r-5">
<div class="table-responsive">
<table class="table table-">
<tbody>
<tr>
<td colspan="8">
<%= form_tag transactions_orders_path, :method => :get do %>
<div class="row clearfix">
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
<label><%= t("views.right_panel.detail.enter_keyboards") %></label>
<input type="text" name="receipt_no" class="form-control" placeholder="" style="margin-right: 10px">
</div>
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
<label class=""><%= t("views.right_panel.detail.from") %></label>
<input class="form-control datepicker" name="from" id="from date" type="text" placeholder="From date">
</div>
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
<label class=""><%= t("views.right_panel.detail.to") %></label>
<input class="form-control datepicker" name="to" id="to date" type="text" placeholder="To date">
</div>
<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1">
<label></label>
<br><input type="submit" value="Search" class='btn btn-primary btn-md'>
</div>
</div>
<% end %>
</td>
</tr>
</tbody>
</table>
</div>
<div class="card">
<div class="table-responsive">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th><%= t("views.right_panel.detail.booking_id") %></th>
<th><%= t("views.right_panel.detail.sale_id") %></th>
<th><%= t("views.right_panel.detail.table") %></th>
<th><%= t("views.right_panel.detail.checkin_time") %></th>
<th><%= t("views.right_panel.detail.checkout_time") %></th>
<th><%= t("views.right_panel.detail.checkin_by") %></th>
<th> <%= t("views.right_panel.detail.checkout_by") %></th>
<th><%= t("views.right_panel.detail.booking_status") %></th>
<th><%= t("views.right_panel.detail.booking_date") %></th>
</tr>
</thead>
<tbody>
<% if @bookings != 0 %>
<% @bookings.each do |booking| %>
<tr>
<td><%= link_to booking.booking_id, transactions_booking_path(booking) %></td>
<td><%= link_to booking.sale_id, transactions_sale_path(booking.sale_id) rescue '-' %></td>
<td><%= booking.dining_facility.name %></td>
<td><%= booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %></td>
<td><%= booking.checkout_at.utc.getlocal.strftime("%I:%M %p") rescue '-' %></td>
<td><%= booking.checkin_by rescue '-' %></td>
<td><%= booking.checkout_by rescue '-' %></td>
<td> <%= booking.booking_status %> </td>
<td> <%= booking.created_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> </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>
<% if @bookings != 0 %>
<%= paginate @bookings %>
<% end %>
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1 @@
json.array! @transactions_sales, partial: 'transactions_sales/transactions_sale', as: :transactions_sale

View File

@@ -0,0 +1,59 @@
<p id="notice"><%= notice %></p>
<h1><%= t("views.right_panel.header.transactions_sales") %></h1>
<table>
<thead>
<tr>
<th><%= t :cashier %></th>
<th><%= t :cashier %> <%= t("views.right_panel.detail.name_txt2") %></th>
<th><%= t("views.right_panel.detail.requested_by") %></th>
<th><%= t("views.right_panel.detail.requested_at") %></th>
<th><%= t("views.right_panel.detail.receipt_no") %></th>
<th><%= t("views.right_panel.detail.receipt_date") %></th>
<th><%= t :customer %></th>
<th><%= t("views.right_panel.detail.payment_status") %></th>
<th><%= t("views.right_panel.detail.sale_status") %></th>
<th><%= t("views.right_panel.detail.total_amount") %></th>
<th><%= t("views.right_panel.detail.total_discount") %></th>
<th><%= t("views.right_panel.detail.total_tax") %></th>
<th><%= t("views.right_panel.detail.tax_type") %></th>
<th><%= t("views.right_panel.detail.grand_total") %></th>
<th><%= t("views.right_panel.detail.rnd_adj") %></th>
<th><%= t("views.right_panel.detail.amt_received") %></th>
<th><%= t("views.right_panel.detail.amt_changed") %></th>
<th colspan="3"></th>
</tr>
</thead>
<tbody>
<% @transactions_sales.each do |transactions_sale| %>
<tr>
<td><%= transactions_sale.cashier %></td>
<td><%= transactions_sale.cashier_name %></td>
<td><%= transactions_sale.requested_by %></td>
<td><%= transactions_sale.requested_at %></td>
<td><%= transactions_sale.receipt_no %></td>
<td><%= transactions_sale.receipt_date %></td>
<td><%= transactions_sale.customer %></td>
<td><%= transactions_sale.payment_status %></td>
<td><%= transactions_sale.sale_status %></td>
<td><%= transactions_sale.total_amount %></td>
<td><%= transactions_sale.total_discount %></td>
<td><%= transactions_sale.total_tax %></td>
<td><%= transactions_sale.tax_type %></td>
<td><%= transactions_sale.grand_total %></td>
<td><%= transactions_sale.rounding_adjustment %></td>
<td><%= transactions_sale.amount_received %></td>
<td><%= transactions_sale.amount_changed %></td>
<td><%= link_to t("views.btn.show"), transactions_sale %></td>
<td><%= link_to t("views.btn.edit"), edit_transactions_sale_path(transactions_sale) %></td>
<td><%= link_to t("views.btn.delete"), transactions_sale, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Transactions Sale', new_transactions_sale_path %>

View File

@@ -0,0 +1,140 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= transactions_bookings_path %>"><%= t :booking %></a></li>
<li class="breadcrumb-item active"><%= t :details %></li>
<span class="float-right">
<%= link_to 'Back', transactions_bookings_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#booking" role="tab"><%= t :booking_details %></a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#order" role="tab"><%= t :order_details %></a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#sale" role="tab"><%= t :sale_details %></a>
</li>
</ul>
<!-- Nav tabs - End -->
<div class="tab-content" style="min-height:670px; max-height:670px;">
<div class="tab-pane active" id="booking" role="tabpanel">
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th><%= t("views.right_panel.detail.booking_id") %></th>
<th><%= t("views.right_panel.detail.sale_id") %></th>
<th><%= t("views.right_panel.detail.table") %></th>
<th><%= t("views.right_panel.detail.checkin_time") %></th>
<th><%= t("views.right_panel.detail.checkout_time") %></th>
<th><%= t("views.right_panel.detail.checkin_by") %></th>
<th> <%= t("views.right_panel.detail.checkout_by") %></th>
<th><%= t("views.right_panel.detail.booking_status") %></th>
<th><%= t("views.right_panel.detail.booking_date") %></th>
</tr>
</thead>
<tbody>
<tr>
<td><%= @booking.booking_id%></td>
<td><%= link_to @booking.sale_id, transactions_sale_path(booking.sale_id) rescue '-' %></td>
<td><%= @booking.dining_facility.name %></td>
<td><%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %></td>
<td><%= @booking.checkout_at.utc.getlocal.strftime("%I:%M %p") rescue '-' %></td>
<td><%= @booking.checkin_by rescue '-' %></td>
<td><%= @booking.checkout_by rescue '-' %></td>
<td><%= @booking.booking_status %> </td>
<td><%= @booking.created_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> </td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="order" role="tabpanel">
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th><%= t("views.right_panel.detail.order_id") %></th>
<th><%= t("views.right_panel.header.menu_item") %></th>
<th><%= t("views.right_panel.detail.qty") %></th>
<th><%= t("views.right_panel.detail.unit_price") %></th>
<th><%= t("views.right_panel.detail.option") %></th>
<th><%= t("views.right_panel.detail.status") %></th>
<th><%= t("views.right_panel.detail.waiter") %></th>
<th><%= t("views.right_panel.detail.created_at") %></th>
</tr>
</thead>
<tbody>
<% @order_items.each do |order_item| %>
<tr>
<td><%= link_to order_item.order_id, transactions_order_path(order_item.order_id) %><%= %></td>
<td><%= order_item.item_name %></td>
<td><%= order_item.qty %></td>
<td><%= order_item.price %></td>
<td><%= order_item.options %></td>
<td><%= order_item.order_item_status %></td>
<td><%= order_item.item_order_by %> </td>
<td><%= order_item.created_at.strftime("%d-%m-%y %I:%M %p") %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="sale" role="tabpanel">
<div class="table-responsive">
<table class="table table- table-striped table-hover js-basic- ">
<thead>
<tr>
<th><%= t("views.right_panel.detail.sale_id") %></th>
<th><%= t("views.right_panel.detail.receipt_no") %></th>
<th><%= t("views.right_panel.detail.total_discount") %></th>
<th><%= t("views.right_panel.detail.tax_amount") %></th>
<th><%= t("views.right_panel.detail.sub_total") %></th>
<th><%= t("views.right_panel.detail.grand_total") %></th>
<th><%= t :cashier %></th>
<th><%= t("views.right_panel.detail.sales_status") %></th>
<th><%= t("views.right_panel.detail.receipt_date") %></th>
</tr>
</thead>
<tbody>
<% if @sale %>
<tr>
<td><%= link_to @sale.sale_id, transactions_sale_path(@sale) %></td>
<td><%= @sale.receipt_no %></td>
<td><%= @sale.total_discount %></td>
<td><%= @sale.total_tax %></td>
<td><%= @sale.total_amount %></td>
<td><%= @sale.grand_total rescue '-' %></td>
<td><%= @sale.cashier_name rescue '-' %></td>
<td> <%= @sale.sale_status %> </td>
<td> <%= @sale.receipt_date.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> </td>
</tr>
<% else %>
<tr><td colspan="9"><strong><p style="text-align: center">There is no data ....</p></strong></td></tr>
<% end %>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1 @@
json.partial! "transactions_sales/transactions_sale", transactions_sale: @transactions_sale

View File

@@ -91,7 +91,7 @@
</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>
<td> <%= sale.receipt_date.strftime("%d-%m-%Y %I:%M %p") %> </td>
</tr>
<% end %>
<% else %>
@@ -100,7 +100,9 @@
</tbody>
</table>
<br>
<% if @sales != 0 %>
<%= paginate @sales %>
<% end %>
</div>
</div>
</div>

View File

@@ -64,7 +64,7 @@
<td><%= order.order_type %></td>
<td><%= order.customer.name rescue '-' %></td>
<td><%= order.status %></td>
<td> <%= order.date.strftime("%d-%m-%Y") %> </td>
<td> <%= order.date.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> </td>
<td> <%= order.item_count %> </td>
</tr>
@@ -73,7 +73,7 @@
</table>
<br>
<%if !@order.nil?%>
<%if !@orders.nil?%>
<%= paginate @orders %>
<%end%>
</div>

View File

@@ -11,7 +11,7 @@
<hr>
<div class="row">
<div class="col-lg-11 col-md-11 col-sm-11">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="main-box-body clearfix p-l-5 p-r-5">
<div class="table-responsive">
<table class="table table-striped">
@@ -30,12 +30,12 @@
<td><%= @order.order_type %></td>
<td><%= @order.customer.name rescue '-' %></td>
<td><%= @order.status %></td>
<td> <%= @order.date.strftime("%d-%m-%Y") %> </td>
<td> <%= @order.waiter rescue '-' %> </td>
<td> <%= @order.date.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> </td>
<td> <%= @order.waiters rescue '-' %> </td>
</tr>
</tbody>
</table>
<h3><%= t("views.right_panel.detail.order_items") %></h3>
<h5><%= t("views.right_panel.detail.order_items") %></h5>
<table class="table table-striped">
<thead>
<tr>
@@ -45,7 +45,7 @@
<th><%= t("views.right_panel.detail.total_price") %></th>
<!-- <th>Option</th> -->
<th><%= t("views.right_panel.detail.status") %></th>
<th><%= t("views.right_panel.detail.order_by") %></th>
<!-- <th><%= t("views.right_panel.detail.order_by") %></th> -->
<th><%= t("views.right_panel.detail.created_at") %></th>
</tr>
@@ -61,7 +61,7 @@
<td><%= order.qty * order.price %></td>
<!-- <td> <%= order.options %> </td> -->
<td> <%= order.order_item_status %> </td>
<td> <%= order.item_order_by %> </td>
<!-- <td> <%= order.item_order_by %> </td> -->
<td> <%= order.created_at.strftime("%d-%m-%Y") %> </td>
</tr>
<% end %>

View File

@@ -1,27 +0,0 @@
<%= simple_form_for(@transactions_sale) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
<%= f.association :cashier %>
<%= f.input :cashier_name %>
<%= f.input :requested_by %>
<%= f.input :requested_at %>
<%= f.input :receipt_no %>
<%= f.input :receipt_date %>
<%= f.association :customer %>
<%= f.input :payment_status %>
<%= f.input :sale_status %>
<%= f.input :total_amount %>
<%= f.input :total_discount %>
<%= f.input :total_tax %>
<%= f.input :tax_type %>
<%= f.input :grand_total %>
<%= f.input :rounding_adjustment %>
<%= f.input :amount_received %>
<%= f.input :amount_changed %>
</div>
<div class="form-actions">
<%= f.button :submit %>
</div>
<% end %>

View File

@@ -1,2 +0,0 @@
json.extract! transactions_sale, :id, :cashier_id, :cashier_name, :requested_by, :requested_at, :receipt_no, :receipt_date, :customer_id, :payment_status, :sale_status, :total_amount, :total_discount, :total_tax, :tax_type, :grand_total, :rounding_adjustment, :amount_received, :amount_changed, :created_at, :updated_at
json.url transactions_sale_url(transactions_sale, format: :json)

View File

@@ -1,6 +0,0 @@
<h1>Editing Transactions Sale</h1>
<%= render 'form', transactions_sale: @transactions_sale %>
<%= link_to t("views.btn.show"), @transactions_sale %> |
<%= link_to 'Back', transactions_sales_path %>

View File

@@ -53,8 +53,10 @@
<tr>
<th><%= t("views.right_panel.detail.sale_id") %></th>
<th><%= t("views.right_panel.detail.receipt_no") %></th>
<th><%= t("views.right_panel.detail.grand_total") %></th>
<th><%= t("views.right_panel.detail.total_discount") %></th>
<th><%= t("views.right_panel.detail.tax_amount") %></th>
<th><%= t("views.right_panel.detail.sub_total") %></th>
<th><%= t("views.right_panel.detail.grand_total") %></th>
<th><%= t :cashier %></th>
<th><%= t("views.right_panel.detail.sales_status") %></th>
<th><%= t("views.right_panel.detail.receipt_date") %></th>
@@ -67,11 +69,13 @@
<tr>
<td><%= link_to sale.sale_id, transactions_sale_path(sale) %></td>
<td><%= sale.receipt_no %></td>
<td><%= sale.grand_total rescue '-' %></td>
<td><%= sale.total_discount %></td>
<td><%= sale.total_tax %></td>
<td><%= sale.total_amount %></td>
<td><%= sale.grand_total rescue '-' %></td>
<td><%= sale.cashier_name rescue '-' %></td>
<td> <%= sale.sale_status %> </td>
<td> <%= sale.receipt_date.strftime("%d-%m-%Y") %> </td>
<td> <%= sale.receipt_date.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> </td>
</tr>
<% end %>
<% else %>

View File

@@ -1,5 +0,0 @@
<h1>New Transactions Sale</h1>
<%= render 'form', transactions_sale: @transactions_sale %>
<%= link_to 'Back', transactions_sales_path %>

View File

@@ -142,14 +142,14 @@
<tbody>
<% @order_items.each do |order_item| %>
<tr>
<td><%= order_item.order_id %></td>
<td><%= link_to order_item.order_id, transactions_order_path(order_item.order_id) %><%= %></td>
<td><%= order_item.item_name %></td>
<td><%= order_item.qty %></td>
<td><%= order_item.price %></td>
<td><%= order_item.options %></td>
<td><%= order_item.order_item_status %></td>
<td><%= order_item.item_order_by %> </td>
<td><%= order_item.created_at.strftime("%d-%m-%y") %></td>
<td><%= order_item.created_at.strftime("%d-%m-%y %I:%M %p") %></td>
</tr>
<% end %>
</tbody>
@@ -185,9 +185,10 @@
<td><%= @customer.address%></td>
<td><%= @customer.date_of_birth %></td>
</tr>
<tr></tr>
<tr><td></td></tr>
<% if @customer.membership_id %>
<tr>
<th colspan="5"><%= t("views.right_panel.detail.membership_transactions") %></th>
<th colspan="8"><%= t("views.right_panel.detail.membership_transactions") %></th>
</tr>
<tr>
<th><%= t("views.right_panel.detail.date") %></th>
@@ -197,6 +198,7 @@
<th><%= t("views.right_panel.detail.from_account") %></th>
<th><%= t("views.right_panel.detail.status") %></th>
<th><%= t("views.right_panel.detail.receipt_no") %></th>
<th></th>
</tr>
<%
@@ -210,10 +212,11 @@
<td><%= transaction["account_status"] %></td>
<td><%= transaction["status"] %></td>
<td><%= transaction["receipt_no"] %></td>
<td></td>
</tr>
<% end %>
<% end %>
<% end %>
</tbody>
</table>
</div>