Resolve merge conflicts
This commit is contained in:
commit
11117738ce
9 changed files with 126 additions and 122 deletions
|
@ -7,11 +7,11 @@ module StockitHelper
|
|||
|
||||
def link_to_stock_change_reason(stock_change)
|
||||
if stock_change.delivery_id
|
||||
link_to t('.delivery'), supplier_delivery_path(stock_change.delivery.supplier, stock_change.delivery)
|
||||
link_to Delivery.model_name.human, supplier_delivery_path(stock_change.delivery.supplier, stock_change.delivery)
|
||||
elsif stock_change.order_id
|
||||
link_to t('.order'), order_path(stock_change.order)
|
||||
link_to Order.model_name.human, order_path(stock_change.order)
|
||||
elsif stock_change.stock_taking_id
|
||||
link_to t('.stock_taking'), stock_taking_path(stock_change.stock_taking)
|
||||
link_to StockTaking.model_name.human, stock_taking_path(stock_change.stock_taking)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -14,10 +14,14 @@ class StockArticle < Article
|
|||
|
||||
# Check for unclosed orders and substract its ordered quantity
|
||||
def quantity_available
|
||||
quantity - OrderArticle.where(article_id: id).
|
||||
quantity - quantity_ordered
|
||||
end
|
||||
|
||||
def quantity_ordered
|
||||
OrderArticle.where(article_id: id).
|
||||
joins(:order).where("orders.state = 'open' OR orders.state = 'finished'").sum(:units_to_order)
|
||||
end
|
||||
|
||||
|
||||
def quantity_history
|
||||
stock_changes.reorder('stock_changes.created_at ASC').map{|s| s.quantity}.cumulative_sum
|
||||
end
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
%p
|
||||
= simple_fields_for "stock_taking[stock_change_attributes][]", stock_change do |form|
|
||||
= form.hidden_field :stock_article_id
|
||||
= "Menge (#{stock_change.stock_article.quantity_available})"
|
||||
= t '.amount'
|
||||
(#{stock_change.stock_article.quantity_available})
|
||||
= form.text_field :quantity, :size => 5, :autocomplete => 'off'
|
||||
%span{:data => {:toggle => :tooltip, :title => render(:partial => 'shared/article_price_info', :locals => {:article => stock_change.stock_article})}}
|
||||
%b= stock_change.stock_article.name
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%tr{:class => stock_article_classes(stock_article), :id => "stockArticle-#{stock_article.id}"}
|
||||
%td= link_to stock_article.name, stock_article
|
||||
%td= stock_article.quantity
|
||||
%td= stock_article.quantity - stock_article.quantity_available
|
||||
%td= stock_article.quantity_ordered
|
||||
%th= stock_article.quantity_available
|
||||
%td= stock_article.unit
|
||||
%td= stock_article.price
|
||||
|
|
|
@ -56,15 +56,15 @@
|
|||
%table.table.table-hover#articles
|
||||
%thead
|
||||
%tr
|
||||
%th= t '.article.article'
|
||||
%th= t '.article.stock'
|
||||
%th= t '.article.ordered'
|
||||
%th= t '.article.available'
|
||||
%th= t '.article.unit'
|
||||
%th= t '.article.price'
|
||||
%th= t '.article.vat'
|
||||
%th= t '.article.supplier'
|
||||
%th= t '.article.category'
|
||||
%th= Article.model_name.human
|
||||
%th= heading_helper StockArticle, :quantity
|
||||
%th= heading_helper StockArticle, :quantity_ordered
|
||||
%th= heading_helper StockArticle, :available
|
||||
%th= heading_helper StockArticle, :unit
|
||||
%th= heading_helper StockArticle, :price
|
||||
%th= heading_helper StockArticle, :tax
|
||||
%th= heading_helper StockArticle, :supplier
|
||||
%th= heading_helper StockArticle, :article_category
|
||||
%th
|
||||
%tbody#articles-tbody
|
||||
- for stock_article in @stock_articles
|
||||
|
|
|
@ -95,8 +95,10 @@ de:
|
|||
stock_article:
|
||||
available: Verfügbar
|
||||
price: Nettopreis
|
||||
quantity: im Lager
|
||||
quantity_available: Verfügbarer Bestand
|
||||
quantity_available_short: Verf.
|
||||
quantity_ordered: Davon bestellt
|
||||
stock_taking:
|
||||
date: Datum
|
||||
note: Notiz
|
||||
|
@ -1392,6 +1394,7 @@ de:
|
|||
new_inventory: Neue Inventur anlegen
|
||||
title: Inventurübersicht
|
||||
new:
|
||||
amount: Menge
|
||||
create: anlegen
|
||||
stock_articles: Lagerartikel
|
||||
temp_inventory: vorläufigen Lagerbestand
|
||||
|
@ -1424,16 +1427,6 @@ de:
|
|||
form:
|
||||
price_hint: Um Chaos zu vermeiden können bis auf weiteres die Preise von angelegten Lagerartikeln nicht mehr verändert werden.
|
||||
index:
|
||||
article:
|
||||
article: Artikel
|
||||
available: verfügbar
|
||||
category: Kategorie
|
||||
ordered: davon bestellt
|
||||
price: Preis
|
||||
stock: im Lager
|
||||
supplier: Lieferantin
|
||||
unit: Einheit
|
||||
vat: MwSt
|
||||
confirm_delete: Bist Du sicher?
|
||||
new_delivery: Neue Lieferung ..
|
||||
new_stock_article: Neuen Lagerartikel anlegen
|
||||
|
@ -1451,12 +1444,9 @@ de:
|
|||
show:
|
||||
change_quantity: Veränderung
|
||||
datetime: Zeitpunkt
|
||||
delivery: Lieferung
|
||||
new_quantity: Neuer Bestand
|
||||
order: Bestellung
|
||||
reason: Ereignis
|
||||
stock_changes: Verlauf des Lagerbestands
|
||||
stock_taking: Inventur
|
||||
stock_create:
|
||||
notice: Lagerartikel wurde gespeichert.
|
||||
stock_update:
|
||||
|
|
|
@ -95,8 +95,10 @@ en:
|
|||
stock_article:
|
||||
available: Available
|
||||
price: Price
|
||||
quantity: In stock
|
||||
quantity_available: Available quantity
|
||||
quantity_available_short: Avail.
|
||||
quantity_ordered: Ordered
|
||||
stock_taking:
|
||||
date: Date
|
||||
note: Note
|
||||
|
@ -1396,6 +1398,7 @@ en:
|
|||
new_inventory: Create new inventory
|
||||
title: Inventory overview
|
||||
new:
|
||||
amount: Amount
|
||||
create: create
|
||||
stock_articles: Stock articles
|
||||
temp_inventory: temporary inventory
|
||||
|
@ -1430,16 +1433,6 @@ en:
|
|||
form:
|
||||
price_hint: To avoid choas, it is not possible to edit the prices of already added stock articles until further notice.
|
||||
index:
|
||||
article:
|
||||
article: Article
|
||||
available: available
|
||||
category: Category
|
||||
ordered: ordered
|
||||
price: Price
|
||||
stock: In stock
|
||||
supplier: Supplier
|
||||
unit: Unit
|
||||
vat: VAT
|
||||
confirm_delete: Are you sure you want to delete?
|
||||
new_delivery: New delivery ...
|
||||
new_stock_article: Add new stock article
|
||||
|
@ -1457,12 +1450,9 @@ en:
|
|||
show:
|
||||
change_quantity: Change
|
||||
datetime: Time
|
||||
delivery: Delivery
|
||||
new_quantity: New quantity
|
||||
order: Order
|
||||
reason: Reason
|
||||
stock_changes: Stock quantity changes
|
||||
stock_taking: Inventory
|
||||
stock_article:
|
||||
confirm_delete: Are you sure you want to delete the stock article »%{name}«?
|
||||
update:
|
||||
|
|
|
@ -95,8 +95,10 @@ fr:
|
|||
stock_article:
|
||||
available: Disponible
|
||||
price: Prix net
|
||||
quantity: en Stock
|
||||
quantity_available:
|
||||
quantity_available_short:
|
||||
quantity_ordered: Commandés
|
||||
stock_taking:
|
||||
date:
|
||||
note:
|
||||
|
@ -158,21 +160,21 @@ fr:
|
|||
exclusion: répétition hebdomadaire invalide pour un boulot déjà effectué
|
||||
models:
|
||||
article: Article
|
||||
article_category: la nouvelle catégorie
|
||||
delivery: le nouveau réapprovisionnement
|
||||
financial_transaction: la transaction
|
||||
invoice: la nouvelle facture
|
||||
article_category: Catégorie
|
||||
delivery: Réapprovisionnement
|
||||
financial_transaction: Transaction
|
||||
invoice: Facture
|
||||
message: Message
|
||||
order: la nouvelle commande
|
||||
order: Commande
|
||||
order_article: Article à commander
|
||||
order_comment: un nouveau commentaire
|
||||
ordergroup: la nouvelle cellule
|
||||
order_comment: Commentaire
|
||||
ordergroup: Cellule
|
||||
stock_article: l'article à stocker
|
||||
stock_taking: Inventaire
|
||||
supplier: FournisseusE_r
|
||||
task: comme nouveau boulot
|
||||
user: le nouveau membre
|
||||
workgroup: la nouvelle équipe
|
||||
task: Boulot
|
||||
user: Membre
|
||||
workgroup: Équipe
|
||||
admin:
|
||||
access_to: accès à
|
||||
actions: Actions
|
||||
|
@ -1399,6 +1401,7 @@ fr:
|
|||
new_inventory: Inventorier le stock
|
||||
title: Aperçu de l'inventaire
|
||||
new:
|
||||
amount:
|
||||
create: ajouter
|
||||
stock_articles: Articles en stock
|
||||
temp_inventory: l'inventaire courant
|
||||
|
@ -1433,16 +1436,6 @@ fr:
|
|||
form:
|
||||
price_hint: Pour éviter que ça soit le bazar, les prix des articles en stock ne peuvent plus être modifiés.
|
||||
index:
|
||||
article:
|
||||
article: Article
|
||||
available: disponible
|
||||
category: Catégorie
|
||||
ordered: commandés
|
||||
price: Prix
|
||||
stock: en Stock
|
||||
supplier: FournisseusE_r
|
||||
unit: Unité
|
||||
vat: TVA
|
||||
confirm_delete: T'es sûrE de ton coup?
|
||||
new_delivery: Réapprovisionner le stock...
|
||||
new_stock_article: Ajouter un article au stock
|
||||
|
@ -1460,12 +1453,9 @@ fr:
|
|||
show:
|
||||
change_quantity: Modification
|
||||
datetime: Temps
|
||||
delivery: Réapprovisionnement
|
||||
new_quantity: Nouveau stock
|
||||
order: Commande
|
||||
reason: Raison
|
||||
stock_changes: Afficher l'historique
|
||||
stock_taking: Inventaire
|
||||
stock_create:
|
||||
notice: L'article a été sauvegardé.
|
||||
stock_update:
|
||||
|
|
|
@ -95,8 +95,10 @@ nl:
|
|||
stock_article:
|
||||
available: Beschikbaar
|
||||
price: Prijs
|
||||
quantity: Op voorraad
|
||||
quantity_available: Beschikbaar
|
||||
quantity_available_short: Besch.
|
||||
quantity_ordered: Besteld
|
||||
stock_taking:
|
||||
date: Datum
|
||||
note: Notitie
|
||||
|
@ -289,7 +291,7 @@ nl:
|
|||
title: Categorie bewerken
|
||||
index:
|
||||
confirm_delete: Weet je het zeker?
|
||||
new: Nieuwe categorie maken
|
||||
new: Nieuwe categorie
|
||||
title: Categoriën
|
||||
new:
|
||||
title: Nieuwe categorie maken
|
||||
|
@ -365,7 +367,7 @@ nl:
|
|||
restrict_region: Alleen uit de regio
|
||||
title: Artikel importeren
|
||||
new: Nieuw artikel
|
||||
new_order: Bestelling aanmaken
|
||||
new_order: Nieuwe bestelling
|
||||
search_placeholder: Naam ...
|
||||
title: Artikelen van %{supplier} (%{count})
|
||||
upload: Artikelen uploaden
|
||||
|
@ -942,16 +944,55 @@ nl:
|
|||
header: ! '%{user} schreef op %{date}:'
|
||||
subject: Feedback van %{email}
|
||||
foodsoft_message:
|
||||
footer:
|
||||
footer: ! 'Antwoorden: %{reply_url}
|
||||
|
||||
Bericht online lezen: %{msg_url}
|
||||
|
||||
Berichtinstellingen: %{profile_url}'
|
||||
invite:
|
||||
subject: Uitnodiging voor de foodcoop
|
||||
text:
|
||||
text: ! 'Hallo!
|
||||
|
||||
|
||||
%{user} <%{mail}> heeft je uitgenodigd om deel te worden van de groep "%{group}".
|
||||
|
||||
Om lid te worden van de foodcoop en de uitnodiging te accepteren, ga naar: %{link}
|
||||
|
||||
Dit kan maar een keer en uiterlijk tot %{expires}.
|
||||
|
||||
|
||||
Groeten van de foodcoop.'
|
||||
negative_balance:
|
||||
subject:
|
||||
text:
|
||||
subject: Negatief tegoed
|
||||
text: ! 'Beste %{group},
|
||||
|
||||
|
||||
Je tegoed is onder nul gekomen op %{when}: %{balance}
|
||||
|
||||
|
||||
Er werd %{amount} afgeschreven voor "%{note}" door %{user}.
|
||||
|
||||
|
||||
Zorg er alsjeblieft voor dat tegoed weer positief wordt.
|
||||
|
||||
|
||||
|
||||
Hartlijke groet van %{foodcoop}.'
|
||||
not_enough_users_assigned:
|
||||
subject:
|
||||
text:
|
||||
subject: ! '"%{task}" heeft nog mensen nodig!'
|
||||
text: ! 'Beste %{user},
|
||||
|
||||
|
||||
De taak ''%{task}'' van jouw werkgroep op %{when} kan nog iemand gebruiken!
|
||||
|
||||
|
||||
Als je je hiervoor nog niet aangemeld hebt is dit je kans:
|
||||
|
||||
|
||||
%{workgroup_tasks_url}
|
||||
|
||||
|
||||
Jouw taken: %{user_tasks_url}'
|
||||
order_result:
|
||||
subject: ! 'Bestelling gesloten: %{name}'
|
||||
text0: ! 'Beste %{ordergroup}.
|
||||
|
@ -1124,7 +1165,7 @@ nl:
|
|||
warning_ordered: ! 'Opgelet: rood gemarkeerde artikelen zijn al besteld door leden. Als je ze hier deselecteert, worden alle bestaande ledenbestellingen van deze artikelen verwijderd.'
|
||||
warning_ordered_stock: ! 'Opgelet: rood gemarkeerde artikelen zijn al besteld of gekocht door leden. Als je ze hier deselecteert, worden alle bestaande ledenbestellingen/-aankopen van deze artikelen verwijderd, en worden ze niet afgerekend.'
|
||||
new:
|
||||
title: Nieuwe bestelling maken
|
||||
title: Nieuwe bestelling openen
|
||||
show:
|
||||
action_end: Sluiten!
|
||||
amounts: ! 'Totaal netto/bruto:'
|
||||
|
@ -1257,7 +1298,7 @@ nl:
|
|||
access: Toegang tot
|
||||
activated: actief
|
||||
address: Adres
|
||||
apple_limit:
|
||||
apple_limit: Appelpunten bestellingslimiet
|
||||
contact: Contact
|
||||
deactivated: inactief
|
||||
description: Beschrijving
|
||||
|
@ -1330,33 +1371,34 @@ nl:
|
|||
'yes': Ja
|
||||
stock_takings:
|
||||
create:
|
||||
notice: Inventarisatie is aangelegd.
|
||||
notice: Inventaris is opgenomen.
|
||||
edit:
|
||||
title:
|
||||
title: Inventaris aanpassen
|
||||
index:
|
||||
new_inventory:
|
||||
title:
|
||||
new_inventory: Nieuwe inventaris opnemen
|
||||
title: Inventarisoverzicht
|
||||
new:
|
||||
create:
|
||||
amount: Aantal
|
||||
create: aanmaken
|
||||
stock_articles: Voorraadartikelen
|
||||
temp_inventory: tijdelijke inventaris
|
||||
text_deviations:
|
||||
text_need_articles:
|
||||
title:
|
||||
text_deviations: Vul alle afwijkingen in van de %{inv_link}. Als er minder is dan vermeld, gebruik dan een negatief getal.
|
||||
text_need_articles: Je moet een nieuw voorraadartikel %{create_link} voordat je het hier kunt gebruiken.
|
||||
title: Inventaris opnemen
|
||||
show:
|
||||
amount:
|
||||
article:
|
||||
confirm_delete:
|
||||
date:
|
||||
note:
|
||||
overview:
|
||||
supplier:
|
||||
title:
|
||||
unit:
|
||||
amount: Aantal
|
||||
article: Artikel
|
||||
confirm_delete: Wil je de inventaris echt verwijderen?
|
||||
date: Datum
|
||||
note: Notitie
|
||||
overview: Inventarisoverzicht
|
||||
supplier: Leverancier
|
||||
title: Inventarisoverzicht
|
||||
unit: Eenheid
|
||||
stock_takings:
|
||||
confirm_delete:
|
||||
date:
|
||||
note:
|
||||
confirm_delete: Weet je zeker dat je dit wilt verwijderen?
|
||||
date: Datum
|
||||
note: Notitie
|
||||
update:
|
||||
notice: Inventarisatie is bijgewerkt.
|
||||
stockit:
|
||||
|
@ -1369,39 +1411,26 @@ nl:
|
|||
form:
|
||||
price_hint: Om chaos te voorkomen, kun je de prijs van bestaande voorraadartikelen niet aanpassen.
|
||||
index:
|
||||
article:
|
||||
article: Artikel
|
||||
available: beschikbaar
|
||||
category: Categorie
|
||||
ordered: besteld
|
||||
price: Prijs
|
||||
stock: Op voorraad
|
||||
supplier: Leverancier
|
||||
unit: Eenheid
|
||||
vat: BTW
|
||||
confirm_delete: Weet je zeker dat je dit wilt verwijderen?
|
||||
new_delivery: Nieuwe levering ...
|
||||
new_stock_article: Nieuw voorraadartikel
|
||||
new_stock_taking: Inventaris aanleggen
|
||||
new_stock_taking: Inventaris nemen
|
||||
order_online: Voorraadbestelling openen
|
||||
show_stock_takings:
|
||||
stock_count:
|
||||
stock_worth:
|
||||
title:
|
||||
toggle_unavailable:
|
||||
view_options:
|
||||
show_stock_takings: Inventarisoverzicht
|
||||
stock_count: ! 'Aantal artikelen:'
|
||||
stock_worth: ! 'Waarde van huidige voorraad:'
|
||||
title: Voorraad (%{article_count})
|
||||
toggle_unavailable: Niet beschikbare artikelen tonen/verbergen
|
||||
view_options: Weergave
|
||||
new:
|
||||
search_text:
|
||||
title:
|
||||
search_text: ! 'Artikelen zoeken in alle catalogi:'
|
||||
title: Nieuw voorraadartikel maken
|
||||
show:
|
||||
change_quantity:
|
||||
datetime:
|
||||
delivery:
|
||||
new_quantity:
|
||||
order:
|
||||
reason:
|
||||
stock_changes:
|
||||
stock_taking:
|
||||
change_quantity: Verandering
|
||||
datetime: Tijd
|
||||
new_quantity: Nieuw aantal
|
||||
reason: Reden
|
||||
stock_changes: Verloop
|
||||
stock_create:
|
||||
notice: Voorraadsartikel is opgeslagen.
|
||||
stock_update:
|
||||
|
|
Loading…
Reference in a new issue