update crm addore
This commit is contained in:
@@ -74,7 +74,7 @@ class Crm::CustomersController < BaseCrmController
|
|||||||
@response = Customer.get_membership_transactions(@customer)
|
@response = Customer.get_membership_transactions(@customer)
|
||||||
|
|
||||||
Rails.logger.debug "get membership transactions response"
|
Rails.logger.debug "get membership transactions response"
|
||||||
Rails.logger.debug response.to_json
|
Rails.logger.debug @response.to_json
|
||||||
# @response = ""
|
# @response = ""
|
||||||
#end customer amount
|
#end customer amount
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ class Origami::AddordersController < ApplicationController#BaseOrigamiController
|
|||||||
|
|
||||||
def detail
|
def detail
|
||||||
@menu = MenuCategory.all.active
|
@menu = MenuCategory.all.active
|
||||||
#@menu = MenuCategory.where("menu_category_id is NULL").active
|
|
||||||
@table_id = params[:id]
|
@table_id = params[:id]
|
||||||
@table = DiningFacility.find(@table_id)
|
@table = DiningFacility.find(@table_id)
|
||||||
@booking = @table.get_booking
|
@booking = @table.get_booking
|
||||||
@@ -45,6 +44,17 @@ class Origami::AddordersController < ApplicationController#BaseOrigamiController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def get_menu_sub_category ()
|
||||||
|
id = params[:id]
|
||||||
|
if (id)
|
||||||
|
#Pull this menu
|
||||||
|
@sub_menu = MenuCategory.where("menu_category_id = #{id}").active
|
||||||
|
# puts @menu.menu_items[1].item_attributes.to_json
|
||||||
|
return @sub_menu
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def get_all_product()
|
def get_all_product()
|
||||||
@product = Product.all
|
@product = Product.all
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -294,6 +294,7 @@ class ReceiptBillPdf < Prawn::Document
|
|||||||
balance = 0
|
balance = 0
|
||||||
rebate_balance =0
|
rebate_balance =0
|
||||||
redeem = 0
|
redeem = 0
|
||||||
|
redeem_count = 0
|
||||||
rebate_amount["data"].each do |res|
|
rebate_amount["data"].each do |res|
|
||||||
total = total + res["balance"]
|
total = total + res["balance"]
|
||||||
#total redeem amount
|
#total redeem amount
|
||||||
@@ -318,7 +319,7 @@ class ReceiptBillPdf < Prawn::Document
|
|||||||
|
|
||||||
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["deposit"]
|
rebate_balance = rebate_balance + res["deposit"]
|
||||||
move_down 5
|
move_down 5
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
@@ -345,7 +346,9 @@ class ReceiptBillPdf < Prawn::Document
|
|||||||
if redeem == 0
|
if redeem == 0
|
||||||
old = total - rebate_balance
|
old = total - rebate_balance
|
||||||
else
|
else
|
||||||
|
# if redeem_count == 0
|
||||||
old = balance + redeem
|
old = balance + redeem
|
||||||
|
# end
|
||||||
end
|
end
|
||||||
|
|
||||||
move_down 5
|
move_down 5
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
if @sub_menu
|
||||||
|
json.sub_category @sub_menu.each do |sub_cat|
|
||||||
|
json.id sub_cat.id
|
||||||
|
json.code sub_cat.code
|
||||||
|
json.name sub_cat.name
|
||||||
|
json.menu_id sub_cat.menu_id
|
||||||
|
json.menu_category_id sub_cat.menu_category_id
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -189,6 +189,7 @@ scope "(:locale)", locale: /en|mm/ do
|
|||||||
post '/:id/create_survey' => "surveys#create", :as => "create_surveys"
|
post '/:id/create_survey' => "surveys#create", :as => "create_surveys"
|
||||||
|
|
||||||
get '/addorders/get_menu_category/:id' => "addorders#get_menu_category",:as => "get_menu_category", :defaults => { :format => 'json' }
|
get '/addorders/get_menu_category/:id' => "addorders#get_menu_category",:as => "get_menu_category", :defaults => { :format => 'json' }
|
||||||
|
get '/addorders/get_menu_sub_category/:id' => "addorders#get_menu_sub_category",:as => "get_menu_sub_category", :defaults => { :format => 'json' }
|
||||||
get '/addorders/products/list' => "addorders#get_all_product",:as => "get_all_product", :defaults => { :format => 'json' }
|
get '/addorders/products/list' => "addorders#get_all_product",:as => "get_all_product", :defaults => { :format => 'json' }
|
||||||
|
|
||||||
get '/:addorders/:id' => "addorders#detail"
|
get '/:addorders/:id' => "addorders#detail"
|
||||||
|
|||||||
Reference in New Issue
Block a user