From 28dbb75774ae74114c3b236a32083368f85bbd45 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Tue, 14 Nov 2017 18:30:57 +0630 Subject: [PATCH 1/3] update rebate and update api --- app/controllers/crm/customers_controller.rb | 6 ++--- .../origami/discounts_controller.rb | 7 ++--- .../origami/payments_controller.rb | 5 ++-- app/controllers/origami/voucher_controller.rb | 2 +- app/models/customer.rb | 26 +++++++++++-------- app/models/sale_payment.rb | 13 +++++----- app/pdf/receipt_bill_pdf.rb | 10 +++---- db/seeds.rb | 2 +- 8 files changed, 39 insertions(+), 32 deletions(-) diff --git a/app/controllers/crm/customers_controller.rb b/app/controllers/crm/customers_controller.rb index 2a0626dd..a95194fe 100755 --- a/app/controllers/crm/customers_controller.rb +++ b/app/controllers/crm/customers_controller.rb @@ -137,7 +137,7 @@ class Crm::CustomersController < BaseCrmController :body => member_params, :headers => { 'Content-Type' => 'application/json', - 'Accept' => 'application/json' + 'Accept' => 'application/json; version=2' }, :timeout => 10 ) @@ -260,7 +260,7 @@ end :body => member_params, :headers => { 'Content-Type' => 'application/json', - 'Accept' => 'application/json' + 'Accept' => 'application/json; version=2' }, :timeout => 10 ) @@ -317,7 +317,7 @@ end :body => member_params, :headers => { 'Content-Type' => 'application/json', - 'Accept' => 'application/json' + 'Accept' => 'application/json; version=2' }, :timeout => 10 ) diff --git a/app/controllers/origami/discounts_controller.rb b/app/controllers/origami/discounts_controller.rb index d5ea194f..82e878bd 100755 --- a/app/controllers/origami/discounts_controller.rb +++ b/app/controllers/origami/discounts_controller.rb @@ -199,7 +199,7 @@ class Origami::DiscountsController < BaseOrigamiController auth_token:auth_token}.to_json, :headers => { 'Content-Type' => 'application/json', - 'Accept' => 'application/json' + 'Accept' => 'application/json; version=2' }, :timeout => 10) rescue HTTParty::Error response = {"status": false, "message": "Can't open membership server " } @@ -215,7 +215,8 @@ class Origami::DiscountsController < BaseOrigamiController else response = {"status": false, "message": "You have no selected discount item" } end - + puts "discount" + puts response.to_json # Re-calc All Amount in Sale if response["status"] == true discount_amount = response["discount_earned"] @@ -229,7 +230,7 @@ class Origami::DiscountsController < BaseOrigamiController else result = {:status=> response["message"],:title=>"Alert", :table_id => table_id,:table_type => table_type } end - + render :json => result.to_json end #end Is Card Payment diff --git a/app/controllers/origami/payments_controller.rb b/app/controllers/origami/payments_controller.rb index 0ef1c1a5..428dc322 100755 --- a/app/controllers/origami/payments_controller.rb +++ b/app/controllers/origami/payments_controller.rb @@ -81,7 +81,7 @@ class Origami::PaymentsController < BaseOrigamiController # get member information rebate = MembershipSetting.find_by_rebate(1) if customer.membership_id != nil && rebate - member_info = Customer.get_member_account(customer) + member_info = Customer.get_member_account(customer) rebate_amount = Customer.get_membership_transactions(customer,saleObj.receipt_no) end @@ -127,8 +127,9 @@ class Origami::PaymentsController < BaseOrigamiController # get member information if @customer.membership_id != nil && rebate response = Customer.get_member_account(@customer) + puts response.to_json if response["status"]==true - response["data"].each do |res| + response["account_data"].each do |res| if res["accountable_type"] == "RebateAccount" || res["accountable_type"] == "RebatebonusAccount" @balance += res["balance"] # @accountable_type = res["accountable_type"] diff --git a/app/controllers/origami/voucher_controller.rb b/app/controllers/origami/voucher_controller.rb index f71bcf4c..421c31a0 100755 --- a/app/controllers/origami/voucher_controller.rb +++ b/app/controllers/origami/voucher_controller.rb @@ -45,7 +45,7 @@ class Origami::VoucherController < BaseOrigamiController }.to_json, :headers => { 'Content-Type' => 'application/json', - 'Accept' => 'application/json' + 'Accept' => 'application/json; version=2' }, :timeout => 10 ) rescue Net::OpenTimeout diff --git a/app/models/customer.rb b/app/models/customer.rb index 9e629721..82761ba7 100755 --- a/app/models/customer.rb +++ b/app/models/customer.rb @@ -23,13 +23,17 @@ class Customer < ApplicationRecord # urltest =self.url_exist?(url) begin - response = HTTParty.get(url, :body => { membership_id: customer.membership_id,merchant_uid:merchant_uid,auth_token:auth_token}.to_json, - :headers => { - 'Content-Type' => 'application/json', - 'Accept' => 'application/json' - }, - :timeout => 10 - ) + response = HTTParty.get(url, :body => { + membership_id: customer.membership_id, + merchant_uid:merchant_uid, + type: "summary", + auth_token:auth_token + }.to_json, + :headers => { + 'Content-Type' => 'application/json', + 'Accept' => 'application/json; version=2' + }, + :timeout => 10) rescue HTTParty::Error response = {status: false, message: "Server Error"} @@ -63,7 +67,7 @@ class Customer < ApplicationRecord }.to_json, :headers => { 'Content-Type' => 'application/json', - 'Accept' => 'application/json' + 'Accept' => 'application/json; version=2' }, :timeout => 10 ) @@ -116,7 +120,7 @@ class Customer < ApplicationRecord :body => member_params, :headers => { 'Content-Type' => 'application/json', - 'Accept' => 'application/json' + 'Accept' => 'application/json; version=2' }) rescue Net::OpenTimeout response = { status: false, message: "Server Time out" } @@ -183,7 +187,7 @@ class Customer < ApplicationRecord receipt_no: receipt_no,auth_token:auth_token}.to_json, :headers => { 'Content-Type' => 'application/json', - 'Accept' => 'application/json' + 'Accept' => 'application/json; version=2' }, :timeout => 10) rescue Net::OpenTimeout response = { "status": false , "message": "Connect To" } @@ -215,7 +219,7 @@ class Customer < ApplicationRecord }.to_json, :headers => { 'Content-Type' => 'application/json', - 'Accept' => 'application/json' + 'Accept' => 'application/json; version=2' }, :timeout => 10 ) diff --git a/app/models/sale_payment.rb b/app/models/sale_payment.rb index 5f97bcfc..b4b29303 100755 --- a/app/models/sale_payment.rb +++ b/app/models/sale_payment.rb @@ -85,7 +85,7 @@ class SalePayment < ApplicationRecord }.to_json, :headers => { 'Content-Type' => 'application/json', - 'Accept' => 'application/json' + 'Accept' => 'application/json; version=2' }, :timeout => 10 ) rescue Net::OpenTimeout @@ -120,17 +120,18 @@ class SalePayment < ApplicationRecord # Control for Paypar Cloud begin response = HTTParty.post(url, - :body => { generic_customer_id:membership_id, + :body => { membership_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, + account_no:"", + merchant_uid:merchant_uid, auth_token:auth_token}.to_json, :headers => { 'Content-Type' => 'application/json', - 'Accept' => 'application/json' + 'Accept' => 'application/json; version=2' }, :timeout => 10 ) @@ -399,7 +400,7 @@ class SalePayment < ApplicationRecord }.to_json, :headers => { 'Content-Type' => 'application/json', - 'Accept' => 'application/json' + 'Accept' => 'application/json; version=2' }, :timeout => 10) rescue Net::OpenTimeout response = { "status": false , "message": "Connect To" } @@ -468,7 +469,7 @@ class SalePayment < ApplicationRecord }.to_json, :headers => { 'Content-Type' => 'application/json', - 'Accept' => 'application/json' + 'Accept' => 'application/json; version=2' }, :timeout => 10) rescue Net::OpenTimeout response = { "status": false , "message": "Connect To" } diff --git a/app/pdf/receipt_bill_pdf.rb b/app/pdf/receipt_bill_pdf.rb index cb53c5f6..8f47b4fe 100755 --- a/app/pdf/receipt_bill_pdf.rb +++ b/app/pdf/receipt_bill_pdf.rb @@ -295,14 +295,14 @@ class ReceiptBillPdf < Prawn::Document total = total + res["balance"] #total redeem amount if res["receipt_no"]== sale_data.receipt_no && res["status"]== "Redeem" - redeem = redeem + res["redeem"] + redeem = redeem + res["withdraw"] balance = balance + res["balance"] end #end Total redem #total Rebate Earn 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 y_position = cursor @@ -310,20 +310,20 @@ class ReceiptBillPdf < Prawn::Document text "Rebate Earn", :size => self.item_font_size,:align => :left end 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 # Total Rebate Amount if birthday 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 y_position = cursor 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 end 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 Total rebate if birthday diff --git a/db/seeds.rb b/db/seeds.rb index 4936982f..545cce58 100755 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -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_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 " From de3f2e5e9032a71db0c7f389c0c69307cbefd12c Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Wed, 15 Nov 2017 09:44:52 +0630 Subject: [PATCH 2/3] clear buttom in datepickere --- app/views/reports/credit_payment/index.html.erb | 12 ++++++++---- app/views/reports/payment_method/index.html.erb | 13 +++++++------ app/views/reports/receipt_no/index.html.erb | 12 ++++++++---- app/views/reports/saleitem/index.html.erb | 10 ++++++---- app/views/reports/shiftsale/index.html.erb | 13 ++++++++----- app/views/reports/void_sale/index.html.erb | 10 ++++++---- 6 files changed, 43 insertions(+), 27 deletions(-) diff --git a/app/views/reports/credit_payment/index.html.erb b/app/views/reports/credit_payment/index.html.erb index 2eed1622..8becb13c 100755 --- a/app/views/reports/credit_payment/index.html.erb +++ b/app/views/reports/credit_payment/index.html.erb @@ -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; diff --git a/app/views/reports/payment_method/index.html.erb b/app/views/reports/payment_method/index.html.erb index 40036a37..fa32f91c 100755 --- a/app/views/reports/payment_method/index.html.erb +++ b/app/views/reports/payment_method/index.html.erb @@ -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 != ''){ diff --git a/app/views/reports/receipt_no/index.html.erb b/app/views/reports/receipt_no/index.html.erb index 32d4df12..76756e0f 100755 --- a/app/views/reports/receipt_no/index.html.erb +++ b/app/views/reports/receipt_no/index.html.erb @@ -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; diff --git a/app/views/reports/saleitem/index.html.erb b/app/views/reports/saleitem/index.html.erb index 587d7c52..8fc915c9 100755 --- a/app/views/reports/saleitem/index.html.erb +++ b/app/views/reports/saleitem/index.html.erb @@ -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; diff --git a/app/views/reports/shiftsale/index.html.erb b/app/views/reports/shiftsale/index.html.erb index d8d814b8..09a238d3 100755 --- a/app/views/reports/shiftsale/index.html.erb +++ b/app/views/reports/shiftsale/index.html.erb @@ -145,18 +145,21 @@ // OK button is clicked $('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){ - console.log(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; diff --git a/app/views/reports/void_sale/index.html.erb b/app/views/reports/void_sale/index.html.erb index 3b240c2d..2302e373 100755 --- a/app/views/reports/void_sale/index.html.erb +++ b/app/views/reports/void_sale/index.html.erb @@ -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; From 1c0a93d56d3ad042b38833786c83a677f7b02f8c Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Wed, 15 Nov 2017 12:02:02 +0630 Subject: [PATCH 3/3] update pagination and booking and rebate redeem --- app/assets/stylesheets/application.scss | 31 ++++++++++++++++++++- app/controllers/crm/customers_controller.rb | 29 ++++++++++++++----- app/models/ability.rb | 3 +- app/models/customer.rb | 7 +++-- app/views/layouts/_left_sidebar.html.erb | 5 ++++ config/locales/en.yml | 1 + config/locales/mm.yml | 1 + 7 files changed, 65 insertions(+), 12 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index b7bcb027..9caef6fe 100755 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -63,4 +63,33 @@ select:focus { border-top: .375em solid #111; pointer-events: none; } -} \ No newline at end of file +} + +/*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; + +} diff --git a/app/controllers/crm/customers_controller.rb b/app/controllers/crm/customers_controller.rb index a95194fe..d8ee10fb 100755 --- a/app/controllers/crm/customers_controller.rb +++ b/app/controllers/crm/customers_controller.rb @@ -241,9 +241,10 @@ end url = membership.gateway_url.to_s + memberaction.gateway_url.to_s member_params = { name: name,phone: phone,email: email, - dob: dob,address: address,nrc:nrc,card_no:card_no, - member_group_id: member_group_id, - merchant_uid:merchant_uid,auth_token:auth_token}.to_json + dob: dob,address: address,nrc:nrc,card_no:card_no, + member_group_id: member_group_id, + id:id, + merchant_uid:merchant_uid,auth_token:auth_token}.to_json # Check for paypar account exists # if paypar_account_no != nil || paypar_account_no != '' @@ -252,6 +253,7 @@ end dob: dob,address: address,nrc:nrc,card_no:card_no, paypar_account_no: paypar_account_no, member_group_id: member_group_id, + id:id, merchant_uid:merchant_uid,auth_token:auth_token}.to_json end @@ -273,7 +275,8 @@ end rescue SocketError response = { status: false} end - + puts "ssssssss" + puts response.to_json customer = Customer.find(@crm_customer.customer_id) if response["status"] == true @@ -299,9 +302,10 @@ end url = membership.gateway_url.to_s + memberaction.gateway_url.to_s member_params = { name: name,phone: phone,email: email, - dob: dob,address: address,nrc:nrc,card_no:card_no, - member_group_id: member_group_id, - merchant_uid:merchant_uid,auth_token:auth_token}.to_json + dob: dob,address: address,nrc:nrc,card_no:card_no, + member_group_id: member_group_id, + id:id, + merchant_uid:merchant_uid,auth_token:auth_token}.to_json # Check for paypar account exists if paypar_account_no.present? @@ -309,6 +313,7 @@ end dob: dob,address: address,nrc:nrc,card_no:card_no, paypar_account_no: paypar_account_no, member_group_id: member_group_id, + id:id, merchant_uid:merchant_uid,auth_token:auth_token}.to_json end @@ -331,7 +336,17 @@ end response = { status: false} end + puts "ssssssss" + puts response.to_json + 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.json { render :show, status: :ok, location: @crm_customer } else diff --git a/app/models/ability.rb b/app/models/ability.rb index 1636d048..70ce4e94 100755 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -32,6 +32,7 @@ class Ability can :manage, Order + can :manage, Booking can :manage, Sale @@ -84,7 +85,7 @@ class Ability can :read, Order can :update, Order - + can :menage, Booking can :read, Sale can :update, Sale can :get_customer, Customer diff --git a/app/models/customer.rb b/app/models/customer.rb index 82761ba7..13e6c277 100755 --- a/app/models/customer.rb +++ b/app/models/customer.rb @@ -95,7 +95,7 @@ class Customer < ApplicationRecord auth_token = memberaction.auth_token.to_s url = membership.gateway_url.to_s + memberaction.gateway_url.to_s - @customers = Customer.where("membership_type IS NOT NULL AND membership_id IS NULL") + @customers = Customer.where("membership_type IS NOT NULL AND membership_id IS NULL") @customers.each do |customer| member_params = { name: customer.name,phone: customer.contact_no, @@ -106,7 +106,7 @@ class Customer < ApplicationRecord # Check for paypar account exists # 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, email: customer.email,dob: customer.date_of_birth, address: customer.address,nrc:customer.nrc_no, @@ -131,7 +131,6 @@ class Customer < ApplicationRecord rescue SocketError response = { status: false, message: "Can't connect server"} end - if response["status"] == true status = customer.update_attributes(membership_id: response["customer_datas"]["id"]) end @@ -165,10 +164,12 @@ class Customer < ApplicationRecord credit = 1 end end + # overall_dis = SaleItem.get_overall_discount(sObj.id) overall_dis = sObj.total_discount total_amount = rebate_prices - payparcost - overall_dis + if credit == 1 total_amount = 0 end diff --git a/app/views/layouts/_left_sidebar.html.erb b/app/views/layouts/_left_sidebar.html.erb index fb326c24..25b196af 100755 --- a/app/views/layouts/_left_sidebar.html.erb +++ b/app/views/layouts/_left_sidebar.html.erb @@ -77,6 +77,11 @@ <%= t :transactions %>
    + <% if can? :menage, Booking %> +
  • + <%= t :bookings %> +
  • + <% end %> <% if can? :menage, Order %>
  • <%= t :orders %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 907da5f9..69f0904c 100755 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -29,6 +29,7 @@ en: top: "Top" orders: "Orders" credit: "Credit" + bookings: "Booking" home: "Home" simple_menu_item: "Simple Menu Item" set_menu_item: "Set Menu Item" diff --git a/config/locales/mm.yml b/config/locales/mm.yml index 097b1861..d103a5c0 100755 --- a/config/locales/mm.yml +++ b/config/locales/mm.yml @@ -28,6 +28,7 @@ mm: hourly: "နာရီအလိုက်" top: "အရောင်းရဆုံး" orders: "အော်ဒါများ" + bookings: "အော်ဒါများ" credit: "အကြွေး" home: "မူလစာမျက်နှာ" simple_menu_item: "ဟင်းလျာများ"