Move StockArticle#history to StockArticle#show
This commit is contained in:
parent
a3e82f5304
commit
fef8c6d99f
8 changed files with 42 additions and 49 deletions
|
@ -31,6 +31,11 @@ class StockitController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def show
|
||||
@stock_article = StockArticle.find(params[:id])
|
||||
@stock_changes = @stock_article.stock_changes.order('stock_changes.created_at DESC')
|
||||
end
|
||||
|
||||
def destroy
|
||||
@article = StockArticle.find(params[:id])
|
||||
@article.mark_as_deleted
|
||||
|
@ -55,9 +60,4 @@ class StockitController < ApplicationController
|
|||
|
||||
render :partial => 'form', :locals => {:stock_article => stock_article}
|
||||
end
|
||||
|
||||
def history
|
||||
@stock_article = StockArticle.undeleted.find(params[:stock_article_id])
|
||||
@stock_changes = @stock_article.stock_changes.order('stock_changes.created_at DESC').each {|s| s.readonly!}
|
||||
end
|
||||
end
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
%tbody
|
||||
- for article in @stock_articles
|
||||
%tr{:class => stock_article_classes(article), :id => "stockArticle-#{article.id}"}
|
||||
%td=h article.name
|
||||
%td= link_to article.name, article
|
||||
%td= article.quantity
|
||||
%td= article.quantity - article.quantity_available
|
||||
%th= article.quantity_available
|
||||
|
@ -56,7 +56,6 @@
|
|||
%td= article.article_category.name
|
||||
%td
|
||||
= link_to t('ui.edit'), edit_stock_article_path(article), class: 'btn btn-mini'
|
||||
= link_to t('ui.history'), stock_article_history_path(article), class: 'btn btn-mini'
|
||||
= link_to t('ui.delete'), article, :method => :delete, :confirm => t('.confirm_delete'),
|
||||
class: 'btn btn-mini btn-danger', :remote => true
|
||||
%p
|
||||
|
|
|
@ -1731,15 +1731,6 @@ de:
|
|||
title: Lagerartikel bearbeiten
|
||||
form:
|
||||
price_hint: Um Chaos zu vermeiden können bis auf weiteres die Preise von angelegten Lagerartikeln nicht mehr verändert werden.
|
||||
history:
|
||||
change_quantity: Veränderung
|
||||
datetime: Zeitpunkt
|
||||
delivery: Lieferung
|
||||
new_quantity: Neuer Bestand
|
||||
order: Bestellung
|
||||
reason: Ereignis
|
||||
stock_changes: Verlauf anzeigen für »%{article_name}«
|
||||
stock_taking: Inventur
|
||||
index:
|
||||
article:
|
||||
article: Artikel
|
||||
|
@ -1765,6 +1756,15 @@ de:
|
|||
new:
|
||||
search_text: ! 'Suche nache Artikeln aus allen Katalogen:'
|
||||
title: Neuen Lagerartikel anlegen
|
||||
show:
|
||||
change_quantity: Veränderung
|
||||
datetime: Zeitpunkt
|
||||
delivery: Lieferung
|
||||
new_quantity: Neuer Bestand
|
||||
order: Bestellung
|
||||
reason: Ereignis
|
||||
stock_changes: Verlauf anzeigen für »%{article_name}«
|
||||
stock_taking: Inventur
|
||||
stock_create:
|
||||
notice: Lagerartikel wurde gespeichert.
|
||||
stock_update:
|
||||
|
@ -1889,7 +1889,6 @@ de:
|
|||
close: Schließen
|
||||
delete: Löschen
|
||||
edit: Bearbeiten
|
||||
history: Verlauf anzeigen
|
||||
marks:
|
||||
close: ! '×'
|
||||
success: <i class="icon icon-ok"></i>
|
||||
|
|
|
@ -1735,15 +1735,6 @@ en:
|
|||
title: Edit stock articles
|
||||
form:
|
||||
price_hint: To avoid choas, it is not possible to edit the prices of already added stock articles until further notice.
|
||||
history:
|
||||
change_quantity: Change
|
||||
datetime: Time
|
||||
delivery: Delivery
|
||||
new_quantity: New quantity
|
||||
order: Order
|
||||
reason: Reason
|
||||
stock_changes: Stock quantity changes of ‘%{article_name}’
|
||||
stock_taking: Inventory
|
||||
index:
|
||||
article:
|
||||
article: Article
|
||||
|
@ -1769,6 +1760,15 @@ en:
|
|||
new:
|
||||
search_text: ! 'Search for articles in all catalogues:'
|
||||
title: Add new stock article
|
||||
show:
|
||||
change_quantity: Change
|
||||
datetime: Time
|
||||
delivery: Delivery
|
||||
new_quantity: New quantity
|
||||
order: Order
|
||||
reason: Reason
|
||||
stock_changes: Stock quantity changes of ‘%{article_name}’
|
||||
stock_taking: Inventory
|
||||
stock_create:
|
||||
notice: Stock article was created.
|
||||
stock_update:
|
||||
|
@ -1893,7 +1893,6 @@ en:
|
|||
close: Close
|
||||
delete: Delete
|
||||
edit: Edit
|
||||
history: Show history
|
||||
marks:
|
||||
close: ! '×'
|
||||
success: <i class="icon icon-ok"></i>
|
||||
|
|
|
@ -1737,15 +1737,6 @@ fr:
|
|||
title: Modifier l'article
|
||||
form:
|
||||
price_hint: Pour éviter que ça soit le bazar, les prix des articles en stock ne peuvent plus être modifiés.
|
||||
history:
|
||||
change_quantity: Modification
|
||||
datetime: Temps
|
||||
delivery: Réapprovisionnement
|
||||
new_quantity: Nouveau stock
|
||||
order: Commande
|
||||
reason: Raison
|
||||
stock_changes: Afficher l'historique pour "%{article_name}"
|
||||
stock_taking: Inventaire
|
||||
index:
|
||||
article:
|
||||
article: Article
|
||||
|
@ -1771,6 +1762,15 @@ fr:
|
|||
new:
|
||||
search_text: ! 'Rechercher des articles dans tous les catalogues:'
|
||||
title: Ajouter un article au stock
|
||||
show:
|
||||
change_quantity: Modification
|
||||
datetime: Temps
|
||||
delivery: Réapprovisionnement
|
||||
new_quantity: Nouveau stock
|
||||
order: Commande
|
||||
reason: Raison
|
||||
stock_changes: Afficher l'historique pour "%{article_name}"
|
||||
stock_taking: Inventaire
|
||||
stock_create:
|
||||
notice: L'article a été sauvegardé.
|
||||
stock_update:
|
||||
|
@ -1903,7 +1903,6 @@ fr:
|
|||
close: Fermer
|
||||
delete: Supprimer
|
||||
edit: Modifier
|
||||
history: Afficher l'historique
|
||||
marks:
|
||||
close: ! '×'
|
||||
success: <i class="icon icon-ok"></i>
|
||||
|
|
|
@ -1663,15 +1663,6 @@ nl:
|
|||
title:
|
||||
form:
|
||||
price_hint:
|
||||
history:
|
||||
change_quantity:
|
||||
datetime:
|
||||
delivery:
|
||||
new_quantity:
|
||||
order:
|
||||
reason:
|
||||
stock_changes:
|
||||
stock_taking:
|
||||
index:
|
||||
article:
|
||||
article:
|
||||
|
@ -1697,6 +1688,15 @@ nl:
|
|||
new:
|
||||
search_text:
|
||||
title:
|
||||
show:
|
||||
change_quantity:
|
||||
datetime:
|
||||
delivery:
|
||||
new_quantity:
|
||||
order:
|
||||
reason:
|
||||
stock_changes:
|
||||
stock_taking:
|
||||
stock_create:
|
||||
notice: Voorraadsartikel is opgeslagen.
|
||||
stock_update:
|
||||
|
@ -1821,7 +1821,6 @@ nl:
|
|||
close: Sluiten
|
||||
delete: Verwijder
|
||||
edit: Bewerk
|
||||
history:
|
||||
marks:
|
||||
close: ! '×'
|
||||
success: <i class="icon icon-ok"></i>
|
||||
|
|
|
@ -97,8 +97,6 @@ Foodsoft::Application.routes.draw do
|
|||
get :articles_search
|
||||
get :fill_new_stock_article_form
|
||||
end
|
||||
|
||||
get :history
|
||||
end
|
||||
|
||||
resources :suppliers do
|
||||
|
|
Loading…
Reference in a new issue