make explicit deposit in invoices work
This commit is contained in:
parent
85bdf28f91
commit
6f7c057a47
14 changed files with 242 additions and 84 deletions
|
|
@ -16,6 +16,7 @@
|
|||
%h4= t '.group_order_invoices'
|
||||
= form.fields_for :group_order_invoices do |field|
|
||||
= config_input field, :use_automatic_invoices, as: :boolean
|
||||
= config_input field, :separate_deposits, as: :boolean
|
||||
= config_input field, :vat_exempt, as: :boolean
|
||||
= config_input field, :payment_method, as: :string, input_html: {class: 'input-medium'}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
%p= t('.first_paragraph', url: link_to(t('.here'), new_invite_path(id: @ordergroup.id), remote: true)).html_safe
|
||||
= simple_form_for [:admin, @ordergroup] do |f|
|
||||
- captured = capture do
|
||||
= f.input :customer_number
|
||||
= f.input :contact_person
|
||||
= f.input :contact_phone
|
||||
= f.input :contact_address
|
||||
|
|
|
|||
|
|
@ -12,6 +12,16 @@
|
|||
%tr
|
||||
%td= t('.fc_amount')
|
||||
%td.numeric= number_to_currency(order.sum(:fc))
|
||||
- if FoodsoftConfig[:group_order_invoices]&.[](:separate_deposits)
|
||||
%tr
|
||||
%td= t('.deposit')
|
||||
%td.numeric= number_to_currency(order.sum(:deposit))
|
||||
%tr
|
||||
%td= t('.gross_deposit')
|
||||
%td.numeric= number_to_currency(order.sum(:gross_deposit))
|
||||
%tr
|
||||
%td= t('.fc_deposit')
|
||||
%td.numeric= number_to_currency(order.sum(:fc_deposit))
|
||||
%tr
|
||||
%td= t('.groups_amount')
|
||||
%td.numeric= number_to_currency(order.sum(:groups))
|
||||
|
|
|
|||
|
|
@ -57,6 +57,10 @@
|
|||
= f.label :contact_person
|
||||
%br/
|
||||
= f.text_field :contact_person
|
||||
%p
|
||||
= f.label :customer_number
|
||||
%br/
|
||||
= f.text_field :customer_number
|
||||
%p
|
||||
= f.label :contact_phone
|
||||
%br/
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
%dd=h group.contact
|
||||
%dt= heading_helper(Ordergroup, :contact_address) + ':'
|
||||
%dd= link_to_gmaps group.contact_address
|
||||
%dt= heading_helper(Ordergroup, :customer_number) + ':'
|
||||
%dd=h group.customer_number
|
||||
- if group.break_start? or group.break_end?
|
||||
%dt= heading_helper(Ordergroup, :break) + ':'
|
||||
%dd= raw t '.break', start: format_date(group.break_start), end: format_date(group.break_end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue