merge with settings_backend
This commit is contained in:
@@ -160,6 +160,10 @@
|
|||||||
background-color: #FF8C00
|
background-color: #FF8C00
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.blue{
|
||||||
|
background-color: blue
|
||||||
|
}
|
||||||
|
|
||||||
.left{
|
.left{
|
||||||
margin-left:1px;
|
margin-left:1px;
|
||||||
}
|
}
|
||||||
|
|||||||
40
app/controllers/origami/room_invoices_controller.rb
Normal file
40
app/controllers/origami/room_invoices_controller.rb
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
class Origami::RoomInvoicesController < BaseOrigamiController
|
||||||
|
def index
|
||||||
|
@room = DiningFacility.find(params[:room_id])
|
||||||
|
puts "room bookig lenght"
|
||||||
|
@sale_array = Array.new
|
||||||
|
@room.bookings.each do |booking|
|
||||||
|
puts booking.sale_id
|
||||||
|
|
||||||
|
if booking.sale_id.nil?
|
||||||
|
else
|
||||||
|
sale = Sale.find(booking.sale_id)
|
||||||
|
|
||||||
|
if sale.sale_status != "completed"
|
||||||
|
@sale_array.push(sale)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def show
|
||||||
|
@room = DiningFacility.find(params[:room_id])
|
||||||
|
@sale_array = Array.new
|
||||||
|
@room.bookings.each do |booking|
|
||||||
|
if booking.sale_id.nil?
|
||||||
|
else
|
||||||
|
sale = Sale.find(booking.sale_id)
|
||||||
|
|
||||||
|
if sale.sale_status != "completed"
|
||||||
|
@sale_array.push(sale)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
@sale = Sale.find(params[:invoice_id])
|
||||||
|
@date = @sale.created_at
|
||||||
|
@status_sale = 'sale'
|
||||||
|
@customer = @sale.customer
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
40
app/controllers/origami/table_invoices_controller.rb
Normal file
40
app/controllers/origami/table_invoices_controller.rb
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
class Origami::TableInvoicesController < BaseOrigamiController
|
||||||
|
def index
|
||||||
|
@table = DiningFacility.find(params[:table_id])
|
||||||
|
puts "table bookig lenght"
|
||||||
|
@sale_array = Array.new
|
||||||
|
@table.bookings.each do |booking|
|
||||||
|
puts booking.sale_id
|
||||||
|
|
||||||
|
if booking.sale_id.nil?
|
||||||
|
else
|
||||||
|
sale = Sale.find(booking.sale_id)
|
||||||
|
|
||||||
|
if sale.sale_status != "completed"
|
||||||
|
@sale_array.push(sale)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def show
|
||||||
|
@table = DiningFacility.find(params[:table_id])
|
||||||
|
@sale_array = Array.new
|
||||||
|
@table.bookings.each do |booking|
|
||||||
|
if booking.sale_id.nil?
|
||||||
|
else
|
||||||
|
sale = Sale.find(booking.sale_id)
|
||||||
|
|
||||||
|
if sale.sale_status != "completed"
|
||||||
|
@sale_array.push(sale)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
@sale = Sale.find(params[:invoice_id])
|
||||||
|
@date = @sale.created_at
|
||||||
|
@status_sale = 'sale'
|
||||||
|
@customer = @sale.customer
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
@@ -94,10 +94,15 @@ class SalePayment < ApplicationRecord
|
|||||||
sale_data = Sale.find_by_sale_id(sale_id)
|
sale_data = Sale.find_by_sale_id(sale_id)
|
||||||
|
|
||||||
if sale_data
|
if sale_data
|
||||||
|
others = 0
|
||||||
|
sale_data.sale_payments.each do |sale_payment|
|
||||||
|
others = others + sale_payment.payment_amount
|
||||||
|
end
|
||||||
|
redeem_prices = sale_data.grand_total -others
|
||||||
# Control for Paypar Cloud
|
# Control for Paypar Cloud
|
||||||
begin
|
begin
|
||||||
response = HTTParty.post(url,
|
response = HTTParty.post(url,
|
||||||
:body => { generic_customer_id:membership_id,redeem_amount:received_amount,receipt_no:sale_data.receipt_no,campaign_type_id:campaign_type_id,account_no:"",merchant_uid:merchant_uid,auth_token:auth_token}.to_json,
|
:body => { generic_customer_id:membership_id,total_amount: redeem_prices,total_sale_transaction_amount: sale_data.grand_total,redeem_amount:received_amount,receipt_no:sale_data.receipt_no,campaign_type_id:campaign_type_id,account_no:"",merchant_uid:merchant_uid,auth_token:auth_token}.to_json,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json'
|
'Accept' => 'application/json'
|
||||||
@@ -292,7 +297,7 @@ class SalePayment < ApplicationRecord
|
|||||||
|
|
||||||
# Control for Paypar Cloud
|
# Control for Paypar Cloud
|
||||||
begin
|
begin
|
||||||
response = HTTParty.post(url, :body => { generic_customer_id:generic_customer_id ,merchant_uid:merchant_uid,total_amount: total_amount,campaign_type_id: campaign_type_id,
|
response = HTTParty.post(url, :body => { generic_customer_id:generic_customer_id ,total_sale_transaction_amount: sObj.grand_total,merchant_uid:merchant_uid,total_amount: total_amount,campaign_type_id: campaign_type_id,
|
||||||
receipt_no: receipt_no,auth_token:auth_token}.to_json,
|
receipt_no: receipt_no,auth_token:auth_token}.to_json,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
|
|||||||
@@ -38,12 +38,21 @@
|
|||||||
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
||||||
<% @tables.each do |table| %>
|
<% @tables.each do |table| %>
|
||||||
<% if table.status == 'occupied' %>
|
<% if table.status == 'occupied' %>
|
||||||
<div class="card tables red text-white" data-id="<%= table.id %>">
|
<% if table.get_booking.nil? %>
|
||||||
<div class="card-block">
|
<div class="card tables red text-white" data-id="<%= table.id %>">
|
||||||
Zone <%= table.zone_id %> <br>
|
<div class="card-block">
|
||||||
Table <%= table.name %> ( <%= table.seater %> Seat )
|
Zone <%= table.zone_id %> <br>
|
||||||
</div>
|
Table <%= table.name %> ( <%= table.seater %> Seat )
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<div class="card tables blue text-white" data-id="<%= table.id %>">
|
||||||
|
<div class="card-block">
|
||||||
|
Zone <%= table.zone_id %> <br>
|
||||||
|
Table <%= table.name %> ( <%= table.seater %> Seat )
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="card tables green text-white" data-id="<%= table.id %>">
|
<div class="card tables green text-white" data-id="<%= table.id %>">
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
@@ -121,7 +130,7 @@ $(function() {
|
|||||||
var timer;
|
var timer;
|
||||||
|
|
||||||
function start() {
|
function start() {
|
||||||
timer = setTimeout(function() { console.log("refresh");window.location.reload()}, 30000); //10000
|
timer = setTimeout(function() { console.log("refresh");window.location.reload()}, 10000); //10000
|
||||||
};
|
};
|
||||||
|
|
||||||
function stop() {
|
function stop() {
|
||||||
|
|||||||
@@ -38,16 +38,22 @@
|
|||||||
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
||||||
<% @tables.each do |table| %>
|
<% @tables.each do |table| %>
|
||||||
<% if table.status == 'occupied' %>
|
<% if table.status == 'occupied' %>
|
||||||
<div class="card tables red text-white" data-id="<%= table.id %>">
|
<% if table.get_booking.nil? %>
|
||||||
<div class="card-block">
|
<div class="card tables red text-white" data-id="<%= table.id %>">
|
||||||
<%= table.name %>
|
<div class="card-block">
|
||||||
<% if table.get_booking.nil? %>
|
<%= table.name %>
|
||||||
<span style="font-size:12px;float:right;line-height:inherit;"> billed</span>
|
<span style="font-size:12px;float:right;line-height:inherit;"> billed</span>
|
||||||
<% else %>
|
<div style="font-size:12px;"></div>
|
||||||
<span style="font-size:12px;float:right;line-height:inherit;"> new</span>
|
</div>
|
||||||
<% end %>
|
</div>
|
||||||
</div>
|
<% else %>
|
||||||
</div>
|
<div class="card tables blue text-white" data-id="<%= table.id %>">
|
||||||
|
<div class="card-block">
|
||||||
|
<%= table.name %>
|
||||||
|
<span style="font-size:12px;float:right;line-height:inherit;"> new</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="card tables green text-white" data-id="<%= table.id %>">
|
<div class="card tables green text-white" data-id="<%= table.id %>">
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
@@ -108,9 +114,9 @@
|
|||||||
<div class="card" >
|
<div class="card" >
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<% if @status_order == 'order' && @status_sale != 'sale' %>
|
<% 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></div>
|
<div id="save_order_id" data-order="<%= @obj_order.order_id %>"><strong id="order-title">ORDER DETAILS </strong> | Table <%= @dining.name rescue "" %></div>
|
||||||
<% elsif @status_sale == 'sale' %>
|
<% elsif @status_sale == 'sale' %>
|
||||||
<div><strong id="order-title">INVOICE DETAILS </strong></div>
|
<div><strong id="order-title">INVOICE DETAILS </strong> | Table <%= @dining.name rescue "" %></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
@@ -130,11 +136,10 @@
|
|||||||
<div class="card-title row">
|
<div class="card-title row">
|
||||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||||
<%if @customer %>
|
<%if @customer %>
|
||||||
<p class="hidden customer-id"><%= @customer.customer_id %></p>
|
<p class="hidden customer-id"><%= @customer.customer_id rescue "" %></p>
|
||||||
<p>Customer : <%= @customer.name %></p>
|
<p>Customer : <%= @customer.name rescue "" %></p>
|
||||||
<%end%>
|
<%end%>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="card-text">
|
<div class="card-text">
|
||||||
<table class="table table-striped" id="order-items-table">
|
<table class="table table-striped" id="order-items-table">
|
||||||
@@ -243,18 +248,18 @@
|
|||||||
%>
|
%>
|
||||||
</table>
|
</table>
|
||||||
<button class='btn btn-primary' id='add_invoice'> Add to existing invoice </button>
|
<button class='btn btn-primary' id='add_invoice'> Add to existing invoice </button>
|
||||||
<%
|
<% end %>
|
||||||
end
|
<br><br>
|
||||||
@sale_array.each do |sale|
|
Pending Payment
|
||||||
|
<% @sale_array.each do |sale|
|
||||||
if @sale_array.size > 1
|
if @sale_array.size > 1
|
||||||
unless sale.receipt_no == @sale_array[0].receipt_no
|
unless sale.receipt_no == @sale_array[0].receipt_no
|
||||||
%>
|
%>
|
||||||
<br><br>
|
|
||||||
Pending Payment
|
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Receipt No - <%= sale.receipt_no %></td>
|
<td>Receipt No - <%= sale.receipt_no %></td>
|
||||||
<td><button class='btn btn-sm btn-primary '>Show Detail </button></td>
|
<td><button class='btn btn-sm btn-primary invoicedetails' id="<%= sale.sale_id %>">Show Detail </button></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<%
|
<%
|
||||||
@@ -300,6 +305,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
$('.invoicedetails').on('click',function(){
|
||||||
|
var dining_id = "<%= @dining.id %>";
|
||||||
|
var sale_id = this.id;
|
||||||
|
window.location.href = '/origami/table/'+ dining_id + "/table_invoice/"+sale_id;
|
||||||
|
})
|
||||||
$(".tables").on('click', function(){
|
$(".tables").on('click', function(){
|
||||||
|
|
||||||
var customer_id=$(".customer-id").text();
|
var customer_id=$(".customer-id").text();
|
||||||
@@ -464,4 +474,5 @@ $('#edit').on('click',function(){
|
|||||||
window.location.href = '/origami/table/'+ dining_id + "/sale/"+ sale_id + "/edit";
|
window.location.href = '/origami/table/'+ dining_id + "/sale/"+ sale_id + "/edit";
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<div class="rebate-form">
|
<div class="rebate-form">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||||
<label class="col-lg-4 col-md-4 col-sm-4">You can redeem upto </label>
|
<label class="col-lg-4 col-md-4 col-sm-4">You can redeem up to </label>
|
||||||
<input type="text" name="" id="redeemamt" class="form-control col-lg-7 col-md-7 col-sm-7" readonly="" value="<%= @redeem_prices %>" data-value="<%=@sale_id %>" data-member-value="<%= @membership_id %>">
|
<input type="text" name="" id="redeemamt" class="form-control col-lg-7 col-md-7 col-sm-7" readonly="" value="<%= @redeem_prices %>" data-value="<%=@sale_id %>" data-member-value="<%= @membership_id %>">
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||||
<label class="col-lg-4 col-md-4 col-sm-4"> Rebat Balance </label>
|
<label class="col-lg-4 col-md-4 col-sm-4"> Rebate Balance </label>
|
||||||
<input type="text" name="valid_amount" id="valid_amount" class="form-control col-lg-7 col-md-7 col-sm-7" readonly="" value="<%=@membership_rebate_balance%>" data-value="<%=@sale_id %>" data-member-value="<%= @membership_id %>">
|
<input type="text" name="valid_amount" id="valid_amount" class="form-control col-lg-7 col-md-7 col-sm-7" readonly="" value="<%=@membership_rebate_balance%>" data-value="<%=@sale_id %>" data-member-value="<%= @membership_id %>">
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
@@ -98,6 +98,12 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){}
|
||||||
|
else {
|
||||||
|
$('#redeemamt').attr("value",parseFloat("<%= @redeem_prices %>") - parseFloat(localStorage.getItem("cash")));
|
||||||
|
}
|
||||||
|
});
|
||||||
$(document).on('click', '.cashier_number', function(event){
|
$(document).on('click', '.cashier_number', function(event){
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
@@ -131,7 +137,7 @@ $(document).on('click', '.cashier_number', function(event){
|
|||||||
$('#used_amount').text(cash.substr(0,cash.length-1));
|
$('#used_amount').text(cash.substr(0,cash.length-1));
|
||||||
break;
|
break;
|
||||||
case 'nett':
|
case 'nett':
|
||||||
var remain_amount = $('#redeemamt').val();
|
var remain_amount = $('#valid_amount').val();
|
||||||
$('#used_amount').text(remain_amount);
|
$('#used_amount').text(remain_amount);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
82
app/views/origami/room_invoices/index.html.erb
Normal file
82
app/views/origami/room_invoices/index.html.erb
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-4 col-md-6 col-sm-6">
|
||||||
|
<% @sale_array.each do |sale| %>
|
||||||
|
<div class="card tables" data-id="<%= sale.id %>">
|
||||||
|
<div class="card-block">
|
||||||
|
<%= sale.receipt_no %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Column Two -->
|
||||||
|
<div class="col-lg-7 col-md-5 col-sm-5">
|
||||||
|
<div class="card" >
|
||||||
|
<div class="card-header">
|
||||||
|
<div><strong id="order-title">INVOICE DETAILS </strong></div>
|
||||||
|
</div>
|
||||||
|
<div class="card-block">
|
||||||
|
<div class="card-title row">
|
||||||
|
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||||
|
<p> Receipt No: <span id="receipt_no">
|
||||||
|
<%= @sale.receipt_no rescue '' %>
|
||||||
|
</span></p>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6 col-md-6 col-sm-6 text-right">
|
||||||
|
<p>Date: <span id="receipt_date"><%= @sale.created_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-title row customer_detail hide">
|
||||||
|
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||||
|
<p>Customer : <span id="customer_name"></span></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-footer">
|
||||||
|
<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"></strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="charges-name"><strong>Discount:</strong></td>
|
||||||
|
<td class="item-attr"><strong id="order-discount">(<%= @sale.total_discount rescue 0%>)</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="charges-name"><strong>Tax:</strong></td>
|
||||||
|
<td class="item-attr"><strong id="order-Tax"><%= @sale.total_tax rescue 0%></strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="charges-name"><strong>Grand Total:</strong></td>
|
||||||
|
<td class="item-attr"><strong id="order-grand-total"><%= @sale.grand_total rescue 0%></strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rebate_amount"></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Column Three -->
|
||||||
|
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||||
|
<button type="button" class="btn btn-primary btn-block" id='back'>Back</button>
|
||||||
|
<button type="button" id="pay" class="btn btn-primary btn-block" disabled>Pay</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
$(".tables").on('click', function(){
|
||||||
|
var dining_id = $(this).attr("data-id");
|
||||||
|
window.location.href = '/origami/table/<%= @room.id %>/table_invoice/' + dining_id;
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#pay').on('click',function() {
|
||||||
|
// var sale_id = $('#sale_id').val();
|
||||||
|
// window.location.href = '/origami/sale/'+ sale_id + "/payment";
|
||||||
|
});
|
||||||
|
$('#back').on('click',function(){
|
||||||
|
window.location.href = '/origami/table/<%= @room.id %>';
|
||||||
|
})
|
||||||
|
</script>
|
||||||
147
app/views/origami/room_invoices/show.html.erb
Normal file
147
app/views/origami/room_invoices/show.html.erb
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-4 col-md-6 col-sm-6">
|
||||||
|
<!-- <div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;"> -->
|
||||||
|
<% @sale_array.each do |sale| %>
|
||||||
|
<div class="card tables" data-id="<%= sale.id %>">
|
||||||
|
<% if sale.id == @sale.id %>
|
||||||
|
<div class="card-bl ock" style="background-color:#6080f0;">
|
||||||
|
<%= sale.receipt_no %>
|
||||||
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<div class="card-block">
|
||||||
|
<%= sale.receipt_no %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-7 col-md-5 col-sm-5">
|
||||||
|
<div class="card" >
|
||||||
|
<div class="card-header">
|
||||||
|
<div><strong id="order-title">INVOICE DETAILS </strong></div>
|
||||||
|
</div>
|
||||||
|
<div class="card-block">
|
||||||
|
<div class="card-title row">
|
||||||
|
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||||
|
<p> Receipt No: <span id="receipt_no">
|
||||||
|
<%= @sale.receipt_no rescue '' %>
|
||||||
|
</span></p>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6 col-md-6 col-sm-6 text-right">
|
||||||
|
<p>Date: <span id="receipt_date"><%= @sale.created_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-title row customer_detail hide">
|
||||||
|
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||||
|
<!-- <% if !@customer.nil? %> -->
|
||||||
|
<p class="hidden customer-id"><%= @customer.customer_id rescue "" %></p>
|
||||||
|
<p>Customer : <%= @customer.name rescue "" %></p>
|
||||||
|
<!-- <% end %> -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="card-text">
|
||||||
|
<table class="table table-striped" id="order-items-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>#</th>
|
||||||
|
<th class="item-name">Items</th>
|
||||||
|
<th class="item-attr">QTY</td>
|
||||||
|
<th class="item-attr">Price</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<%
|
||||||
|
count = 0
|
||||||
|
sub_total = 0
|
||||||
|
if @status_sale == "sale"
|
||||||
|
@sale.sale_items.each do |sale_item|
|
||||||
|
count += 1
|
||||||
|
sub_total = sub_total + sale_item.price
|
||||||
|
%>
|
||||||
|
<input type="hidden" id="sale_id" value="<%= @sale_array[0].sale_id %>">
|
||||||
|
<%
|
||||||
|
# Can't check for discount
|
||||||
|
unless sale_item.price == 0
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td><%= count %></td>
|
||||||
|
<td class='item-name'><%= sale_item.product_name %></td>
|
||||||
|
<td class='item-attr'><%= sale_item.qty %></td>
|
||||||
|
<td class='item-attr'><%= sale_item.price %></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if @status_order == 'order' && @status_sale != 'sale'
|
||||||
|
unless @order_items.nil?
|
||||||
|
count = 0
|
||||||
|
@order_items.each do |order_item |
|
||||||
|
count += 1
|
||||||
|
sub_total = sub_total + order_item.price
|
||||||
|
|
||||||
|
unless order_item.price == 0 %>
|
||||||
|
<tr>
|
||||||
|
<td><%= count %></td>
|
||||||
|
<td class='item-name'><%= order_item.item_name %></td>
|
||||||
|
<td class='item-attr'><%= order_item.qty %></td>
|
||||||
|
<td class='item-attr'><%= order_item.qty*order_item.price %></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
%>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="card-footer">
|
||||||
|
<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>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="charges-name"><strong>Discount:</strong></td>
|
||||||
|
<td class="item-attr"><strong id="order-discount">(<%= @sale.total_discount rescue 0%>)</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="charges-name"><strong>Tax:</strong></td>
|
||||||
|
<td class="item-attr"><strong id="order-Tax"><%= @sale.total_tax rescue 0%></strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="charges-name"><strong>Grand Total:</strong></td>
|
||||||
|
<td class="item-attr"><strong id="order-grand-total"><%= @sale.grand_total rescue 0%></strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rebate_amount"></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Column Three -->
|
||||||
|
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||||
|
<button type="button" class="btn btn-primary btn-block" id='back'>Back</button>
|
||||||
|
<button type="button" id="pay" class="btn btn-primary btn-block">Pay</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
$(".tables").on('click', function(){
|
||||||
|
var dining_id = $(this).attr("data-id");
|
||||||
|
window.location.href = '/origami/table/<%= @room.id %>/table_invoice/' + dining_id;
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#pay').on('click',function() {
|
||||||
|
window.location.href = '/origami/sale/<%= @sale.id %>/payment';
|
||||||
|
});
|
||||||
|
$('#back').on('click',function(){
|
||||||
|
window.location.href = '/origami/table/<%= @room.id %>';
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@@ -38,16 +38,21 @@
|
|||||||
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
||||||
<% @tables.each do |table| %>
|
<% @tables.each do |table| %>
|
||||||
<% if table.status == 'occupied' %>
|
<% if table.status == 'occupied' %>
|
||||||
<div class="card tables red text-white" data-id="<%= table.id %>">
|
<% if table.get_booking.nil? %>
|
||||||
<div class="card-block">
|
<div class="card tables red text-white" data-id="<%= table.id %>">
|
||||||
<%= table.name %>
|
<div class="card-block">
|
||||||
<% if table.get_booking.nil? %>
|
<%= table.name %>
|
||||||
<span style="font-size:12px;float:right;line-height:inherit;"> billed</span>
|
<span style="font-size:12px;float:right;line-height:inherit;"> billed</span>
|
||||||
<% else %>
|
</div>
|
||||||
<span style="font-size:12px;float:right;line-height:inherit;"> new</span>
|
</div>
|
||||||
<% end %>
|
<% else %>
|
||||||
</div>
|
<div class="card tables blue text-white" data-id="<%= table.id %>">
|
||||||
</div>
|
<div class="card-block">
|
||||||
|
<%= table.name %>
|
||||||
|
<span style="font-size:12px;float:right;line-height:inherit;"> new</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="card tables green text-white" data-id="<%= table.id %>">
|
<div class="card tables green text-white" data-id="<%= table.id %>">
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
@@ -108,9 +113,9 @@
|
|||||||
<div class="card" >
|
<div class="card" >
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<% if @status == 'order' %>
|
<% if @status == 'order' %>
|
||||||
<div id="save_order_id" data-order="<%= @obj.order_id %>"><strong id="order-title">ORDER DETAILS </strong></div>
|
<div id="save_order_id" data-order="<%= @obj.order_id %>"><strong id="order-title">ORDER DETAILS </strong> | Table <%= @room.name rescue "" %></div>
|
||||||
<% elsif @status_sale == 'sale' %>
|
<% elsif @status_sale == 'sale' %>
|
||||||
<div><strong id="order-title">INVOICE DETAILS </strong></div>
|
<div><strong id="order-title">INVOICE DETAILS </strong> | Table <%= @room.name rescue "" %></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
82
app/views/origami/table_invoices/index.html.erb
Normal file
82
app/views/origami/table_invoices/index.html.erb
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-4 col-md-6 col-sm-6">
|
||||||
|
<% @sale_array.each do |sale| %>
|
||||||
|
<div class="card tables" data-id="<%= sale.id %>">
|
||||||
|
<div class="card-block">
|
||||||
|
<%= sale.receipt_no %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Column Two -->
|
||||||
|
<div class="col-lg-7 col-md-5 col-sm-5">
|
||||||
|
<div class="card" >
|
||||||
|
<div class="card-header">
|
||||||
|
<div><strong id="order-title">INVOICE DETAILS </strong></div>
|
||||||
|
</div>
|
||||||
|
<div class="card-block">
|
||||||
|
<div class="card-title row">
|
||||||
|
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||||
|
<p> Receipt No: <span id="receipt_no">
|
||||||
|
<%= @sale.receipt_no rescue '' %>
|
||||||
|
</span></p>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6 col-md-6 col-sm-6 text-right">
|
||||||
|
<p>Date: <span id="receipt_date"><%= @sale.created_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-title row customer_detail hide">
|
||||||
|
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||||
|
<p>Customer : <span id="customer_name"></span></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-footer">
|
||||||
|
<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"></strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="charges-name"><strong>Discount:</strong></td>
|
||||||
|
<td class="item-attr"><strong id="order-discount">(<%= @sale.total_discount rescue 0%>)</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="charges-name"><strong>Tax:</strong></td>
|
||||||
|
<td class="item-attr"><strong id="order-Tax"><%= @sale.total_tax rescue 0%></strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="charges-name"><strong>Grand Total:</strong></td>
|
||||||
|
<td class="item-attr"><strong id="order-grand-total"><%= @sale.grand_total rescue 0%></strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rebate_amount"></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Column Three -->
|
||||||
|
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||||
|
<button type="button" class="btn btn-primary btn-block" id='back'>Back</button>
|
||||||
|
<button type="button" id="pay" class="btn btn-primary btn-block" disabled>Pay</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
$(".tables").on('click', function(){
|
||||||
|
var dining_id = $(this).attr("data-id");
|
||||||
|
window.location.href = '/origami/table/<%= @table.id %>/table_invoice/' + dining_id;
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#pay').on('click',function() {
|
||||||
|
// var sale_id = $('#sale_id').val();
|
||||||
|
// window.location.href = '/origami/sale/'+ sale_id + "/payment";
|
||||||
|
});
|
||||||
|
$('#back').on('click',function(){
|
||||||
|
window.location.href = '/origami/table/<%= @table.id %>';
|
||||||
|
})
|
||||||
|
</script>
|
||||||
147
app/views/origami/table_invoices/show.html.erb
Normal file
147
app/views/origami/table_invoices/show.html.erb
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-4 col-md-6 col-sm-6">
|
||||||
|
<!-- <div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;"> -->
|
||||||
|
<% @sale_array.each do |sale| %>
|
||||||
|
<div class="card tables" data-id="<%= sale.id %>">
|
||||||
|
<% if sale.id == @sale.id %>
|
||||||
|
<div class="card-block" style="background-color:#6080f0;">
|
||||||
|
<%= sale.receipt_no %>
|
||||||
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<div class="card-block">
|
||||||
|
<%= sale.receipt_no %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-7 col-md-5 col-sm-5">
|
||||||
|
<div class="card" >
|
||||||
|
<div class="card-header">
|
||||||
|
<div><strong id="order-title">INVOICE DETAILS </strong></div>
|
||||||
|
</div>
|
||||||
|
<div class="card-block">
|
||||||
|
<div class="card-title row">
|
||||||
|
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||||
|
<p> Receipt No: <span id="receipt_no">
|
||||||
|
<%= @sale.receipt_no rescue '' %>
|
||||||
|
</span></p>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6 col-md-6 col-sm-6 text-right">
|
||||||
|
<p>Date: <span id="receipt_date"><%= @sale.created_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-title row customer_detail hide">
|
||||||
|
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||||
|
<!-- <% if !@customer.nil? %> -->
|
||||||
|
<p class="hidden customer-id"><%= @customer.customer_id rescue "" %></p>
|
||||||
|
<p>Customer : <%= @customer.name rescue "" %></p>
|
||||||
|
<!-- <% end %> -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="card-text">
|
||||||
|
<table class="table table-striped" id="order-items-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>#</th>
|
||||||
|
<th class="item-name">Items</th>
|
||||||
|
<th class="item-attr">QTY</td>
|
||||||
|
<th class="item-attr">Price</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<%
|
||||||
|
count = 0
|
||||||
|
sub_total = 0
|
||||||
|
if @status_sale == "sale"
|
||||||
|
@sale.sale_items.each do |sale_item|
|
||||||
|
count += 1
|
||||||
|
sub_total = sub_total + sale_item.price
|
||||||
|
%>
|
||||||
|
<input type="hidden" id="sale_id" value="<%= @sale_array[0].sale_id %>">
|
||||||
|
<%
|
||||||
|
# Can't check for discount
|
||||||
|
unless sale_item.price == 0
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td><%= count %></td>
|
||||||
|
<td class='item-name'><%= sale_item.product_name %></td>
|
||||||
|
<td class='item-attr'><%= sale_item.qty %></td>
|
||||||
|
<td class='item-attr'><%= sale_item.price %></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if @status_order == 'order' && @status_sale != 'sale'
|
||||||
|
unless @order_items.nil?
|
||||||
|
count = 0
|
||||||
|
@order_items.each do |order_item |
|
||||||
|
count += 1
|
||||||
|
sub_total = sub_total + order_item.price
|
||||||
|
|
||||||
|
unless order_item.price == 0 %>
|
||||||
|
<tr>
|
||||||
|
<td><%= count %></td>
|
||||||
|
<td class='item-name'><%= order_item.item_name %></td>
|
||||||
|
<td class='item-attr'><%= order_item.qty %></td>
|
||||||
|
<td class='item-attr'><%= order_item.qty*order_item.price %></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
%>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="card-footer">
|
||||||
|
<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>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="charges-name"><strong>Discount:</strong></td>
|
||||||
|
<td class="item-attr"><strong id="order-discount">(<%= @sale.total_discount rescue 0%>)</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="charges-name"><strong>Tax:</strong></td>
|
||||||
|
<td class="item-attr"><strong id="order-Tax"><%= @sale.total_tax rescue 0%></strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="charges-name"><strong>Grand Total:</strong></td>
|
||||||
|
<td class="item-attr"><strong id="order-grand-total"><%= @sale.grand_total rescue 0%></strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rebate_amount"></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Column Three -->
|
||||||
|
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||||
|
<button type="button" class="btn btn-primary btn-block" id='back'>Back</button>
|
||||||
|
<button type="button" id="pay" class="btn btn-primary btn-block">Pay</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
$(".tables").on('click', function(){
|
||||||
|
var dining_id = $(this).attr("data-id");
|
||||||
|
window.location.href = '/origami/table/<%= @table.id %>/table_invoice/' + dining_id;
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#pay').on('click',function() {
|
||||||
|
window.location.href = '/origami/sale/<%= @sale.id %>/payment';
|
||||||
|
});
|
||||||
|
$('#back').on('click',function(){
|
||||||
|
window.location.href = '/origami/table/<%= @table.id %>';
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@@ -16,9 +16,9 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>Title</th>
|
<th>Title</th>
|
||||||
<th>Account Type</th>
|
<th>Account Type</th>
|
||||||
<th>Can get Discount</th>
|
<!-- <th>Can get Discount</th> -->
|
||||||
<th>Can get Points</th>
|
<th>Can get Points</th>
|
||||||
<th>Can get Bonus</th>
|
<!-- <th>Can get Bonus</th> -->
|
||||||
<th>Can rebate</th>
|
<th>Can rebate</th>
|
||||||
|
|
||||||
<th style="">Action</th>
|
<th style="">Action</th>
|
||||||
@@ -30,9 +30,9 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td><%= account.title %></td>
|
<td><%= account.title %></td>
|
||||||
<td><%= account.account_type %></td>
|
<td><%= account.account_type %></td>
|
||||||
<td><%= account.discount %></td>
|
<!-- <td><%= account.discount %></td> -->
|
||||||
<td><%= account.point %></td>
|
<td><%= account.point %></td>
|
||||||
<td><%= account.bonus %></td>
|
<!-- <td><%= account.bonus %></td> -->
|
||||||
<td><%= account.rebate %></td>
|
<td><%= account.rebate %></td>
|
||||||
<td>
|
<td>
|
||||||
<%= link_to 'Edit', edit_settings_account_path(account) %> |
|
<%= link_to 'Edit', edit_settings_account_path(account) %> |
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
|
<!-- -->
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ul class="breadcrumb">
|
<ul class="breadcrumb">
|
||||||
<li><a href="<%= %>">Home</a></li>
|
<li><a href="<%= %>">Home</a></li>
|
||||||
@@ -17,9 +17,9 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>Title</th>
|
<th>Title</th>
|
||||||
<th>Account type</th>
|
<th>Account type</th>
|
||||||
<th>Can get Discount</th>
|
<!-- <th>Can get Discount</th> -->
|
||||||
<th>Can get Points</th>
|
<th>Can get Points</th>
|
||||||
<th>Can get Bonus</th>
|
<!-- <th>Can get Bonus</th> -->
|
||||||
<th>Can rebate</th>
|
<th>Can rebate</th>
|
||||||
<th>Action</th>
|
<th>Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -29,9 +29,9 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td><%= @settings_account.title %></td>
|
<td><%= @settings_account.title %></td>
|
||||||
<td><%= @settings_account.account_type %></td>
|
<td><%= @settings_account.account_type %></td>
|
||||||
<td><%= @settings_account.discount %></td>
|
<!-- <td><%= @settings_account.discount %></td> -->
|
||||||
<td><%= @settings_account.point %></td>
|
<td><%= @settings_account.point %></td>
|
||||||
<td><%= @settings_account.bonus %></td>
|
<!-- <td><%= @settings_account.bonus %></td> -->
|
||||||
<td><%= @settings_account.rebate %></td>
|
<td><%= @settings_account.rebate %></td>
|
||||||
|
|
||||||
<td><%= link_to 'Edit', edit_settings_account_path(@settings_account, @settings_account) %></td>
|
<td><%= link_to 'Edit', edit_settings_account_path(@settings_account, @settings_account) %></td>
|
||||||
|
|||||||
@@ -110,6 +110,12 @@ Rails.application.routes.draw do
|
|||||||
get 'sale/:sale_id/payment/others_payment/JCB' => "jcb#index"
|
get 'sale/:sale_id/payment/others_payment/JCB' => "jcb#index"
|
||||||
get 'sale/:sale_id/payment/others_payment/Redeem' => "redeem_payments#index"
|
get 'sale/:sale_id/payment/others_payment/Redeem' => "redeem_payments#index"
|
||||||
|
|
||||||
|
#---------Multiple Invoices --------------#
|
||||||
|
get 'table/:table_id/table_invoices' => "table_invoices#index" , :as => "table_invoice_index"
|
||||||
|
get 'table/:table_id/table_invoice/:invoice_id' => "table_invoices#show" , :as => "table_invoice_show"
|
||||||
|
get 'room/:room_id/room_invoices' => "room_invoices#index" , :as => "room_invoice_index"
|
||||||
|
get 'room/:room_id/room_invoice/:invoice_id' => "room_invoices#show" , :as => "room_invoice_show"
|
||||||
|
|
||||||
#---------Add Customer --------------#
|
#---------Add Customer --------------#
|
||||||
#resources :customers
|
#resources :customers
|
||||||
get '/:sale_id/customers', to: "customers#add_customer"
|
get '/:sale_id/customers', to: "customers#add_customer"
|
||||||
|
|||||||
@@ -73,8 +73,8 @@ booking_status = Lookup.create([{lookup_type:'booking_status', name: 'Available'
|
|||||||
{lookup_type:'booking_status', name: 'Moved', value: 'moved'}])
|
{lookup_type:'booking_status', name: 'Moved', value: 'moved'}])
|
||||||
|
|
||||||
#booking_status
|
#booking_status
|
||||||
account_type = Lookup.create([{lookup_type:'account_type', name: 'Income', value: 'income'},
|
account_type = Lookup.create([{lookup_type:'account_type', name: 'Income', value: '0'},
|
||||||
{lookup_type:'account_type', name: 'Expense', value: 'expense'}])
|
{lookup_type:'account_type', name: 'Expense', value: '1'}])
|
||||||
|
|
||||||
# sale void reason
|
# sale void reason
|
||||||
void_reason = Lookup.create([{lookup_type:'void_reason', name: 'Approve By Manager', value: 'Approve By Manager'},
|
void_reason = Lookup.create([{lookup_type:'void_reason', name: 'Approve By Manager', value: 'Approve By Manager'},
|
||||||
|
|||||||
Reference in New Issue
Block a user