Import current_orders plugin from foodcoop-adam
This commit is contained in:
parent
ae4979a3f0
commit
5907ff11bb
43 changed files with 1031 additions and 0 deletions
|
|
@ -0,0 +1,7 @@
|
|||
.btn-group.pull-right
|
||||
= link_to '#', data: {toggle: 'dropdown'}, class: 'btn dropdown-toggle' do
|
||||
= t 'orders.show.download.title'
|
||||
%span.caret
|
||||
%ul.dropdown-menu
|
||||
%li= link_to t('orders.show.download.group_pdf'), current_orders_orders_path(document: :groups, format: :pdf)
|
||||
%li= link_to t('orders.show.download.article_pdf'), current_orders_orders_path(document: :articles, format: :pdf)
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
#order_article
|
||||
|
||||
- if order_article
|
||||
= render 'article_info', order_article: order_article
|
||||
= render 'ordergroups', order_article: order_article
|
||||
|
||||
- else
|
||||
%h2= t('current_orders.articles.index.title')
|
||||
%i#articles_by_articles= t '.no_selection'
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
#article_info
|
||||
%h2{style: 'margin-bottom: 0'}
|
||||
= t('current_orders.articles.show.title', name: order_article.article.name)
|
||||
%span.normal= order_article.article.unit
|
||||
-# @todo unduplicate from group_orders's order_article_info
|
||||
%p
|
||||
- if order_article.article.manufacturer.blank?
|
||||
= raw t 'group_orders.order_article_info.supplied_by', supplier: content_tag(:em, supplier_link(order_article.article.supplier))
|
||||
- elsif order_article.article.supplier.name == order_article.article.manufacturer
|
||||
= raw t 'group_orders.order_article_info.supplied_and_made_by', manufacturer: content_tag(:em, supplier_link(order_article.article.supplier))
|
||||
- else
|
||||
= raw t 'group_orders.order_article_info.supplied_by_made_by', supplier: content_tag(:em, supplier_link(order_article.article.supplier)), manufacturer: content_tag(:em, order_article.article.manufacturer)
|
||||
- unless order_article.article.origin.blank?
|
||||
= raw t 'group_orders.order_article_info.origin_in', origin: content_tag(:em, order_article.article.origin)
|
||||
|
||||
- pkg_info = pkg_helper(order_article.price)
|
||||
= ", #{pkg_info}".html_safe unless pkg_info.blank?
|
||||
|
||||
= ", "
|
||||
= Article.human_attribute_name(:fc_price_short) + ": "
|
||||
= number_to_currency(order_article.price.fc_price)
|
||||
= t 'current_orders.articles.article_info.unit', unit: order_article.article.unit
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
- @order_articles.includes(:order => :supplier).reorder('suppliers.name, articles.article_category_id, articles.name').group_by {|oa| oa.order.name}.each do |name, articles|
|
||||
%li.nav-header= name
|
||||
- articles.each do |oa|
|
||||
%li= link_to oa.article.name, current_orders_articles_path(order: oa.order.id, id: oa.id, anchor: 'order_article'), remote: true
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
.row-fluid
|
||||
|
||||
.span4
|
||||
.well
|
||||
%ul.nav.nav-list#article_list
|
||||
%li.keep
|
||||
= form_for @q, url: current_orders_articles_path, method: 'get', html: {data: {'submit-onchange' => true}, class: 'form-search'}, remote: true do |f|
|
||||
.input-append
|
||||
= f.text_field :article_name_contains, placeholder: t('.article_placeholder'), class: 'search-query input-block-level resettable'
|
||||
%button.add-on.btn.reset-search{type: 'button'}
|
||||
%i.icon.icon-remove
|
||||
= render 'articles', orders: @current_orders
|
||||
|
||||
.span8
|
||||
= render 'actions'
|
||||
= render 'article', order_article: @order_article
|
||||
= render 'shared/articles_by/common'
|
||||
|
||||
|
||||
- content_for :javascript do
|
||||
:javascript
|
||||
|
||||
$(function() {
|
||||
|
||||
// update number of received items - would prefer to do this server-side to
|
||||
// keep working when showing a partial list, but this avoids an extra ajax call
|
||||
$(document).on('GroupOrderArticle#update #update_articles_summary', function(e) {
|
||||
var count_sum = 0;
|
||||
// number of received items
|
||||
$('#articles_by_articles input[data-delta]').each(function() {
|
||||
count_sum += Number($(this).val());
|
||||
});
|
||||
$('#single_order_article_total .count_sum').html(count_sum);
|
||||
// delta
|
||||
// @todo partial code-duplication with orders/_edit_amounts
|
||||
var expected = $('#single_order_article_delta .units_delta').data('quantity-expected');
|
||||
var delta = Math.round((count_sum - expected)*100)/100.0;
|
||||
if (isNaN(delta)) {
|
||||
html = '';
|
||||
color = 'inherit';
|
||||
} else if (delta == 0) {
|
||||
html = I18n.t('js.current_orders.articles.equal');
|
||||
color = 'green';
|
||||
//$('#single_order_article_total .count_sum').html(count_sum + ' <i class="icon-ok"></i>');
|
||||
} else if (delta < 0) {
|
||||
html = I18n.t('js.current_orders.articles.below', {count: -delta});
|
||||
color = 'inherit';
|
||||
} else {
|
||||
html = I18n.t('js.current_orders.articles.above', {count: delta});
|
||||
color = 'red';
|
||||
}
|
||||
$('#single_order_article_delta .units_delta').html(html).attr('style', 'color: '+color);
|
||||
$('#single_order_article_total .count_sum').attr('style', 'color: '+color);
|
||||
});
|
||||
|
||||
// add ordergroup
|
||||
$('#group_order_article_ordergroup_id').select2().select2('data', null);
|
||||
$(document).on('GroupOrderArticle#create', function(e) {
|
||||
var base_unit = $('#articles_by_articles').data('base-unit');
|
||||
// reset selection
|
||||
$('#group_order_article_ordergroup_id').select2('data', null);
|
||||
// update table
|
||||
$.ajax({
|
||||
url: '#{show_on_group_order_article_create_current_orders_articles_path}',
|
||||
type: 'get',
|
||||
data: {group_order_article_id: e.group_order_article_id, base_unit: base_unit}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
- units = order_article.article.unit_unit
|
||||
- multiplier = (params[:base_unit] and units) ? units.scalar : 1
|
||||
%table.table.table-hover#articles_by_articles{data: {'base-unit' => params[:base_unit]}}
|
||||
%thead.list-heading
|
||||
%tr
|
||||
%th{:style => 'width:70%'}= Ordergroup.model_name.human
|
||||
%th.center.dimmed
|
||||
%acronym{:title => t('shared.articles.ordered_desc')}= t 'shared.articles.ordered'
|
||||
%th.center
|
||||
%acronym{:title => t('shared.articles.received_desc')}= t 'shared.articles.received'
|
||||
%td.center
|
||||
.btn-group
|
||||
- if units and units.units != order_article.article.unit
|
||||
= link_to t('.piece'), current_orders_articles_path(order: order_article.order.id, id: order_article.id), remote: true, class: "btn btn-small #{'active' unless params[:base_unit]}"
|
||||
= link_to units.units, current_orders_articles_path(order: order_article.order.id, id: order_article.id, base_unit: true), remote: true, class: "btn btn-small #{'active' if params[:base_unit]}"
|
||||
|
||||
= render 'shared/articles_by/article_single', order_article: order_article, heading: false, delta_column: true, base_unit: params[:base_unit]
|
||||
|
||||
%tfoot
|
||||
%tr
|
||||
%td
|
||||
= form_for GroupOrderArticle.new, remote: true, html: {'data-submit-onchange' => true, style: 'margin: 0'} do |f|
|
||||
= f.hidden_field :order_article_id, value: order_article.id
|
||||
= f.select :ordergroup_id,
|
||||
options_for_select(Ordergroup.undeleted.order(:name).all.map { |g| [ show_group(g), g.id ] }),
|
||||
{include_blank: true}, {style: 'width: 100%', 'data-placeholder' => t('.add_new')}
|
||||
%td{colspan: 3}
|
||||
%tr#single_order_article_total
|
||||
%th= t 'shared.articles_by.price_sum'
|
||||
%td.center.dimmed #{order_article.quantity*multiplier} + #{order_article.tolerance*multiplier}
|
||||
- sum = order_article.group_orders_sum
|
||||
%th.center.count_sum= sum[:quantity]*multiplier
|
||||
%tr.no-top-border#single_order_article_delta
|
||||
%td
|
||||
%td
|
||||
%td.center
|
||||
%span.units_delta{data: {'quantity-expected' => order_article.units * order_article.price.unit_quantity * multiplier}}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
- title t('.title'), false
|
||||
|
||||
= render 'form'
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
$('#article_list li:not(.keep)').remove();
|
||||
$('#article_list').append('<%= j(render('articles', orders: @current_orders)) %>');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
- title t('.title', name: @order_article.article.name), false
|
||||
|
||||
= render 'form'
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
$('#order_article').replaceWith('<%= j(render('article', order_article: @order_article)) if @order_article %>');
|
||||
// add javascript improvements (delta)
|
||||
$(document).trigger('#update_articles_summary');
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
// Handle more advanced DOM update after AJAX database manipulation.
|
||||
// See publish/subscribe design pattern in /doc.
|
||||
(function(w) {
|
||||
$('#goa_<%= @goa.id %>').remove(); // just to be sure: remove table row which is added below
|
||||
$('#articles_by_articles tbody').append('<%= j render('shared/articles_by/article_single_goa', goa: @goa, base_unit: params[:base_unit]) %>').addClass('success');
|
||||
})(window);
|
||||
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
.pull-right
|
||||
= link_to t('ui.back'), root_path(anchor: ''), class: 'btn'
|
||||
|
||||
%p.pull-left
|
||||
= link_to t('current_orders.ordergroups.payment_bar.account_balance'), my_ordergroup_path
|
||||
= number_to_currency (ordergroup.account_balance)
|
||||
|
||||
%p#to_pay_message{style: 'text-align: center'}= to_pay_message(ordergroup)
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
-# XXX code duplication of foodcoop-adam's app/views/group_orders/show.html.haml
|
||||
- if @articles_grouped_by_category.count > 0
|
||||
%table.table.table-hover
|
||||
%thead
|
||||
%tr
|
||||
%th{style: "width:40%"}= heading_helper Article, :name
|
||||
%th= heading_helper Article, :unit
|
||||
%th= t 'group_orders.show.articles.unit_price'
|
||||
%th
|
||||
%abbr{title: t('group_orders.show.articles.ordered_title')}= t 'group_orders.show.articles.ordered'
|
||||
%th
|
||||
%abbr{title: t('group_orders.show.articles.order_nopen_title')}
|
||||
- if (@order.open? rescue true)
|
||||
= t 'group_orders.show.articles.order_open'
|
||||
- else
|
||||
= t 'group_orders.show.articles.order_not_open'
|
||||
%th= heading_helper GroupOrderArticle, :total_price
|
||||
%tbody
|
||||
- group_order_sum = 0
|
||||
- for category_name, goas in @articles_grouped_by_category
|
||||
%tr.article-category.list-heading
|
||||
%td
|
||||
= category_name
|
||||
%i.icon-tag
|
||||
%td{colspan: "9"}
|
||||
- goas.each do |goa|
|
||||
- # get the order-results for the ordergroup
|
||||
- oa = goa.order_article
|
||||
- r = {quantity: goa.quantity, tolerance: goa.tolerance, result: goa.result, sub_total: goa.total_price(oa)}
|
||||
- group_order_sum += r[:sub_total]
|
||||
%tr{class: cycle('even', 'odd', name: 'articles') + " order-article " + order_article_class_name(r[:quantity], r[:tolerance], r[:result])}
|
||||
-# article_info is present in foodcoop-adam only
|
||||
%td.name{style: "width:40%", title: (article_info_title(oa.article) rescue nil)}
|
||||
= article_info_icon oa.article rescue nil
|
||||
= oa.article.name
|
||||
%td
|
||||
= oa.article.unit
|
||||
%span{style: 'opacity: 0.4; margin-left: 1em;'}= pkg_helper(oa.price, soft_uq: true)
|
||||
%td= number_to_currency oa.price.fc_price(@ordergroup)
|
||||
%td
|
||||
= r[:quantity]
|
||||
= "+ #{r[:tolerance]}" if oa.price.unit_quantity > 1
|
||||
%td= r[:result] > 0 ? r[:result] : "0"
|
||||
%td= number_to_currency(r[:sub_total])
|
||||
- unless oa.article.note.blank?
|
||||
%tr{id: "note_#{oa.id}", class: "note even", style: "display:none"}
|
||||
%td{colspan: "6"}=h oa.article.note
|
||||
%tr{class: cycle('even', 'odd', name: 'articles')}
|
||||
%th{colspan: "5"}= heading_helper GroupOrder, :price
|
||||
%th= number_to_currency(group_order_sum)
|
||||
- elsif @articles_grouped_by_category.count == 0
|
||||
= t 'group_orders.show.articles.no_articles'
|
||||
- else
|
||||
= t 'group_orders.show.articles.order_closed_msg'
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
- title t('.title')
|
||||
|
||||
// Article box
|
||||
%section
|
||||
.column_content#result
|
||||
= render 'result'
|
||||
|
||||
.well
|
||||
= render 'payment_bar', ordergroup: @ordergroup
|
||||
|
||||
%br/
|
||||
= link_to_top
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
-# @todo move multiplier to model & unduplicate with shared/articles_by/
|
||||
- multiplier, unit = 1, '× ' + goa.order_article.article.unit
|
||||
- if local_assigns[:base_unit] and unit = goa.order_article.article.unit_unit
|
||||
- multiplier = unit.scalar
|
||||
- unit = unit.units
|
||||
-# output row
|
||||
%tr{:class => [cycle('even', 'odd', :name => 'articles'), if goa.result == 0 then 'unavailable' end], id: "goa_#{goa.id}"}
|
||||
%td.name= goa.order_article.article.name
|
||||
%td{title: goa.order_article.order.name}= link_to goa.order_article.order.name.truncate(15), goa.order_article.order
|
||||
%td= goa.order_article.article.unit
|
||||
%td.center= "#{goa.quantity} + #{goa.tolerance}"
|
||||
%td.center.input-delta= group_order_article_edit_result(goa, multiplier: multiplier, edit: local_assigns[:edit]||true)
|
||||
%td.nowrap.dimmed= unit if multiplier != 1
|
||||
%td.symbol
|
||||
×
|
||||
%td= number_to_currency goa.order_article.price.fc_price(@ordergroup)/multiplier
|
||||
%td.symbol =
|
||||
%td.price{data: {value: goa.total_price}}= number_to_currency goa.total_price
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
- if @ordergroup
|
||||
%table.table.table-hover#articles_by_groups_table{data: {'base-unit' => params[:base_unit]}}
|
||||
%thead
|
||||
%tr
|
||||
%th{style: 'width: 35%'}= heading_helper Article, :name
|
||||
%th= Order.model_name.human
|
||||
%th= heading_helper Article, :unit
|
||||
%th.center
|
||||
%acronym{:title => t('shared.articles.ordered_desc')}= t 'shared.articles.ordered'
|
||||
%th.center{style: 'width: 88px'}
|
||||
%acronym{:title => t('shared.articles.received_desc')}= t 'shared.articles.received'
|
||||
%th.nowrap.dimmed
|
||||
%th.symbol
|
||||
%th= heading_helper Article, :fc_price, short: true
|
||||
%th.symbol
|
||||
%td.center
|
||||
.btn-group
|
||||
- if true #if units and units.units != order_article.article.unit
|
||||
= link_to t('current_orders.articles.ordergroups.piece'), current_orders_ordergroups_path(id: @ordergroup.id), remote: true, class: "btn btn-small #{'active' unless params[:base_unit]}"
|
||||
= link_to t('current_orders.articles.ordergroups.unit'), current_orders_ordergroups_path(id: @ordergroup.id, base_unit: true), remote: true, class: "btn btn-small #{'active' if params[:base_unit]}"
|
||||
|
||||
- total = 0
|
||||
%tbody.list
|
||||
- if @goas and @goas.length > 0
|
||||
- for goa in @goas
|
||||
- total += goa.total_price
|
||||
= render 'article', goa: goa, base_unit: params[:base_unit]
|
||||
|
||||
- else
|
||||
%tr
|
||||
%td{colspan: 11}
|
||||
%i No articles for #{show_group(@ordergroup)} in the current orders.
|
||||
|
||||
%tfoot
|
||||
%tr
|
||||
%td{colspan: 10}
|
||||
- new_articles = OrderArticle.includes(:article, :article_price).where(order_id: @order_ids)
|
||||
- new_article_data = articles_for_select2(new_articles) {|a| "#{a.article.name} (#{a.article.unit}, #{number_to_currency a.price.fc_price})"}
|
||||
= form_for GroupOrderArticle.new, remote: true, html: {'data-submit-onchange' => true, style: 'margin: 0'} do |f|
|
||||
= f.select :order_article_id,
|
||||
options_for_select(new_article_data.map {|a| [a[:text], a[:id]]}),
|
||||
{}, {style: 'width: 500px', 'data-placeholder' => t('.add_new') }
|
||||
= f.hidden_field :ordergroup_id, value: @ordergroup.id
|
||||
%tr#single_ordergroup_total{:class => cycle('even', 'odd', :name => 'articles')}
|
||||
%th{colspan: 9}= t 'shared.articles_by.price_sum'
|
||||
%th.price_sum{colspan: 2, data: {value: total}}= number_to_currency(total)
|
||||
|
||||
|
||||
.well#payment_bar
|
||||
= render 'payment_bar', ordergroup: @ordergroup
|
||||
|
||||
- else
|
||||
%i= t '.no_selection'
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
.well
|
||||
= form_tag current_orders_ordergroups_path, method: :get, 'data-submit-onchange' => true, style: 'margin: 0' do
|
||||
= select_tag 'id',
|
||||
options_for_select(@all_ordergroups.map { |g| [ show_group(g), g.id, {class: ('muted' unless @ordered_group_ids.include? g.id)}] }, (@ordergroup.id rescue '')),
|
||||
include_blank: true, id: 'ordergroup_select', style: 'min-width: 300px',
|
||||
'data-placeholder' => t('.ordergroup_placeholder'), 'data-submit-on-change' => :true
|
||||
-#.form-search.pull-right # see below why this is disabled
|
||||
.input-append
|
||||
= text_field_tag :query, params[:query], class: 'search-query delayed-search resettable', disabled: @ordergroup.nil?,
|
||||
'placeholder' => t('orders.show.search_placeholder.articles')
|
||||
%button.add-on.btn.reset-search{:type => :button, :title => t('orders.show.search_reset')}
|
||||
%i.icon.icon-remove
|
||||
|
||||
|
||||
- if @ordergroup and FoodsoftConfig[:price_markup_list]
|
||||
%span.price_markup_note{style: 'margin-left: 1em'}= show_price_markup @ordergroup, format: :full_label, optional: true
|
||||
|
||||
#articles_by_groups
|
||||
= render 'articles'
|
||||
|
||||
= render 'shared/articles_by/common', order: @order
|
||||
|
||||
|
||||
- content_for :javascript do
|
||||
:javascript
|
||||
|
||||
$(function() {
|
||||
// TODO group by ordered / not-ordered
|
||||
$('#ordergroup_select').select2();
|
||||
|
||||
// add article
|
||||
$('#group_order_article_order_article_id').select2({
|
||||
placeholder: '#{j t('orders.receive.add_article')}',
|
||||
formatNoMatches: function(term) { return '#{j t('.no_articles_available')}';}
|
||||
});
|
||||
$(document).on('GroupOrderArticle#create', function(e) {
|
||||
var base_unit = $('#articles_by_groups_table').data('base-unit');
|
||||
// reset selection
|
||||
$('#group_order_article_order_article_id').select2('data', null);
|
||||
// update table
|
||||
$.ajax({
|
||||
url: '#{show_on_group_order_article_create_current_orders_ordergroups_path}',
|
||||
type: 'get',
|
||||
data: {group_order_article_id: e.group_order_article_id, base_unit: base_unit}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('GroupOrderArticle#update', function(e) {
|
||||
$.ajax({
|
||||
url: '#{show_on_group_order_article_update_current_orders_ordergroups_path}',
|
||||
type: 'get',
|
||||
data: {group_order_id: e.group_order_id, group_order_article_id: e.group_order_article_id}
|
||||
});
|
||||
});
|
||||
|
||||
// article search
|
||||
// DO NOT USE because listjs can't handle updates https://github.com/javve/list.js/issues/86
|
||||
/*
|
||||
new List(document.body, {
|
||||
valueNames: ['name'],
|
||||
engine: 'unlist',
|
||||
plugins: [
|
||||
['reset', {highlightClass: 'btn-primary'}],
|
||||
['delay', {delayedSearchTime: 500}],
|
||||
],
|
||||
// make large pages work too (as we don't have paging)
|
||||
page: 10000,
|
||||
indexAsync: true
|
||||
});
|
||||
*/
|
||||
});
|
||||
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
- if current_user.role_finance?
|
||||
.pull-right
|
||||
= t('.payment')
|
||||
- if current_user.role_finance?
|
||||
= link_to t('.new_transaction'), new_finance_ordergroup_transaction_path(ordergroup), class: 'btn'
|
||||
|
||||
%p.pull-left
|
||||
- if current_user.role_finance?
|
||||
= link_to 'Account balance', finance_ordergroup_transactions_path(ordergroup)
|
||||
- else
|
||||
= t '.account_balance'
|
||||
of #{show_group(ordergroup)}: #{number_to_currency ordergroup.account_balance}
|
||||
|
||||
%p#to_pay_message{style: 'text-align: center'}= to_pay_message(ordergroup)
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
- title t('.title')
|
||||
|
||||
= render 'form'
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
- title t('.title', name: show_group(@ordergroup))
|
||||
|
||||
= render 'form'
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
// untested
|
||||
$('h1, title').html('<%= j t('.title', name: show_group(@ordergroup)) %>');
|
||||
$('#articles_by_groups').html('<%= j render('articles') %>');
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
// Handle more advanced DOM update after AJAX database manipulation.
|
||||
// See publish/subscribe design pattern in /doc.
|
||||
(function(w) {
|
||||
$('#goa_<%= @goa.id %>').remove(); // just to be sure: remove table row which is added below
|
||||
$('#articles_by_groups tbody').append('<%= j render('article', goa: @goa, base_unit: params[:base_unit]) %>').addClass('success');
|
||||
})(window);
|
||||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
// Handle more advanced DOM update after AJAX database manipulation.
|
||||
// See publish/subscribe design pattern in /doc.
|
||||
(function(w) {
|
||||
// table update is done by group_order_article hook already
|
||||
$('#to_pay_message').html('<%= j to_pay_message(@ordergroup) %>');
|
||||
})(window);
|
||||
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
- title t('.title')
|
||||
|
||||
.well
|
||||
- if @orders.empty?
|
||||
= t '.no_finished_orders'
|
||||
- else
|
||||
%table.table.table-striped
|
||||
%thead
|
||||
%tr
|
||||
%th= heading_helper Order, :name
|
||||
%th= heading_helper Order, :ends
|
||||
%th= heading_helper Order, :note
|
||||
%th{colspan: "2"}
|
||||
%tbody
|
||||
- for order in @orders
|
||||
%tr
|
||||
%td= order.name
|
||||
%td= format_time(order.ends)
|
||||
%td= truncate(order.note)
|
||||
%td= receive_button order, class: 'btn-small' unless order.stockit?
|
||||
%td
|
||||
= link_to t('ui.show'), order, class: 'btn btn-small'
|
||||
= order_pdf order, :fax, t('orders.show.download.fax_pdf'), class: 'btn btn-small'
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue