changes in verification
This commit is contained in:
@@ -4,10 +4,10 @@ class Api::VerificationsController < ActionController::API
|
||||
phone_number = params[:phone_number]
|
||||
|
||||
#TODO - user generate
|
||||
@cus = Customer.new
|
||||
@cus.draft_customer(phone_number, rand(1000..9999))
|
||||
cus = Customer.new
|
||||
@cus = cus.draft_customer(phone_number, rand(1000..9999))
|
||||
if @cus.verify_status == false
|
||||
# VerifyNumber.send_message(phone_number, @cus.pin_code)
|
||||
VerifyNumber.send_message(phone_number, @cus.pin_code)
|
||||
@result = true
|
||||
end
|
||||
end
|
||||
|
||||
@@ -9,10 +9,11 @@ class Origami::CashInsController < BaseOrigamiController
|
||||
payment_method = params[:payment_method]
|
||||
payment_method_reference = params[:payment_method_reference]
|
||||
type = params[:type]
|
||||
|
||||
p_jour = PaymentJournal.new
|
||||
p_jour.cash_in(reference, remark, amount, payment_method, payment_method_reference, current_user.id)
|
||||
shift = ShiftSale.current_open_shift(current_user.id)
|
||||
|
||||
shift = ShiftSale.current_open_shift(current_user.id)
|
||||
current_shift = ShiftSale.current_shift
|
||||
|
||||
# set cashier
|
||||
@@ -20,6 +21,7 @@ class Origami::CashInsController < BaseOrigamiController
|
||||
shift = shift
|
||||
else
|
||||
open_cashier = Employee.where("role = 'cashier' AND token_session <> ''")
|
||||
|
||||
if open_cashier.count > 0
|
||||
|
||||
shift = ShiftSale.current_open_shift(open_cashier[0].id)
|
||||
@@ -30,8 +32,9 @@ class Origami::CashInsController < BaseOrigamiController
|
||||
shift = ShiftSale.current_open_shift(current_shift.id)
|
||||
end
|
||||
else
|
||||
shift = Employee.find(current_shift.employee_id).name
|
||||
|
||||
shift = Employee.find(current_shift.employee_id).name
|
||||
#shift = current_shift
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class Customer < ApplicationRecord
|
||||
self.name = "User " + pin.to_s
|
||||
self.contact_no = phone
|
||||
self.email = pin.to_s + "@gmail.com"
|
||||
self.pin_code = pin
|
||||
self.pin_code = pin.to_s
|
||||
self.pin_sent_at = Time.now
|
||||
self.save
|
||||
return self
|
||||
|
||||
Reference in New Issue
Block a user