diff --git a/app/controllers/crm/customers_controller.rb b/app/controllers/crm/customers_controller.rb index fdeb6fe1..51ddc9eb 100755 --- a/app/controllers/crm/customers_controller.rb +++ b/app/controllers/crm/customers_controller.rb @@ -74,7 +74,7 @@ class Crm::CustomersController < BaseCrmController @response = Customer.get_membership_transactions(@customer) Rails.logger.debug "get membership transactions response" - Rails.logger.debug response.to_json + Rails.logger.debug @response.to_json # @response = "" #end customer amount diff --git a/app/controllers/origami/addorders_controller.rb b/app/controllers/origami/addorders_controller.rb index 8098dfe9..d283b06e 100755 --- a/app/controllers/origami/addorders_controller.rb +++ b/app/controllers/origami/addorders_controller.rb @@ -43,6 +43,17 @@ class Origami::AddordersController < ApplicationController#BaseOrigamiController MenuCategory.current_menu 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() @product = Product.all diff --git a/app/controllers/origami/discounts_controller.rb b/app/controllers/origami/discounts_controller.rb index 59de9f6d..e0739e88 100755 --- a/app/controllers/origami/discounts_controller.rb +++ b/app/controllers/origami/discounts_controller.rb @@ -29,8 +29,6 @@ class Origami::DiscountsController < BaseOrigamiController # sale.grand_total = (sub_total.to_f - overall_discount.to_f) + sale.total_tax; # sale.save if discount_items.length > 0 - puts discount_items.to_json - puts "dddddddddddd" #save sale item for discount discount_items.each do |di| diff --git a/app/models/dining_facility.rb b/app/models/dining_facility.rb index 1b245b24..9948ec48 100755 --- a/app/models/dining_facility.rb +++ b/app/models/dining_facility.rb @@ -78,13 +78,13 @@ class DiningFacility < ApplicationRecord def get_checkout_booking booking = self.get_current_checkout_booking if booking - now = Time.now.utc + now = Time.now.utc.getlocal hr = (now.strftime("%H").to_i).to_int min = (now.strftime("%M").to_i).to_int if !booking.checkout_at.nil? - checkout_at = booking.checkout_at.utc - checkout_at_hr = (checkout_at.utc.strftime("%H").to_i).to_int - checkout_at_min = (checkout_at.utc.strftime("%M").to_i).to_int + checkout_at = booking.checkout_at.utc.getlocal + checkout_at_hr = (checkout_at.strftime("%H").to_i).to_int + checkout_at_min = (checkout_at.strftime("%M").to_i).to_int checkout_at_min -= min if (checkout_at_hr <= hr) && (checkout_at_min <= 15) return booking diff --git a/app/pdf/receipt_bill_pdf.rb b/app/pdf/receipt_bill_pdf.rb index a62e7b90..c48dfa7f 100755 --- a/app/pdf/receipt_bill_pdf.rb +++ b/app/pdf/receipt_bill_pdf.rb @@ -294,6 +294,7 @@ class ReceiptBillPdf < Prawn::Document balance = 0 rebate_balance =0 redeem = 0 + redeem_count = 0 rebate_amount["data"].each do |res| total = total + res["balance"] #total redeem amount @@ -318,7 +319,7 @@ class ReceiptBillPdf < Prawn::Document end # 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"] move_down 5 y_position = cursor @@ -332,20 +333,22 @@ class ReceiptBillPdf < Prawn::Document #end Total rebate if birthday end - move_down 5 + move_down 5 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 "Redeem Amount", :size => self.item_font_size,:align => :left - end + end bounding_box([self.item_description_width,y_position], :width =>self.label_width) do text "#{number_with_precision(redeem, :precision => precision.to_i, :delimiter => delimiter)}", :size => self.item_font_size,:align => :right - end + end if redeem == 0 old = total - rebate_balance else - old = balance + redeem + # if redeem_count == 0 + old = balance + redeem + # end end move_down 5 diff --git a/app/views/origami/addorders/get_menu_sub_category.json.jbuilder b/app/views/origami/addorders/get_menu_sub_category.json.jbuilder new file mode 100644 index 00000000..d391e4c5 --- /dev/null +++ b/app/views/origami/addorders/get_menu_sub_category.json.jbuilder @@ -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 diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index 780ace0b..6d83f852 100755 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -132,7 +132,11 @@
<% end %> ORDER DETAILS | Table <%= @dining.name rescue "" %> - Checkin Time : <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> + <% if @booking.checkout_by.nil? && !@booking.reserved_by.nil? && %> + <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> - <%= @booking.checkout_at.utc.getlocal.strftime("%I:%M %p") %> + <% else %> + Checkin Time : <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> + <% end %>
<% elsif @status_sale == 'sale' %>
INVOICE DETAILS | Table <%= @dining.name rescue "" %> diff --git a/app/views/origami/rooms/show.html.erb b/app/views/origami/rooms/show.html.erb index 0b65eae4..aee41b77 100755 --- a/app/views/origami/rooms/show.html.erb +++ b/app/views/origami/rooms/show.html.erb @@ -132,12 +132,20 @@
<% if @status_order == 'order' %>
ORDER DETAILS | Table <%= @room.name rescue "" %> - Checkin Time : <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> + <% if @booking.checkout_by.nil? && !@booking.reserved_by.nil? && %> + <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> - <%= @booking.checkout_at.utc.getlocal.strftime("%I:%M %p") %> + <% else %> + Checkin Time : <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> + <% end %>
<% elsif @status_sale == 'sale' %>
INVOICE DETAILS | Table <%= @room.name rescue "" %> - Checkin Time : <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> + <% if @booking.checkout_by.nil? && !@booking.reserved_by.nil? && %> + <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> - <%= @booking.checkout_at.utc.getlocal.strftime("%I:%M %p") %> + <% else %> + Checkin Time : <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> + <% end %>
<% end %> diff --git a/app/views/reports/dailysale/_shift_sale_report_filter.html.erb b/app/views/reports/dailysale/_shift_sale_report_filter.html.erb index e584bbba..d3afcbfe 100755 --- a/app/views/reports/dailysale/_shift_sale_report_filter.html.erb +++ b/app/views/reports/dailysale/_shift_sale_report_filter.html.erb @@ -24,11 +24,11 @@
- +
- +

diff --git a/app/views/reports/receipt_no/_shift_sale_report_filter.html.erb b/app/views/reports/receipt_no/_shift_sale_report_filter.html.erb index 2534eba0..a1db6824 100755 --- a/app/views/reports/receipt_no/_shift_sale_report_filter.html.erb +++ b/app/views/reports/receipt_no/_shift_sale_report_filter.html.erb @@ -27,15 +27,15 @@
- +
- +
-
diff --git a/app/views/reports/saleitem/_shift_sale_report_filter.html.erb b/app/views/reports/saleitem/_shift_sale_report_filter.html.erb index c913b592..88f26c1f 100755 --- a/app/views/reports/saleitem/_shift_sale_report_filter.html.erb +++ b/app/views/reports/saleitem/_shift_sale_report_filter.html.erb @@ -22,11 +22,11 @@
- +
- +
diff --git a/app/views/reports/shiftsale/_shift_sale_report_filter.html.erb b/app/views/reports/shiftsale/_shift_sale_report_filter.html.erb index f1a07e33..b519adf9 100755 --- a/app/views/reports/shiftsale/_shift_sale_report_filter.html.erb +++ b/app/views/reports/shiftsale/_shift_sale_report_filter.html.erb @@ -22,15 +22,15 @@
- +
- +
-

diff --git a/app/views/reports/stock_check/_stock_check_report_filter.html.erb b/app/views/reports/stock_check/_stock_check_report_filter.html.erb index a058d442..4be0bf46 100755 --- a/app/views/reports/stock_check/_stock_check_report_filter.html.erb +++ b/app/views/reports/stock_check/_stock_check_report_filter.html.erb @@ -14,11 +14,11 @@
- +
- +
diff --git a/app/views/settings/membership_actions/_form.html.erb b/app/views/settings/membership_actions/_form.html.erb index b2524a1c..d1a3133b 100755 --- a/app/views/settings/membership_actions/_form.html.erb +++ b/app/views/settings/membership_actions/_form.html.erb @@ -22,10 +22,25 @@
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod - tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, - quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse +
view_headline <%= t("views.right_panel.header.page_detail") %>
+

+ 1) <%= t("views.right_panel.detail.membership_type") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.membership_type_txt") %> <%= t("views.right_panel.detail.name_txt2") %>
+ 2) <%= t("views.right_panel.detail.is_active") %> - <%= t("views.right_panel.detail.checkbox") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.is_active_txt") %>
+ 3) <%= t("views.right_panel.detail.gateway_communication_type") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.gateway_communication_type_txt") %>
+ 4) <%= t("views.right_panel.detail.gateway_url") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.gateway_url_txt") %>
+ 5) <%= t("views.right_panel.detail.auth_token") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.auth_token_txt") %>
+ 6) <%= t("views.right_panel.detail.merchant_account") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.merchant_account_txt") %>
+ 7) <%= t("views.right_panel.detail.created_by") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.created_by_txt") %>
+

+
list <%= t("views.right_panel.header.button_lists") %>
+

+ 1) <%= t("views.right_panel.button.submit") %> - <%= t("views.right_panel.detail.submit_btn_txt") %> <%= t("views.right_panel.detail.membership_actions_txt") %>
+

+
list <%= t("views.right_panel.header.link_lists") %>
+

+ 1) <%= t("views.right_panel.button.home") %> - <%= t("views.right_panel.detail.home_txt") %>
+ 2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.membership_actions_txt") %>
+

diff --git a/app/views/settings/membership_actions/edit.html.erb b/app/views/settings/membership_actions/edit.html.erb index 10da5370..c804ee06 100755 --- a/app/views/settings/membership_actions/edit.html.erb +++ b/app/views/settings/membership_actions/edit.html.erb @@ -1,9 +1,9 @@