Merge branch 'adminbsb_material_ui' of bitbucket.org:code2lab/sxrestaurant into adminbsb_material_ui
This commit is contained in:
@@ -129,10 +129,19 @@ class Ability
|
||||
can :item_edit, :sale_edit
|
||||
can :item_void_cancel, :sale_edit
|
||||
can :cancel_all_void, :sale_edit
|
||||
can :apply_void, :sale_edit
|
||||
|
||||
can :apply_void, :sale_edit
|
||||
can :overall_void, :void
|
||||
|
||||
can :index, :other_charge
|
||||
can :create, :other_charge
|
||||
can :index, :discount
|
||||
can :create, :discount
|
||||
can :remove_discount_items, :discount
|
||||
can :remove_all_discount, :discount
|
||||
|
||||
can :manage, Customer
|
||||
can :manage, DiningQueue
|
||||
|
||||
can :first_bill, :payment
|
||||
can :create, :payment
|
||||
can :show, :payment
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class PaymentMethodSetting < ApplicationRecord
|
||||
# validations
|
||||
validates_presence_of :payment_method, :gateway_communication_type, :gateway_url, :auth_token, :merchant_account_id
|
||||
validates_presence_of :payment_method #, :gateway_communication_type, :gateway_url, :auth_token, :merchant_account_id
|
||||
end
|
||||
|
||||
@@ -14,22 +14,14 @@ class SeedGenerator < ApplicationRecord
|
||||
|
||||
# Generate Receipt No
|
||||
def self.new_receipt_no
|
||||
seed = SeedGenerator.find_by_model("sale")
|
||||
new_receipt_no = 0
|
||||
if (seed.nil?)
|
||||
seed = SeedGenerator.new()
|
||||
seed.model = "sale"
|
||||
new_receipt_no = seed.next
|
||||
seed.save
|
||||
# Only return seed no
|
||||
cur_val, next_val = self.update_seed("sale")
|
||||
|
||||
else
|
||||
current_no = seed.next
|
||||
seed.next = seed.next
|
||||
seed.current = current_no
|
||||
seed.save
|
||||
end
|
||||
if (cur_val == 0)
|
||||
cur_val, next_val = self.execute_query("sale")
|
||||
end
|
||||
|
||||
return seed.current
|
||||
return cur_val
|
||||
end
|
||||
|
||||
# Generate for 4 digit Code
|
||||
|
||||
Reference in New Issue
Block a user