Complete refactoring of orders-workflow.
OrderResult tables are removed. Data consistency is now possible through new article.price-history (ArticlePrice). Balancing-workflow needs to be updated.
This commit is contained in:
parent
80287aeea4
commit
9eb2125f15
98 changed files with 1121 additions and 1717 deletions
|
|
@ -1,11 +1,13 @@
|
|||
module OrdersHelper
|
||||
require 'iconv'
|
||||
|
||||
# This method is needed to convert special characters into UTF-8 for rendering PDF files correctly.
|
||||
def replace_UTF8(field)
|
||||
ic_ignore = Iconv.new('ISO-8859-15//IGNORE//TRANSLIT', 'UTF-8')
|
||||
field = ic_ignore.iconv(field)
|
||||
ic_ignore.close
|
||||
field
|
||||
def update_articles_link(order, text, view)
|
||||
link_to_remote text, :url => order_path(order, :view => view),
|
||||
:update => 'articles', :before => "Element.show('loader')", :success => "Element.hide('loader')",
|
||||
:method => :get
|
||||
end
|
||||
|
||||
def link_to_pdf(order, action)
|
||||
link_to image_tag("save_pdf.png", :size => "16x16", :border => "0", :alt => "PDF erstellen"),
|
||||
{ :action => action, :id => order, :format => :pdf }, { :title => "PDF erstellen" }
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue