wip move automatic invoices to plugin
This commit is contained in:
parent
78bf494182
commit
4523d0b26e
35 changed files with 628 additions and 2045 deletions
|
|
@ -0,0 +1,3 @@
|
|||
/ insert_after 'erb:contains(":contact_person")'
|
||||
- if FoodsoftAutomaticInvoices.enabled?
|
||||
= f.input :customer_number
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
/ insert_after 'erb:contains(":updated_by")'
|
||||
%th= heading_helper GroupOrderInvoice, :name
|
||||
%th
|
||||
- if FoodsoftAutomaticInvoices.enabled?
|
||||
%th= heading_helper GroupOrderInvoice, :name
|
||||
%th
|
||||
|
|
@ -1,9 +1,10 @@
|
|||
/ insert_after 'erb:contains("show_user(order.updated_by)")'
|
||||
%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')
|
||||
- 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')
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
/ replace_contents "section#results"
|
||||
- if FoodsoftAutomaticInvoices.enabled?
|
||||
= render :partial => 'finance/balancing/edit_results_by_articles_override'
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
/ replace_contents "#group-order-form"
|
||||
- if FoodsoftAutomaticInvoices.enabled?
|
||||
= render "form_override"
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
/ replace_contents "#group-order-form"
|
||||
- if FoodsoftAutomaticInvoices.enabled?
|
||||
= render "form_override"
|
||||
|
|
@ -7,5 +7,9 @@ if FoodsoftAutomaticInvoices.enabled?
|
|||
def total_deposit_price
|
||||
units * price.unit_quantity * price.deposit
|
||||
end
|
||||
|
||||
def total_price_without_deposit
|
||||
units * price.unit_quantity * price.fc_price_without_deposit
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue