crm updated

This commit is contained in:
Yan
2017-07-26 18:39:46 +06:30
parent 7bfe8b1578
commit ad2dfa2ee0
6 changed files with 24 additions and 25 deletions

View File

@@ -215,14 +215,11 @@ end
end
if response["status"] == true
customer = Customer.find(@crm_customer.customer_id)
status = customer.update_attributes(membership_id: response["customer_datas"]["id"],membership_type:member_group_id )
format.html { redirect_to crm_customers_path, notice: 'Customer was successfully updated'}
else
customer = Customer.find(@crm_customer.customer_id)
# Check membership id and bind to user
if response["membership_id"] != nil

View File

@@ -128,10 +128,9 @@
<script type="text/javascript">
$(function() {
// Read Card Reader
$("#paypar_account_no").on('focus', function(e){
var cardNo = "";
$("#sxModal").show();
$("#paypar_account_no").on('focus', function(e){
if($(this).val() == ''){
$("#sxModal").show();
setTimeout(function(){
getCardNo();
$("#sxModal").hide();

View File

@@ -216,12 +216,14 @@
$('.datepicker').css('cursor','pointer');
// Read Card Reader
$("#paypar_account_no").on('focus', function(e){
$("#sxModal").show();
setTimeout(function(){
getCardNo();
$("#sxModal").hide();
},100);
$("#paypar_account_no").on('focus', function(e){
if($(this).val() == ''){
$("#sxModal").show();
setTimeout(function(){
getCardNo();
$("#sxModal").hide();
},100);
}
});
// Read Card Reader

View File

@@ -103,7 +103,8 @@ customer2 = Customer.create({name:"TAKEAWAY", email: "cus2@customer.com", contac
# room = Room.create({name:"Table 2", zone: zone2, status:"available", seater: 4 , order_by:1, created_by:"SYSTEM DEFAULT"})
#Tax Profile
tax_profiles = TaxProfile.create({id:1, name: "Commercial Tax", rate:5.0, order_by:1, created_by:"SYSTEM DEFAULT"})
tax_profiles = TaxProfile.create({id:1, name: "Commercial Tax", rate:5.0, order_by:2, created_by:"SYSTEM DEFAULT"})
service_charges = TaxProfile.create({id:2, name: "Service Charges", rate:10.0, order_by:1, created_by:"SYSTEM DEFAULT"})
#Account for Menu Item Type (eg: Food, Beverage)
# food = Account.create({title: "Food", account_type: "0"})

BIN
dump.rdb

Binary file not shown.

View File

@@ -896,25 +896,25 @@ zone3 = Zone.create({id:3, name: "H3", is_active:true, created_by: "SYSTEM DEFAU
table = Table.create({zone: zone3, name:"34", status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
table = Table.create({zone: zone3, name:"35", status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
member_setting = MembershipSetting.create({membership_type:"paypar_url",gateway_url: "http://staging.membership.paypar.ws",merchant_account_id:"am-15QFGS9xGBxDrV6bV"})
member_setting = MembershipSetting.create({membership_type:"paypar_url",gateway_url: "http://staging.membership.paypar.ws",merchant_account_id:"RxzaYyAGzm7VqAZ4hKnv"})
member_actions= MembershipAction.create([{membership_type:"get_account_balance",gateway_url:"/api/membership_campaigns/get_correspond_account_data",additional_parameter:{campaign_type_id:1},merchant_account_id:"am-15QFGS9xGBxDrV6bV",auth_token:"code2lab"},
{membership_type:"redeem",gateway_url:"/api/membership_campaigns/redeem",additional_parameter:{campaign_type_id:1},merchant_account_id:"am-15QFGS9xGBxDrV6bV",auth_token:"code2lab"},
{membership_type:"create_membership_customer",gateway_url:"/api/generic_customer/create_membership_customer",merchant_account_id:"am-15QFGS9xGBxDrV6bV",auth_token:"code2lab"},
{membership_type:"update_membership_customer",gateway_url:"/api/generic_customer/update_membership_customer",merchant_account_id:"am-15QFGS9xGBxDrV6bV",auth_token:"code2lab"},
{membership_type:"get_all_member_group",gateway_url:"/api/member_group/get_all_member_group",merchant_account_id:"am-15QFGS9xGBxDrV6bV",auth_token:"code2lab"},
{membership_type:"rebate",gateway_url:"/api/membership_campaigns/rebate",additional_parameter:{campaign_type_id:1},merchant_account_id:"am-15QFGS9xGBxDrV6bV",auth_token:"code2lab"},
{membership_type:"get_all_member_account",gateway_url:"/api/generic_customer/get_membership_data",merchant_account_id:"am-15QFGS9xGBxDrV6bV",auth_token:"code2lab"},
{membership_type:"get_member_transactions",gateway_url:"/api/generic_customer/get_membership_transactions",merchant_account_id:"am-15QFGS9xGBxDrV6bV",auth_token:"code2lab"},
{membership_type:"member_discount",gateway_url:"/api/membership_campaigns/discount",additional_parameter:{campaign_type_id:6},merchant_account_id:"am-15QFGS9xGBxDrV6bV",auth_token:"code2lab"},
{membership_type:"get_member_campaign",gateway_url:"/api/membership_campaigns/get_member_campaign",additional_parameter:{campaign_type_id:6},merchant_account_id:"am-15QFGS9xGBxDrV6bV",auth_token:"code2lab"},
member_actions= MembershipAction.create([{membership_type:"get_account_balance",gateway_url:"/api/membership_campaigns/get_correspond_account_data",additional_parameter:{campaign_type_id:1},merchant_account_id:"RxzaYyAGzm7VqAZ4hKnv",auth_token:"code2lab"},
{membership_type:"redeem",gateway_url:"/api/membership_campaigns/redeem",additional_parameter:{campaign_type_id:1},merchant_account_id:"RxzaYyAGzm7VqAZ4hKnv",auth_token:"code2lab"},
{membership_type:"create_membership_customer",gateway_url:"/api/generic_customer/create_membership_customer",merchant_account_id:"RxzaYyAGzm7VqAZ4hKnv",auth_token:"code2lab"},
{membership_type:"update_membership_customer",gateway_url:"/api/generic_customer/update_membership_customer",merchant_account_id:"RxzaYyAGzm7VqAZ4hKnv",auth_token:"code2lab"},
{membership_type:"get_all_member_group",gateway_url:"/api/member_group/get_all_member_group",merchant_account_id:"RxzaYyAGzm7VqAZ4hKnv",auth_token:"code2lab"},
{membership_type:"rebate",gateway_url:"/api/membership_campaigns/rebate",additional_parameter:{campaign_type_id:1},merchant_account_id:"RxzaYyAGzm7VqAZ4hKnv",auth_token:"code2lab"},
{membership_type:"get_all_member_account",gateway_url:"/api/generic_customer/get_membership_data",merchant_account_id:"RxzaYyAGzm7VqAZ4hKnv",auth_token:"code2lab"},
{membership_type:"get_member_transactions",gateway_url:"/api/generic_customer/get_membership_transactions",merchant_account_id:"RxzaYyAGzm7VqAZ4hKnv",auth_token:"code2lab"},
{membership_type:"member_discount",gateway_url:"/api/membership_campaigns/discount",additional_parameter:{campaign_type_id:6},merchant_account_id:"RxzaYyAGzm7VqAZ4hKnv",auth_token:"code2lab"},
{membership_type:"get_member_campaign",gateway_url:"/api/membership_campaigns/get_member_campaign",additional_parameter:{campaign_type_id:6},merchant_account_id:"RxzaYyAGzm7VqAZ4hKnv",auth_token:"code2lab"},
])
payment_methods = PaymentMethodSetting.create({payment_method:"MPU",gateway_url: "http://staging.membership.paypar.ws"})
payment_methods = PaymentMethodSetting.create({payment_method:"VISA",gateway_url: "http://staging.membership.paypar.ws"})
payment_methods = PaymentMethodSetting.create({payment_method:"JCB",gateway_url: "http://staging.membership.paypar.ws"})
payment_methods = PaymentMethodSetting.create({payment_method:"Master",gateway_url: "http://staging.membership.paypar.ws"})
payment_methods = PaymentMethodSetting.create({payment_method:"Redeem",gateway_url: "http://staging.membership.paypar.ws",merchant_account_id:"am-15QFGS9xGBxDrV6bV"})
payment_methods = PaymentMethodSetting.create({payment_method:"Redeem",gateway_url: "http://staging.membership.paypar.ws",merchant_account_id:"RxzaYyAGzm7VqAZ4hKnv"})
#Default Order Queue stations
order_queue_station1 = OrderQueueStation.create({station_name: "K1", is_active: true,printer_name: "Cashier", processing_items: JSON.generate(['I0001','I0002','I0003','I0004']), print_copy:false, cut_per_item: false, use_alternate_name: false, created_by: "SYSTEM DEFAULT"})