foodsoft/app/views/suppliers/_form.html.haml
Patrick Gansterer d90d188dbf Add SupplierCategory
This allows the categorization of suppliers. For a better reporting
it is necessary to split the expenses of the invoices.
E.g. we want to be able to generate independent sums of general cost
like the rent or electricity and the cost of the bought articles.
2020-07-30 17:46:07 +02:00

29 lines
1.2 KiB
Text

= simple_form_for @supplier do |f|
- if @supplier.shared_supplier
.alert.alert-info
= t 'suppliers.shared_supplier_note'
= f.hidden_field :shared_supplier_id
= f.input :name
= f.input :address
= f.input :phone
= f.input :phone2
= f.input :fax
= f.input :email
= f.input :url
= f.input :contact_person
= f.input :customer_number
- supplier_categories = SupplierCategory.order(:name)
- if supplier_categories.count > 1
= f.association :supplier_category, collection: supplier_categories, include_blank: false
- if FoodsoftConfig[:use_iban]
= f.input :iban
= f.input :delivery_days
= f.input :order_howto, as: :text, input_html: {rows: 5}
= f.input :note, as: :text, input_html: {rows: 5}
= f.input :min_order_quantity
= render 'shared/custom_form_fields', f: f, type: :supplier
- if @supplier.shared_supplier
= f.input :shared_sync_method, collection: shared_sync_method_collection(@supplier.shared_supplier), input_html: {class: 'input-xlarge'}, include_blank: false, disabled: @supplier.shared_supplier.shared_sync_methods.count < 2
.form-actions
= f.submit class: 'btn'
= link_to t('ui.or_cancel'), suppliers_path