Merge branch 'adminbsb_material_ui' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
@@ -64,3 +64,32 @@ select:focus {
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*Pagination*/
|
||||||
|
nav.pagination {
|
||||||
|
margin:10px;
|
||||||
|
|
||||||
|
}
|
||||||
|
nav.pagination .current{
|
||||||
|
background-color:#1f91f3;
|
||||||
|
color:#fff;
|
||||||
|
padding:4px 10px;
|
||||||
|
margin-top:-4px;
|
||||||
|
}
|
||||||
|
nav.pagination .page a,.next a,.last a,.prev a,.first a{
|
||||||
|
padding:6.5px 10px;
|
||||||
|
margin-left: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav.pagination .page a:hover,
|
||||||
|
a:focus {
|
||||||
|
background-color: #ccc;
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
|
}
|
||||||
|
nav.pagination .page a:hover,
|
||||||
|
.first a:hover,.last a:hover,.prev a:hover,.next a:hover{
|
||||||
|
background-color: #ccc;
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ class Crm::CustomersController < BaseCrmController
|
|||||||
:body => member_params,
|
:body => member_params,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json'
|
'Accept' => 'application/json; version=2'
|
||||||
},
|
},
|
||||||
:timeout => 10
|
:timeout => 10
|
||||||
)
|
)
|
||||||
@@ -243,6 +243,7 @@ end
|
|||||||
member_params = { name: name,phone: phone,email: email,
|
member_params = { name: name,phone: phone,email: email,
|
||||||
dob: dob,address: address,nrc:nrc,card_no:card_no,
|
dob: dob,address: address,nrc:nrc,card_no:card_no,
|
||||||
member_group_id: member_group_id,
|
member_group_id: member_group_id,
|
||||||
|
id:id,
|
||||||
merchant_uid:merchant_uid,auth_token:auth_token}.to_json
|
merchant_uid:merchant_uid,auth_token:auth_token}.to_json
|
||||||
|
|
||||||
# Check for paypar account exists
|
# Check for paypar account exists
|
||||||
@@ -252,6 +253,7 @@ end
|
|||||||
dob: dob,address: address,nrc:nrc,card_no:card_no,
|
dob: dob,address: address,nrc:nrc,card_no:card_no,
|
||||||
paypar_account_no: paypar_account_no,
|
paypar_account_no: paypar_account_no,
|
||||||
member_group_id: member_group_id,
|
member_group_id: member_group_id,
|
||||||
|
id:id,
|
||||||
merchant_uid:merchant_uid,auth_token:auth_token}.to_json
|
merchant_uid:merchant_uid,auth_token:auth_token}.to_json
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -260,7 +262,7 @@ end
|
|||||||
:body => member_params,
|
:body => member_params,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json'
|
'Accept' => 'application/json; version=2'
|
||||||
},
|
},
|
||||||
:timeout => 10
|
:timeout => 10
|
||||||
)
|
)
|
||||||
@@ -273,7 +275,8 @@ end
|
|||||||
rescue SocketError
|
rescue SocketError
|
||||||
response = { status: false}
|
response = { status: false}
|
||||||
end
|
end
|
||||||
|
puts "ssssssss"
|
||||||
|
puts response.to_json
|
||||||
customer = Customer.find(@crm_customer.customer_id)
|
customer = Customer.find(@crm_customer.customer_id)
|
||||||
|
|
||||||
if response["status"] == true
|
if response["status"] == true
|
||||||
@@ -301,6 +304,7 @@ end
|
|||||||
member_params = { name: name,phone: phone,email: email,
|
member_params = { name: name,phone: phone,email: email,
|
||||||
dob: dob,address: address,nrc:nrc,card_no:card_no,
|
dob: dob,address: address,nrc:nrc,card_no:card_no,
|
||||||
member_group_id: member_group_id,
|
member_group_id: member_group_id,
|
||||||
|
id:id,
|
||||||
merchant_uid:merchant_uid,auth_token:auth_token}.to_json
|
merchant_uid:merchant_uid,auth_token:auth_token}.to_json
|
||||||
|
|
||||||
# Check for paypar account exists
|
# Check for paypar account exists
|
||||||
@@ -309,6 +313,7 @@ end
|
|||||||
dob: dob,address: address,nrc:nrc,card_no:card_no,
|
dob: dob,address: address,nrc:nrc,card_no:card_no,
|
||||||
paypar_account_no: paypar_account_no,
|
paypar_account_no: paypar_account_no,
|
||||||
member_group_id: member_group_id,
|
member_group_id: member_group_id,
|
||||||
|
id:id,
|
||||||
merchant_uid:merchant_uid,auth_token:auth_token}.to_json
|
merchant_uid:merchant_uid,auth_token:auth_token}.to_json
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -317,7 +322,7 @@ end
|
|||||||
:body => member_params,
|
:body => member_params,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json'
|
'Accept' => 'application/json; version=2'
|
||||||
},
|
},
|
||||||
:timeout => 10
|
:timeout => 10
|
||||||
)
|
)
|
||||||
@@ -331,7 +336,17 @@ end
|
|||||||
response = { status: false}
|
response = { status: false}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
puts "ssssssss"
|
||||||
|
puts response.to_json
|
||||||
|
|
||||||
if response["status"] == true
|
if response["status"] == true
|
||||||
|
customer = Customer.find(@crm_customer.customer_id)
|
||||||
|
# Check membership id and bind to user
|
||||||
|
if response["membership_id"] != nil
|
||||||
|
status = customer.update_attributes(membership_id: response["membership_id"],membership_type:member_group_id )
|
||||||
|
else
|
||||||
|
status = customer.update_attributes(membership_type:member_group_id )
|
||||||
|
end
|
||||||
format.html { redirect_to crm_customers_path, notice: 'Customer was successfully updated.' }
|
format.html { redirect_to crm_customers_path, notice: 'Customer was successfully updated.' }
|
||||||
format.json { render :show, status: :ok, location: @crm_customer }
|
format.json { render :show, status: :ok, location: @crm_customer }
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ class Origami::DiscountsController < BaseOrigamiController
|
|||||||
auth_token:auth_token}.to_json,
|
auth_token:auth_token}.to_json,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json'
|
'Accept' => 'application/json; version=2'
|
||||||
}, :timeout => 10)
|
}, :timeout => 10)
|
||||||
rescue HTTParty::Error
|
rescue HTTParty::Error
|
||||||
response = {"status": false, "message": "Can't open membership server " }
|
response = {"status": false, "message": "Can't open membership server " }
|
||||||
@@ -215,7 +215,8 @@ class Origami::DiscountsController < BaseOrigamiController
|
|||||||
else
|
else
|
||||||
response = {"status": false, "message": "You have no selected discount item" }
|
response = {"status": false, "message": "You have no selected discount item" }
|
||||||
end
|
end
|
||||||
|
puts "discount"
|
||||||
|
puts response.to_json
|
||||||
# Re-calc All Amount in Sale
|
# Re-calc All Amount in Sale
|
||||||
if response["status"] == true
|
if response["status"] == true
|
||||||
discount_amount = response["discount_earned"]
|
discount_amount = response["discount_earned"]
|
||||||
|
|||||||
@@ -127,8 +127,9 @@ class Origami::PaymentsController < BaseOrigamiController
|
|||||||
# get member information
|
# get member information
|
||||||
if @customer.membership_id != nil && rebate
|
if @customer.membership_id != nil && rebate
|
||||||
response = Customer.get_member_account(@customer)
|
response = Customer.get_member_account(@customer)
|
||||||
|
puts response.to_json
|
||||||
if response["status"]==true
|
if response["status"]==true
|
||||||
response["data"].each do |res|
|
response["account_data"].each do |res|
|
||||||
if res["accountable_type"] == "RebateAccount" || res["accountable_type"] == "RebatebonusAccount"
|
if res["accountable_type"] == "RebateAccount" || res["accountable_type"] == "RebatebonusAccount"
|
||||||
@balance += res["balance"]
|
@balance += res["balance"]
|
||||||
# @accountable_type = res["accountable_type"]
|
# @accountable_type = res["accountable_type"]
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class Origami::VoucherController < BaseOrigamiController
|
|||||||
}.to_json,
|
}.to_json,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json'
|
'Accept' => 'application/json; version=2'
|
||||||
}, :timeout => 10
|
}, :timeout => 10
|
||||||
)
|
)
|
||||||
rescue Net::OpenTimeout
|
rescue Net::OpenTimeout
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ class Ability
|
|||||||
|
|
||||||
|
|
||||||
can :manage, Order
|
can :manage, Order
|
||||||
|
can :manage, Booking
|
||||||
can :manage, Sale
|
can :manage, Sale
|
||||||
|
|
||||||
|
|
||||||
@@ -84,7 +85,7 @@ class Ability
|
|||||||
|
|
||||||
can :read, Order
|
can :read, Order
|
||||||
can :update, Order
|
can :update, Order
|
||||||
|
can :menage, Booking
|
||||||
can :read, Sale
|
can :read, Sale
|
||||||
can :update, Sale
|
can :update, Sale
|
||||||
can :get_customer, Customer
|
can :get_customer, Customer
|
||||||
|
|||||||
@@ -23,13 +23,17 @@ class Customer < ApplicationRecord
|
|||||||
# urltest =self.url_exist?(url)
|
# urltest =self.url_exist?(url)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
response = HTTParty.get(url, :body => { membership_id: customer.membership_id,merchant_uid:merchant_uid,auth_token:auth_token}.to_json,
|
response = HTTParty.get(url, :body => {
|
||||||
|
membership_id: customer.membership_id,
|
||||||
|
merchant_uid:merchant_uid,
|
||||||
|
type: "summary",
|
||||||
|
auth_token:auth_token
|
||||||
|
}.to_json,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json'
|
'Accept' => 'application/json; version=2'
|
||||||
},
|
},
|
||||||
:timeout => 10
|
:timeout => 10)
|
||||||
)
|
|
||||||
rescue HTTParty::Error
|
rescue HTTParty::Error
|
||||||
response = {status: false, message: "Server Error"}
|
response = {status: false, message: "Server Error"}
|
||||||
|
|
||||||
@@ -63,7 +67,7 @@ class Customer < ApplicationRecord
|
|||||||
}.to_json,
|
}.to_json,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json'
|
'Accept' => 'application/json; version=2'
|
||||||
},
|
},
|
||||||
:timeout => 10
|
:timeout => 10
|
||||||
)
|
)
|
||||||
@@ -102,7 +106,7 @@ class Customer < ApplicationRecord
|
|||||||
|
|
||||||
# Check for paypar account exists
|
# Check for paypar account exists
|
||||||
# if paypar_account_no != nil || paypar_account_no != ''
|
# if paypar_account_no != nil || paypar_account_no != ''
|
||||||
if paypar_account_no.present?
|
if customer.paypar_account_no.present?
|
||||||
member_params = { name: customer.name,phone: customer.contact_no,
|
member_params = { name: customer.name,phone: customer.contact_no,
|
||||||
email: customer.email,dob: customer.date_of_birth,
|
email: customer.email,dob: customer.date_of_birth,
|
||||||
address: customer.address,nrc:customer.nrc_no,
|
address: customer.address,nrc:customer.nrc_no,
|
||||||
@@ -116,7 +120,7 @@ class Customer < ApplicationRecord
|
|||||||
:body => member_params,
|
:body => member_params,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json'
|
'Accept' => 'application/json; version=2'
|
||||||
})
|
})
|
||||||
rescue Net::OpenTimeout
|
rescue Net::OpenTimeout
|
||||||
response = { status: false, message: "Server Time out" }
|
response = { status: false, message: "Server Time out" }
|
||||||
@@ -127,7 +131,6 @@ class Customer < ApplicationRecord
|
|||||||
rescue SocketError
|
rescue SocketError
|
||||||
response = { status: false, message: "Can't connect server"}
|
response = { status: false, message: "Can't connect server"}
|
||||||
end
|
end
|
||||||
|
|
||||||
if response["status"] == true
|
if response["status"] == true
|
||||||
status = customer.update_attributes(membership_id: response["customer_datas"]["id"])
|
status = customer.update_attributes(membership_id: response["customer_datas"]["id"])
|
||||||
end
|
end
|
||||||
@@ -161,10 +164,12 @@ class Customer < ApplicationRecord
|
|||||||
credit = 1
|
credit = 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# overall_dis = SaleItem.get_overall_discount(sObj.id)
|
# overall_dis = SaleItem.get_overall_discount(sObj.id)
|
||||||
overall_dis = sObj.total_discount
|
overall_dis = sObj.total_discount
|
||||||
|
|
||||||
total_amount = rebate_prices - payparcost - overall_dis
|
total_amount = rebate_prices - payparcost - overall_dis
|
||||||
|
|
||||||
if credit == 1
|
if credit == 1
|
||||||
total_amount = 0
|
total_amount = 0
|
||||||
end
|
end
|
||||||
@@ -183,7 +188,7 @@ class Customer < ApplicationRecord
|
|||||||
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',
|
||||||
'Accept' => 'application/json'
|
'Accept' => 'application/json; version=2'
|
||||||
}, :timeout => 10)
|
}, :timeout => 10)
|
||||||
rescue Net::OpenTimeout
|
rescue Net::OpenTimeout
|
||||||
response = { "status": false , "message": "Connect To" }
|
response = { "status": false , "message": "Connect To" }
|
||||||
@@ -215,7 +220,7 @@ class Customer < ApplicationRecord
|
|||||||
}.to_json,
|
}.to_json,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json'
|
'Accept' => 'application/json; version=2'
|
||||||
},
|
},
|
||||||
:timeout => 10
|
:timeout => 10
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ class SalePayment < ApplicationRecord
|
|||||||
}.to_json,
|
}.to_json,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json'
|
'Accept' => 'application/json; version=2'
|
||||||
}, :timeout => 10
|
}, :timeout => 10
|
||||||
)
|
)
|
||||||
rescue Net::OpenTimeout
|
rescue Net::OpenTimeout
|
||||||
@@ -120,17 +120,18 @@ class SalePayment < ApplicationRecord
|
|||||||
# Control for Paypar Cloud
|
# Control for Paypar Cloud
|
||||||
begin
|
begin
|
||||||
response = HTTParty.post(url,
|
response = HTTParty.post(url,
|
||||||
:body => { generic_customer_id:membership_id,
|
:body => { membership_id:membership_id,
|
||||||
total_amount: redeem_prices,
|
total_amount: redeem_prices,
|
||||||
total_sale_transaction_amount: sale_data.grand_total,
|
total_sale_transaction_amount: sale_data.grand_total,
|
||||||
redeem_amount:received_amount,
|
redeem_amount:received_amount,
|
||||||
receipt_no:sale_data.receipt_no,
|
receipt_no:sale_data.receipt_no,
|
||||||
campaign_type_id:campaign_type_id,
|
campaign_type_id:campaign_type_id,
|
||||||
account_no:"",merchant_uid:merchant_uid,
|
account_no:"",
|
||||||
|
merchant_uid:merchant_uid,
|
||||||
auth_token:auth_token}.to_json,
|
auth_token:auth_token}.to_json,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json'
|
'Accept' => 'application/json; version=2'
|
||||||
},
|
},
|
||||||
:timeout => 10
|
:timeout => 10
|
||||||
)
|
)
|
||||||
@@ -399,7 +400,7 @@ class SalePayment < ApplicationRecord
|
|||||||
}.to_json,
|
}.to_json,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json'
|
'Accept' => 'application/json; version=2'
|
||||||
}, :timeout => 10)
|
}, :timeout => 10)
|
||||||
rescue Net::OpenTimeout
|
rescue Net::OpenTimeout
|
||||||
response = { "status": false , "message": "Connect To" }
|
response = { "status": false , "message": "Connect To" }
|
||||||
@@ -468,7 +469,7 @@ class SalePayment < ApplicationRecord
|
|||||||
}.to_json,
|
}.to_json,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json'
|
'Accept' => 'application/json; version=2'
|
||||||
}, :timeout => 10)
|
}, :timeout => 10)
|
||||||
rescue Net::OpenTimeout
|
rescue Net::OpenTimeout
|
||||||
response = { "status": false , "message": "Connect To" }
|
response = { "status": false , "message": "Connect To" }
|
||||||
|
|||||||
@@ -295,14 +295,14 @@ class ReceiptBillPdf < Prawn::Document
|
|||||||
total = total + res["balance"]
|
total = total + res["balance"]
|
||||||
#total redeem amount
|
#total redeem amount
|
||||||
if res["receipt_no"]== sale_data.receipt_no && res["status"]== "Redeem"
|
if res["receipt_no"]== sale_data.receipt_no && res["status"]== "Redeem"
|
||||||
redeem = redeem + res["redeem"]
|
redeem = redeem + res["withdraw"]
|
||||||
balance = balance + res["balance"]
|
balance = balance + res["balance"]
|
||||||
end
|
end
|
||||||
#end Total redem
|
#end Total redem
|
||||||
#total Rebate Earn
|
#total Rebate Earn
|
||||||
if res["receipt_no"]== sale_data.receipt_no && res["account_status"]== "RebateAccount" && res["status"]== "Rebate"
|
if res["receipt_no"]== sale_data.receipt_no && res["account_status"]== "RebateAccount" && res["status"]== "Rebate"
|
||||||
|
|
||||||
rebate_balance = rebate_balance + res["rebate"]
|
rebate_balance = rebate_balance + res["deposit"]
|
||||||
|
|
||||||
move_down 5
|
move_down 5
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
@@ -310,20 +310,20 @@ class ReceiptBillPdf < Prawn::Document
|
|||||||
text "Rebate Earn", :size => self.item_font_size,:align => :left
|
text "Rebate Earn", :size => self.item_font_size,:align => :left
|
||||||
end
|
end
|
||||||
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
|
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
|
||||||
text "#{number_with_precision(res["rebate"], :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right
|
text "#{number_with_precision(res["deposit"], :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
# Total Rebate Amount if birthday
|
# Total Rebate Amount if birthday
|
||||||
if res["receipt_no"]== sale_data.receipt_no && res["account_status"]== "RebateBonusAccount" && res["status"]== "Rebate"
|
if res["receipt_no"]== sale_data.receipt_no && res["account_status"]== "RebateBonusAccount" && res["status"]== "Rebate"
|
||||||
rebate_balance = rebate_balance + res["rebate"]
|
rebate_balance = rebate_balance + res["deposit"]
|
||||||
move_down 5
|
move_down 5
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
||||||
text "Rebate Earn Bonus", :size => self.item_font_size,:align => :left
|
text "Rebate Earn Bonus", :size => self.item_font_size,:align => :left
|
||||||
end
|
end
|
||||||
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
|
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
|
||||||
text "#{number_with_precision(res["rebate"], :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right
|
text "#{number_with_precision(res["deposit"], :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
#end Total rebate if birthday
|
#end Total rebate if birthday
|
||||||
|
|||||||
@@ -77,6 +77,11 @@
|
|||||||
<span><%= t :transactions %></span>
|
<span><%= t :transactions %></span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="ml-menu">
|
<ul class="ml-menu">
|
||||||
|
<% if can? :menage, Booking %>
|
||||||
|
<li>
|
||||||
|
<a href="<%= transactions_bookings_path %>"><%= t :bookings %></a>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
<% if can? :menage, Order %>
|
<% if can? :menage, Order %>
|
||||||
<li>
|
<li>
|
||||||
<a href="<%= transactions_orders_path %>"><%= t :orders %></a>
|
<a href="<%= transactions_orders_path %>"><%= t :orders %></a>
|
||||||
|
|||||||
@@ -83,17 +83,21 @@
|
|||||||
|
|
||||||
// OK button is clicked
|
// OK button is clicked
|
||||||
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
$('#from').val(date.format("DD-MM-YYYY"))
|
$('#from').val(date)
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
$('#to').val(date.format("DD-MM-YYYY"))
|
$('#to').val(date)
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
|
|
||||||
function 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 = 0;
|
||||||
var period_type = 1;
|
var period_type = 1;
|
||||||
|
|
||||||
|
|||||||
@@ -141,20 +141,21 @@
|
|||||||
|
|
||||||
// OK button is clicked
|
// OK button is clicked
|
||||||
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
$('#from').val(date.format("DD-MM-YYYY"))
|
$('#from').val(date)
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
$('#to').val(date.format("DD-MM-YYYY"))
|
$('#to').val(date)
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
|
|
||||||
function search_by_date(){
|
function search_by_date(){
|
||||||
|
|
||||||
var from = $('#from').val();
|
var to_date = new Date($('#to').val());
|
||||||
var to = $('#to').val();
|
var to = to_date.getDate() + "-" + to_date.getMonth() + "-" + to_date.getFullYear();
|
||||||
console.log(from);
|
var from_date = new Date($('#from').val());
|
||||||
console.log(to);
|
var from = from_date.getDate() + "-" + from_date.getMonth() + "-" + from_date.getFullYear();
|
||||||
|
|
||||||
var period = 0;
|
var period = 0;
|
||||||
var period_type = 1;
|
var period_type = 1;
|
||||||
if(to != '' && from != ''){
|
if(to != '' && from != ''){
|
||||||
|
|||||||
@@ -147,17 +147,21 @@
|
|||||||
|
|
||||||
// OK button is clicked
|
// OK button is clicked
|
||||||
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
$('#from').val(date.format("DD-MM-YYYY"))
|
$('#from').val(date)
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
$('#to').val(date.format("DD-MM-YYYY"))
|
$('#to').val(date)
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
|
|
||||||
function 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 = 0;
|
||||||
var period_type = 1;
|
var period_type = 1;
|
||||||
|
|
||||||
|
|||||||
@@ -211,17 +211,19 @@
|
|||||||
|
|
||||||
// OK button is clicked
|
// OK button is clicked
|
||||||
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
$('#from').val(date.format("DD-MM-YYYY"))
|
$('#from').val(date)
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
$('#to').val(date.format("DD-MM-YYYY"))
|
$('#to').val(date)
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
|
|
||||||
function search_by_date(){
|
function search_by_date(){
|
||||||
var from = $('#from').val();
|
var to_date = new Date($('#to').val());
|
||||||
var to = $('#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 = 0;
|
||||||
var period_type = 1;
|
var period_type = 1;
|
||||||
|
|
||||||
|
|||||||
@@ -145,18 +145,21 @@
|
|||||||
|
|
||||||
// OK button is clicked
|
// OK button is clicked
|
||||||
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
console.log(date);
|
$('#from').val(date)
|
||||||
$('#from').val(date.format("DD-MM-YYYY"))
|
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
$('#to').val(date.format("DD-MM-YYYY"))
|
$('#to').val(date)
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
|
|
||||||
function 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 = 0;
|
||||||
var period_type = 1;
|
var period_type = 1;
|
||||||
|
|
||||||
|
|||||||
@@ -105,17 +105,19 @@
|
|||||||
|
|
||||||
// OK button is clicked
|
// OK button is clicked
|
||||||
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
$('#from').val(date.format("DD-MM-YYYY"))
|
$('#from').val(date)
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
$('#to').val(date.format("DD-MM-YYYY"))
|
$('#to').val(date)
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
|
|
||||||
function search_by_date(){
|
function search_by_date(){
|
||||||
var from = $('#from').val();
|
var to_date = new Date($('#to').val());
|
||||||
var to = $('#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 = 0;
|
||||||
var period_type = 1;
|
var period_type = 1;
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ en:
|
|||||||
top: "Top"
|
top: "Top"
|
||||||
orders: "Orders"
|
orders: "Orders"
|
||||||
credit: "Credit"
|
credit: "Credit"
|
||||||
|
bookings: "Booking"
|
||||||
home: "Home"
|
home: "Home"
|
||||||
simple_menu_item: "Simple Menu Item"
|
simple_menu_item: "Simple Menu Item"
|
||||||
set_menu_item: "Set Menu Item"
|
set_menu_item: "Set Menu Item"
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ mm:
|
|||||||
hourly: "နာရီအလိုက်"
|
hourly: "နာရီအလိုက်"
|
||||||
top: "အရောင်းရဆုံး"
|
top: "အရောင်းရဆုံး"
|
||||||
orders: "အော်ဒါများ"
|
orders: "အော်ဒါများ"
|
||||||
|
bookings: "အော်ဒါများ"
|
||||||
credit: "အကြွေး"
|
credit: "အကြွေး"
|
||||||
home: "မူလစာမျက်နှာ"
|
home: "မူလစာမျက်နှာ"
|
||||||
simple_menu_item: "ဟင်းလျာများ"
|
simple_menu_item: "ဟင်းလျာများ"
|
||||||
|
|||||||
@@ -251,4 +251,4 @@ zone_queue_station1 = OrderQueueProcessByZone.create({order_queue_station: order
|
|||||||
zone_queue_station2 = OrderQueueProcessByZone.create({order_queue_station: order_queue_station2, zone: zone2})
|
zone_queue_station2 = OrderQueueProcessByZone.create({order_queue_station: order_queue_station2, zone: zone2})
|
||||||
zone_queue_station3 = OrderQueueProcessByZone.create({order_queue_station: zone_order_queue_station, zone: zone3})
|
zone_queue_station3 = OrderQueueProcessByZone.create({order_queue_station: zone_order_queue_station, zone: zone3})
|
||||||
|
|
||||||
puts " Finished System Default Set Up Data "
|
puts " Finished System Default Set Up Data vWSsseoZCzxd6xcNf_uS RxzaYyAGzm7VqAZ4hKnv "
|
||||||
|
|||||||
Reference in New Issue
Block a user