Add transport costs to Order
This commit is contained in:
parent
8cb70d819e
commit
4c567fece1
16 changed files with 141 additions and 6 deletions
|
|
@ -36,8 +36,15 @@
|
|||
%th= heading_helper Article, :tax
|
||||
%th= heading_helper Article, :deposit
|
||||
%th{:colspan => "2"}
|
||||
= link_to t('.add_article'), new_order_order_article_path(@order), remote: true,
|
||||
class: 'btn btn-small' unless @order.closed?
|
||||
- unless @order.closed?
|
||||
.btn-group
|
||||
= link_to t('.add_article'), new_order_order_article_path(@order), remote: true,
|
||||
class: 'btn btn-small'
|
||||
= link_to '#', data: {toggle: 'dropdown'}, class: 'btn btn-small dropdown-toggle' do
|
||||
%span.caret
|
||||
%ul.dropdown-menu
|
||||
%li= link_to t('.add_article'), new_order_order_article_path(@order), remote: true
|
||||
%li= link_to t('.edit_transport'), edit_transport_finance_order_path(@order), remote: true
|
||||
%tbody.list#result_table
|
||||
- for order_article in @articles.select { |oa| oa.units > 0 }
|
||||
= render :partial => "order_article_result", :locals => {:order_article => order_article}
|
||||
|
|
@ -47,3 +54,10 @@
|
|||
|
||||
- for order_article in @articles.select { |oa| oa.units == 0 }
|
||||
= render :partial => "order_article_result", :locals => {:order_article => order_article}
|
||||
|
||||
- if @order.transport
|
||||
%tr
|
||||
%td{ colspan: 5 }= heading_helper Order, :transport
|
||||
%td{ colspan: 3, data: {value: @order.transport} }= number_to_currency(@order.transport)
|
||||
%td= link_to t('ui.edit'), edit_transport_finance_order_path(@order), remote: true,
|
||||
class: 'btn btn-mini' unless order_article.order.closed?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue