= render 'backend/shared/financial_year_warning' if Preference.get(:permanent_stock_inventory, true).boolean_value

- main_toolbar do |t|
  = t.export :stocks
  - if Product.any?
    - if FinancialYear.any?
      = t.new params: { redirect: nil }
    - else
      = t.new params: { redirect: nil }, disabled: "disabled"

= main_list

= render 'backend/shared/financial_year_warning' if Preference.get(:permanent_stock_inventory, true).boolean_value

- main_toolbar do |t|
  = t.export :stocks
  - if FinancialYear.any? && Product.any?
    = t.new params: { redirect: nil }
  - else
    = t.new params: { redirect: nil }, disabled: "disabled"

= main_list

Enhance condition to enable new inventory button
Enhance condition to enable new inventory button
