diff --git a/app/assets/stylesheets/origami.scss b/app/assets/stylesheets/origami.scss index 5e361f7e..1ea32844 100644 --- a/app/assets/stylesheets/origami.scss +++ b/app/assets/stylesheets/origami.scss @@ -33,6 +33,10 @@ // cursor:pointer; } +.del_cashier_number{ + opacity:0.6, +} + .pay{ width: 98%; height:211px; diff --git a/app/models/order.rb b/app/models/order.rb index c1dfec43..9a1afe5d 100644 --- a/app/models/order.rb +++ b/app/models/order.rb @@ -243,7 +243,7 @@ class Order < ApplicationRecord .joins("left join orders on orders.order_id = booking_orders.order_id") .joins("left join sales on sales.sale_id = bookings.sale_id") .where("sales.sale_status='completed'") - .group("bookings.booking_id,sales.receipt_no,orders.status,sales.sale_id,dining_facilities.name,orders.status,orders.order_id") + .group("bookings.booking_id,sales.receipt_no,orders.status,sales.sale_id,dining_facilities.name,orders.status,orders.order_id") end #Origami: Cashier : to view order type Room diff --git a/app/models/sale_payment.rb b/app/models/sale_payment.rb index ffe881e6..526ef03c 100644 --- a/app/models/sale_payment.rb +++ b/app/models/sale_payment.rb @@ -84,17 +84,22 @@ class SalePayment < ApplicationRecord url = paypar_url.to_s + membership_actions_data.gateway_url.to_s merchant_uid = membership_actions_data.merchant_account_id campaign_type_id = membership_actions_data.additional_parameter["campaign_type_id"] - response = HTTParty.post(url, - :body => { generic_customer_id:membership_id,redeem_amount:received_amount,receipet_no:sale_id,campaign_type_id:campaign_type_id,account_no:"",merchant_uid:merchant_uid}.to_json, + sale_data = Sale.find_by_sale_id(sale_id) + if sale_data + 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}.to_json, :headers => { 'Content-Type' => 'application/json', 'Accept' => 'application/json' } ) + else + response = false; + end + else response =false; end - puts response.to_json return response; end diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 33938b95..4a74c7b1 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -18,6 +18,7 @@
  • <%= link_to "Cashier Terminals ", settings_cashier_terminals_path, :tabindex =>"-1" %>
  • <%= link_to "Employees", settings_employees_path, :tabindex =>"-1" %>
  • <%= link_to "Membership Setting",settings_membership_settings_path, :tabindex =>"-1" %>
  • +
  • <%= link_to "Membership Action",settings_membership_actions_path, :tabindex =>"-1" %>
  • <%= link_to "Payment Method", settings_payment_method_settings_path, :tabindex =>"-1" %>
  • <%= link_to "Tax Profile", settings_tax_profiles_path, :tabindex =>"-1" %>
  • <%= link_to "Print Setting", print_settings_path, :tabindex =>"-1" %>
  • diff --git a/app/views/origami/paypar_payments/index.html.erb b/app/views/origami/paypar_payments/index.html.erb index 859a854b..29656453 100644 --- a/app/views/origami/paypar_payments/index.html.erb +++ b/app/views/origami/paypar_payments/index.html.erb @@ -10,128 +10,4 @@ -
    - -
    -
    -
    -
    -
    -
    1
    -
    2
    -
    3
    -
    -
    -
    -
    1000
    -
    -
    -
    -
    -
    -
    4
    -
    5
    -
    6
    -
    -
    -
    -
    5000
    -
    -
    -
    -
    -
    -
    7
    -
    8
    -
    9
    -
    -
    -
    -
    10000
    -
    -
    -
    -
    -
    -
    0
    -
    .
    -
    00
    -
    -
    -
    -
    50000
    -
    -
    -
    -
    -
    -
    -
    DEL
    -
    CLR
    -
    -
    -
    -
    PAY
    -
    -
    -
    -
    - -
    - -
    - -
    - \ No newline at end of file +
    \ No newline at end of file diff --git a/app/views/origami/redeem_payments/index.html.erb b/app/views/origami/redeem_payments/index.html.erb index 0ffa08e8..4daa672b 100644 --- a/app/views/origami/redeem_payments/index.html.erb +++ b/app/views/origami/redeem_payments/index.html.erb @@ -5,7 +5,7 @@
    - +

    @@ -23,70 +23,48 @@
    -
    -
    -
    -
    -
    -
    1
    -
    2
    -
    3
    -
    -
    -
    -
    1000
    -
    -
    -
    -
    -
    -
    4
    -
    5
    -
    6
    -
    -
    -
    -
    5000
    -
    -
    -
    -
    -
    -
    7
    -
    8
    -
    9
    -
    -
    -
    -
    10000
    -
    -
    -
    -
    -
    -
    0
    -
    .
    -
    00
    -
    -
    -
    -
    50000
    -
    -
    -
    -
    -
    -
    -
    DEL
    -
    CLR
    -
    -
    -
    -
    PAY
    -
    -
    -
    -
    +
    +
    +
    +
    1
    +
    2
    +
    3
    +
    +
    +
    4
    +
    5
    +
    6
    +
    +
    +
    7
    +
    8
    +
    9
    +
    +
    +
    0
    +
    .
    +
    00
    +
    +
    +
    Nett
    +
    Del
    +
    Clr
    +
    +
    +
    +
    +
    1000
    +
    3000
    +
    +
    +
    5000
    +
    10000
    +
    +
    +
    Pay
    +
    +
    +
    diff --git a/config/routes.rb b/config/routes.rb index 76e1498c..c4592d6d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -95,7 +95,7 @@ Rails.application.routes.draw do get 'sale/:sale_id/payment/others_payment/MPU' => "mpu#index" post 'payment/mpu' => "mpu#create" - get 'sale/:sale_id/payment/others_payment/REDEEMREBATE' => "redeem_payments#index" + get 'sale/:sale_id/payment/others_payment/REDEEM' => "redeem_payments#index" #---------Add Customer --------------# #resources :customers diff --git a/db/seeds.rb b/db/seeds.rb index c802079f..1e3e30b1 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -51,9 +51,7 @@ menu_item_type = Lookup.create([{lookup_type:'menu_item_type', name: 'SIMPLE', v {lookup_type:'menu_item_type', name: 'Set Menu', value: 'setMenu'}, {lookup_type:'menu_item_type', name: 'DIY', value: 'diy'}]) -member_group_type = Lookup.create([{lookup_type:'member_group_type', name: 'Platinum', value: '1'}, - {lookup_type:'member_group_type', name: 'Silver', value: '2'} - ]) +member_group_type = Lookup.create([{lookup_type:'member_group_type', name: 'Normal', value: '1'}]) #menu_item_attribute:[size|] menu_item_attribute_type = Lookup.create([{lookup_type:'menu_item_attribute_type', name: 'Size', value: 'size'}]) @@ -158,7 +156,7 @@ member_actions= MembershipAction.create([{membership_type:"get_account_balance", payment_methods = PaymentMethodSetting.create({payment_method:"MPU",gateway_url: "http//192.168.1.47:3006"}) -payment_methods = PaymentMethodSetting.create({payment_method:"REDEEMREBATE",gateway_url: "http://192.168.1.47:3006",merchant_account_id:"vWSsseoZCzxd6xcNf_uS"}) +payment_methods = PaymentMethodSetting.create({payment_method:"REDEEM",gateway_url: "http://192.168.1.47:3006",merchant_account_id:"vWSsseoZCzxd6xcNf_uS"}) # shop = Shop.create( diff --git a/dump.rdb b/dump.rdb index 4d2c7d9e..a7b34902 100644 Binary files a/dump.rdb and b/dump.rdb differ