foodsoft/app/views/finance/balancing/new.html.haml

72 lines
2.4 KiB
Text
Raw Normal View History

- content_for :javascript do
:javascript
$(function() {
// Subscribe to database changes.
// See publish/subscribe design pattern in /doc.
$(document).on('OrderArticle#update', function(e) {
$.ajax({
url: '#{new_on_order_article_update_finance_order_path(@order)}',
type: 'get',
data: {order_article_id: e.order_article_id},
contentType: 'application/json; charset=UTF-8'
});
});
$(document).on('OrderArticle#create', function(e) {
$.ajax({
url: '#{new_on_order_article_create_finance_order_path(@order)}',
type: 'get',
data: {order_article_id: e.order_article_id},
contentType: 'application/json; charset=UTF-8'
});
});
});
2013-02-10 09:05:20 +01:00
- title t('.title', name: @order.name)
- content_for :sidebar do
.well.well-small
2013-02-10 09:05:20 +01:00
%h3= t('.summary')
#summary= render 'summary', order: @order
.well.well-small
2013-02-10 09:05:20 +01:00
%h3= t('.invoice')
#invoice= render 'invoice', invoice: @order.invoice
.well.well-small
2013-02-10 09:05:20 +01:00
%h3= t('.notes_and_journal')
2009-01-06 11:49:19 +01:00
#note
2013-07-26 18:34:03 +02:00
- unless @order.note.blank?
2009-01-06 11:49:19 +01:00
= simple_format @order.note
- else
2013-02-10 09:05:20 +01:00
%p= t('.comment_on_transaction')
= link_to t('.edit_note'), edit_note_finance_order_path(@order), remote: true
.well.well-small
2013-02-10 09:05:20 +01:00
%h3= t('.comments')
#comments= render :partial => 'shared/comments', locals: {comments: @order.comments.includes(:user)}
- content_for :actionbar do
.btn-group
- unless @order.invoice or @order.stockit?
2013-02-10 09:05:20 +01:00
= link_to t('.create_invoice'), new_finance_invoice_path(:order_id => @order, :supplier_id => @order.supplier),
class: 'btn'
- unless @order.closed?
2013-02-10 09:05:20 +01:00
= link_to t('.confirm_order'), confirm_finance_order_path(@order), class: 'btn btn-primary'
#editOrderNav.btn-group.pull-right
= link_to '#', data: {toggle: 'dropdown'}, class: 'btn dropdown-toggle' do
2013-02-10 09:05:20 +01:00
= t('.view_options')
%span.caret
%ul.dropdown-menu
2013-02-10 09:05:20 +01:00
%li= link_to t('.edit_order'), new_finance_order_path(order_id: @order.id, view: 'edit_results'),
remote: true
2013-02-10 09:05:20 +01:00
%li= link_to t('.groups_overview'), new_finance_order_path(order_id: @order.id, view: 'groups_overview'),
remote: true
2013-02-10 09:05:20 +01:00
%li= link_to t('.articles_overview'), new_finance_order_path(order_id: @order.id, view: 'articles_overview'),
remote: true
%section#results
= render 'edit_results_by_articles'
%p= link_to_top