Add invoice_order_by_supplier attribute to enterprise

This commit is contained in:
Nihal Mohammed
2022-03-15 03:56:30 +05:30
parent 5606be7199
commit 992cb9d920
3 changed files with 4 additions and 1 deletions

View File

@@ -19,6 +19,7 @@ class Enterprise < ApplicationRecord
preference :shopfront_producer_order, :string, default: ""
preference :shopfront_order_cycle_order, :string, default: "orders_close_at"
preference :shopfront_product_sorting_method, :string, default: "by_category"
preference :invoice_order_by_supplier, :boolean, default: false
# Allow hubs to restrict visible variants to only those in their inventory
preference :product_selection_from_inventory_only, :boolean, default: false

View File

@@ -12,7 +12,8 @@ module Api
:preferred_shopfront_product_sorting_method, :owner, :contact, :users, :tag_groups,
:default_tag_group, :require_login, :allow_guest_orders, :allow_order_changes,
:logo, :promo_image, :terms_and_conditions,
:terms_and_conditions_file_name, :terms_and_conditions_updated_at
:terms_and_conditions_file_name, :terms_and_conditions_updated_at,
:preferred_invoice_order_by_supplier
has_one :owner, serializer: Api::Admin::UserSerializer
has_many :users, serializer: Api::Admin::UserSerializer

View File

@@ -33,6 +33,7 @@ module PermittedAttributes
:preferred_shopfront_closed_message, :preferred_shopfront_taxon_order,
:preferred_shopfront_producer_order, :preferred_shopfront_order_cycle_order,
:show_customer_names_to_suppliers, :preferred_shopfront_product_sorting_method,
:preferred_invoice_order_by_supplier,
]
end
end