move automatic invoices to plugin

changes on deposit calculation

tiny changes on group order invoice pdf
This commit is contained in:
viehlieb 2023-10-10 23:11:34 +02:00
parent 42a1773a87
commit e78d1ad072
67 changed files with 5579 additions and 69 deletions

View file

@ -0,0 +1,4 @@
/ insert_after 'erb:contains(":updated_by")'
- if FoodsoftAutomaticInvoices.enabled?
%th= heading_helper GroupOrderInvoice, :name
%th

View file

@ -0,0 +1,10 @@
/ insert_after 'erb:contains("show_user(order.updated_by)")'
- if FoodsoftAutomaticInvoices.enabled?
%td
- if order.closed?
-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')
- else
= t('orders.index.not_closed')

View file

@ -0,0 +1,3 @@
/ replace 'erb:contains("edit_results_by_articles")'
- if FoodsoftAutomaticInvoices.enabled?
= render :partial => 'finance/balancing/edit_results_by_articles_override'

View file

@ -0,0 +1,21 @@
/ replace_contents "tr.gross-amount"
- if FoodsoftConfig[:group_order_invoices]&.[](:separate_deposits)
%tr
%td= t('.gross_amount')
%td.numeric= number_to_currency(order.sum(:gross_without_deposit))
%tr
%td= t('.fc_amount_without_deposit')
%td.numeric= number_to_currency(order.sum(:fc_without_deposit))
%tr
%td= t('.deposit')
%td.numeric= number_to_currency(order.sum(:deposit))
%tr
%td= t('.net_deposit')
%td.numeric= number_to_currency(order.sum(:net_deposit))
%tr
%td= t('.fc_deposit')
%td.numeric= number_to_currency(order.sum(:fc_deposit))
- else
%tr
%td= t('.gross_amount')
%td.numeric= number_to_currency(order.sum(:gross))