Added note to deliveries. Closes #34
This commit is contained in:
parent
5e1fc73c29
commit
16346e3529
5 changed files with 26 additions and 5 deletions
|
@ -5,10 +5,7 @@
|
||||||
.column_content
|
.column_content
|
||||||
= f.error_messages
|
= f.error_messages
|
||||||
= f.hidden_field :supplier_id
|
= f.hidden_field :supplier_id
|
||||||
%p
|
%b Lagerartikel des Lieferanten
|
||||||
%b= f.label :delivered_on
|
|
||||||
= f.date_select :delivered_on
|
|
||||||
%h2 Lagerartikel des Lieferanten
|
|
||||||
#stock_changes
|
#stock_changes
|
||||||
- f.fields_for :stock_changes do |stock_change_form|
|
- f.fields_for :stock_changes do |stock_change_form|
|
||||||
%p
|
%p
|
||||||
|
@ -19,6 +16,14 @@
|
||||||
= stock_change_form.check_box :_delete
|
= stock_change_form.check_box :_delete
|
||||||
%p
|
%p
|
||||||
= remote_link_to "Lagerartikel hinzufügen", :url => {:action => 'add_stock_change', :supplier_id => @supplier.id}
|
= remote_link_to "Lagerartikel hinzufügen", :url => {:action => 'add_stock_change', :supplier_id => @supplier.id}
|
||||||
|
%hr/
|
||||||
|
%p
|
||||||
|
%b= f.label :delivered_on, "Lieferdatum"
|
||||||
|
= f.date_select :delivered_on
|
||||||
|
%p
|
||||||
|
%b= f.label :note, "Notiz"
|
||||||
|
%br/
|
||||||
|
= f.text_area :note, :size => "35x8"
|
||||||
%p
|
%p
|
||||||
= f.submit "Lieferung speichern"
|
= f.submit "Lieferung speichern"
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
%tr
|
%tr
|
||||||
%th Geliefert am
|
%th Geliefert am
|
||||||
%th Rechnungsbetrag
|
%th Rechnungsbetrag
|
||||||
|
%th Notiz
|
||||||
%th
|
%th
|
||||||
%th
|
%th
|
||||||
%th
|
%th
|
||||||
|
@ -13,6 +14,7 @@
|
||||||
%tr
|
%tr
|
||||||
%td=h delivery.delivered_on
|
%td=h delivery.delivered_on
|
||||||
%td= link_to_invoice(delivery)
|
%td= link_to_invoice(delivery)
|
||||||
|
%td= truncate delivery.note
|
||||||
%td= link_to 'Anzeigen', [@supplier, delivery]
|
%td= link_to 'Anzeigen', [@supplier, delivery]
|
||||||
%td= link_to 'Bearbeiten', edit_supplier_delivery_path(@supplier,delivery)
|
%td= link_to 'Bearbeiten', edit_supplier_delivery_path(@supplier,delivery)
|
||||||
%td= link_to 'Löschen', [@supplier,delivery], :confirm => 'Are you sure?', :method => :delete
|
%td= link_to 'Löschen', [@supplier,delivery], :confirm => 'Are you sure?', :method => :delete
|
||||||
|
|
|
@ -13,6 +13,9 @@
|
||||||
%p
|
%p
|
||||||
%b bereinigter Rechnungsbetrag:
|
%b bereinigter Rechnungsbetrag:
|
||||||
= number_to_currency @delivery.invoice.net_amount
|
= number_to_currency @delivery.invoice.net_amount
|
||||||
|
%p
|
||||||
|
%b Notiz:
|
||||||
|
= simple_format @delivery.note
|
||||||
|
|
||||||
%h2 Artikel
|
%h2 Artikel
|
||||||
%table.list{:style => "width:30em"}
|
%table.list{:style => "width:30em"}
|
||||||
|
|
9
db/migrate/20090812110010_add_note_to_deliveries.rb
Normal file
9
db/migrate/20090812110010_add_note_to_deliveries.rb
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
class AddNoteToDeliveries < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
add_column :deliveries, :note, :text
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
remove_column :deliveries, :note
|
||||||
|
end
|
||||||
|
end
|
|
@ -9,7 +9,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20090731132547) do
|
ActiveRecord::Schema.define(:version => 20090812110010) do
|
||||||
|
|
||||||
create_table "article_categories", :force => true do |t|
|
create_table "article_categories", :force => true do |t|
|
||||||
t.string "name", :default => "", :null => false
|
t.string "name", :default => "", :null => false
|
||||||
|
@ -75,6 +75,7 @@ ActiveRecord::Schema.define(:version => 20090731132547) do
|
||||||
t.integer "supplier_id"
|
t.integer "supplier_id"
|
||||||
t.date "delivered_on"
|
t.date "delivered_on"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
|
t.text "note"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "financial_transactions", :force => true do |t|
|
create_table "financial_transactions", :force => true do |t|
|
||||||
|
@ -261,6 +262,7 @@ ActiveRecord::Schema.define(:version => 20090731132547) do
|
||||||
t.datetime "created_on", :null => false
|
t.datetime "created_on", :null => false
|
||||||
t.datetime "updated_on", :null => false
|
t.datetime "updated_on", :null => false
|
||||||
t.integer "required_users", :default => 1
|
t.integer "required_users", :default => 1
|
||||||
|
t.boolean "weekly"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "tasks", ["due_date"], :name => "index_tasks_on_due_date"
|
add_index "tasks", ["due_date"], :name => "index_tasks_on_due_date"
|
||||||
|
|
Loading…
Reference in a new issue