add validation for payment method,print_setting,tax_profile
This commit is contained in:
@@ -1,2 +1,4 @@
|
||||
class PaymentMethodSetting < ApplicationRecord
|
||||
# validations
|
||||
validates_presence_of :payment_method, :gateway_communication_type, :gateway_url, :auth_token, :merchant_account_id
|
||||
end
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
class PrintSetting < ApplicationRecord
|
||||
# validations
|
||||
validates_presence_of :name, :unique_code, :font, :api_settings, :printer_name, :page_width, :page_height, :print_copies, :heading_space
|
||||
end
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
class TaxProfile < ApplicationRecord
|
||||
default_scope { order('order_by asc') }
|
||||
|
||||
# validations
|
||||
validates_presence_of :name, :rate
|
||||
end
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<li class="breadcrumb-item"><a href="<%= print_settings_path %>">Print Setting</a></li>
|
||||
<li class="breadcrumb-item active">Edit</li>
|
||||
<span class="float-right">
|
||||
<%= link_to t('.new', :default => t("views.btn.new")), print_settings_path %>
|
||||
<%= link_to t('.back', :default => t("views.btn.back")), print_settings_path %>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user