add vat exempt option in payment_tab ~ refs #automatic_go_invoices
add option vor vat_exempt inoices ~ refs automatic go invoices fix order.ordergroup nil pointer error ~ automatic go invoices fix nil pointer~ refs automatic go invoice rubocop styling ~ refs automatic go invoice
This commit is contained in:
parent
bafa163ce5
commit
81a5194023
8 changed files with 122 additions and 35 deletions
|
|
@ -13,9 +13,11 @@
|
|||
= config_input form, :charge_members_manually, as: :boolean
|
||||
= config_input form, :use_iban, as: :boolean
|
||||
= config_input form, :use_self_service, as: :boolean
|
||||
%h4= t '.group_order_invoices'
|
||||
= form.fields_for :group_order_invoices do |field|
|
||||
= config_input field, :use, as: :boolean
|
||||
= config_input field, :payment_method, as: :string, input_html: {class: 'input-mini'}
|
||||
= config_input field, :use_automatic_invoices, as: :boolean
|
||||
= config_input field, :vat_exempt, as: :boolean
|
||||
= config_input field, :payment_method, as: :string, input_html: {class: 'input-medium'}
|
||||
|
||||
%h4= t '.schedule_title'
|
||||
= form.simple_fields_for :order_schedule do |fields|
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
%td= show_user(order.updated_by)
|
||||
%td{id: "generate-invoice#{order.id}"}
|
||||
- if order.closed?
|
||||
-if FoodsoftConfig[:contact][:tax_number]
|
||||
-if FoodsoftConfig[:contact][:tax_number] && order.ordergroups.present?
|
||||
= render :partial => 'group_order_invoices/links', locals:{order: order}
|
||||
-else
|
||||
= I18n.t('activerecord.attributes.group_order_invoice.tax_number_not_set')
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
.row
|
||||
- order.group_orders.includes([:group_order_invoice, :ordergroup]).each do |go|
|
||||
.row
|
||||
- order.group_orders.includes([:group_order_invoice, :ordergroup]).each do |go|
|
||||
.row
|
||||
.column.small-3
|
||||
= label_tag go.ordergroup.name
|
||||
- if go.group_order_invoice
|
||||
- if go.group_order_invoice
|
||||
.column.small-3
|
||||
= link_to I18n.t('activerecord.attributes.group_order_invoice.links.download'), group_order_invoice_path(go.group_order_invoice, :format => 'pdf'), class: 'btn btn-small'
|
||||
.column.small-3
|
||||
= link_to I18n.t('activerecord.attributes.group_order_invoice.links.delete'), go.group_order_invoice, method: :delete, class: 'btn btn-danger btn-small', remote: true
|
||||
- else
|
||||
= button_to I18n.t('activerecord.attributes.group_order_invoice.links.generate'), group_order_invoices_path(:method => :post, group_order: go) ,class: 'btn btn-small', params: {id: order.id}, remote: true
|
||||
%br
|
||||
- else
|
||||
= button_to I18n.t('activerecord.attributes.group_order_invoice.links.generate'), group_order_invoices_path(:method => :post, group_order: go) ,class: 'btn btn-small', params: {id: order.id}, remote: true
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue