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
|
||||
= f.error_messages
|
||||
= f.hidden_field :supplier_id
|
||||
%p
|
||||
%b= f.label :delivered_on
|
||||
= f.date_select :delivered_on
|
||||
%h2 Lagerartikel des Lieferanten
|
||||
%b Lagerartikel des Lieferanten
|
||||
#stock_changes
|
||||
- f.fields_for :stock_changes do |stock_change_form|
|
||||
%p
|
||||
|
@ -19,6 +16,14 @@
|
|||
= stock_change_form.check_box :_delete
|
||||
%p
|
||||
= 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
|
||||
= f.submit "Lieferung speichern"
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
%tr
|
||||
%th Geliefert am
|
||||
%th Rechnungsbetrag
|
||||
%th Notiz
|
||||
%th
|
||||
%th
|
||||
%th
|
||||
|
@ -13,6 +14,7 @@
|
|||
%tr
|
||||
%td=h delivery.delivered_on
|
||||
%td= link_to_invoice(delivery)
|
||||
%td= truncate delivery.note
|
||||
%td= link_to 'Anzeigen', [@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
|
||||
|
|
|
@ -13,6 +13,9 @@
|
|||
%p
|
||||
%b bereinigter Rechnungsbetrag:
|
||||
= number_to_currency @delivery.invoice.net_amount
|
||||
%p
|
||||
%b Notiz:
|
||||
= simple_format @delivery.note
|
||||
|
||||
%h2 Artikel
|
||||
%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.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20090731132547) do
|
||||
ActiveRecord::Schema.define(:version => 20090812110010) do
|
||||
|
||||
create_table "article_categories", :force => true do |t|
|
||||
t.string "name", :default => "", :null => false
|
||||
|
@ -75,6 +75,7 @@ ActiveRecord::Schema.define(:version => 20090731132547) do
|
|||
t.integer "supplier_id"
|
||||
t.date "delivered_on"
|
||||
t.datetime "created_at"
|
||||
t.text "note"
|
||||
end
|
||||
|
||||
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 "updated_on", :null => false
|
||||
t.integer "required_users", :default => 1
|
||||
t.boolean "weekly"
|
||||
end
|
||||
|
||||
add_index "tasks", ["due_date"], :name => "index_tasks_on_due_date"
|
||||
|
|
Loading…
Reference in a new issue