diff --git a/README.md b/README.md index a09fd376..7f447972 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ We changed the branch structure. The rails3 branch is now master. But you can sa FoodSoft ========= +[![Code Climate](https://codeclimate.com/github/foodcoops/foodsoft.png)](https://codeclimate.com/github/foodcoops/foodsoft) +[![Dependency Status](https://gemnasium.com/foodcoops/foodsoft.png)](https://gemnasium.com/foodcoops/foodsoft) Web-based software to manage a non-profit food coop (product catalog, ordering, accounting, job scheduling). @@ -13,7 +15,7 @@ More information about using this software and contributing can be found on the Install -------- -Have a look at [DEVELOPMENT](https://github.com/foodcoops/foodsoft/blob/master/doc/DEVELOPMENT) (possibly outdated) and the (more recent) [Developing](https://github.com/foodcoops/foodsoft/wiki/Developing) page on the wiki. +Have a look at [DEVELOPMENT](https://github.com/foodcoops/foodsoft/blob/master/doc/DEVELOPMENT) (possibly outdated) and the (more recent) [Developing Guidelines](https://github.com/foodcoops/foodsoft/wiki/Developing-Guidelines) page on the wiki. License ------- @@ -31,4 +33,4 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -(See file LICENSE for the full text of the GPL) \ No newline at end of file +(See file LICENSE for the full text of the GPL) diff --git a/app/models/order.rb b/app/models/order.rb index 4878c550..7910dfc3 100644 --- a/app/models/order.rb +++ b/app/models/order.rb @@ -33,7 +33,7 @@ class Order < ActiveRecord::Base end def name - stockit? ? "Lager" : supplier.name + stockit? ? I18n.t('orders.model.stock') : supplier.name end def articles_for_ordering diff --git a/app/views/articles/_edit_all_table.html.haml b/app/views/articles/_edit_all_table.html.haml index eeb609c4..3cbf1412 100644 --- a/app/views/articles/_edit_all_table.html.haml +++ b/app/views/articles/_edit_all_table.html.haml @@ -28,7 +28,9 @@ %td= form.text_field 'note', class: 'input-medium' %td= form.collection_select 'article_category_id', ArticleCategory.all, :id, :name, { :include_blank => true }, class: 'input-small' - %td= form.text_field 'tax', class: 'input-mini' + %td.input-append + = form.text_field 'tax', class: 'input-mini' + %span.add-on % %td= form.text_field 'deposit', class: 'input-mini' - unless article.errors.empty? %tr.alert diff --git a/app/views/articles/_form.html.haml b/app/views/articles/_form.html.haml index 485386d1..ece82629 100644 --- a/app/views/articles/_form.html.haml +++ b/app/views/articles/_form.html.haml @@ -16,7 +16,9 @@ = f.input :price = f.input :unit_quantity = f.input :order_number - = f.input :tax + = f.input :tax, :wrapper => :append do + = f.input_field :tax + %span.add-on % = f.input :deposit .modal-footer = link_to t('ui.close'), '#', class: 'btn', data: {dismiss: 'modal'} diff --git a/app/views/articles/sync.html.haml b/app/views/articles/sync.html.haml index 23683879..d740cb6e 100644 --- a/app/views/articles/sync.html.haml +++ b/app/views/articles/sync.html.haml @@ -22,48 +22,50 @@ %b= @updated_articles.size = t '.update.update_msg' = t('.update.body').html_safe - %table.table - %thead + %table.table + %thead + %tr + %th= t 'simple_form.labels.article.name' + %th= t 'simple_form.labels.article.note' + %th= t 'simple_form.labels.article.manufacturer' + %th= t 'simple_form.labels.article.origin' + %th= t 'simple_form.labels.article.unit' + %th= t '.unit_quantity_short' + %th= t '.price_short' + %th= t 'simple_form.labels.defaults.tax' + %th= t 'simple_form.labels.defaults.deposit' + %th= t 'simple_form.labels.article.article_category' + %tbody + - @updated_articles.each do |updated_article, attrs| + - article = Article.find(updated_article.id) + %tr{:style => 'color:grey'} + %td= article.name + %td= article.note + %td= article.manufacturer + %td= article.origin + %td= article.unit + %td= article.unit_quantity + %td= article.price + %td= article.tax + %td= article.deposit + %td= article.article_category.name if article.article_category %tr - %th= t 'simple_form.labels.article.name' - %th= t 'simple_form.labels.article.note' - %th= t 'simple_form.labels.article.manufacturer' - %th= t 'simple_form.labels.article.origin' - %th= t 'simple_form.labels.article.unit' - %th= t '.unit_quantity_short' - %th= t '.price_short' - %th= t 'simple_form.labels.defaults.tax' - %th= t 'simple_form.labels.defaults.deposit' - %th= t 'simple_form.labels.article.article_category' - %tbody - - @updated_articles.each do |updated_article, attrs| - - article = Article.find(updated_article.id) - %tr{:style => 'color:grey'} - %td= article.name - %td= article.note - %td= article.manufacturer - %td= article.origin - %td= article.unit - %td= article.unit_quantity - %td= article.price - %td= article.tax - %td= article.deposit - %td= article.article_category.name if article.article_category - %tr - = fields_for 'articles[]', updated_article do |form| - %td{:style => highlight_new(attrs, :name)} - = form.text_field 'name', :size => 0 - = form.hidden_field 'shared_updated_on' - %td{:style => highlight_new(attrs, :note)}= form.text_field 'note', class: 'input-small' - %td{:style => highlight_new(attrs, :manufacturer)}= form.text_field 'manufacturer', class: 'input-small' - %td{:style => highlight_new(attrs, :origin)}= form.text_field 'origin', class: 'input-mini' - %td{:style => highlight_new(attrs, :unit)}= form.text_field 'unit', class: 'input-mini' - %td{:style => highlight_new(attrs, :unit_quantity)}= form.text_field 'unit_quantity', class: 'input-mini' - %td{:style => highlight_new(attrs, :price)}= form.text_field 'price', class: 'input-mini' - %td{:style => highlight_new(attrs, :tax)}= form.text_field 'tax', class: 'input-mini' - %td{:style => highlight_new(attrs, :deposit)}= form.text_field 'deposit', class: 'input-mini' - %td= form.select :article_category_id, ArticleCategory.all.map {|a| [ a.name, a.id ] }, - {include_blank: true}, class: 'input-small' + = fields_for 'articles[]', updated_article do |form| + %td{:style => highlight_new(attrs, :name)} + = form.text_field 'name', :size => 0 + = form.hidden_field 'shared_updated_on' + %td{:style => highlight_new(attrs, :note)}= form.text_field 'note', class: 'input-small' + %td{:style => highlight_new(attrs, :manufacturer)}= form.text_field 'manufacturer', class: 'input-small' + %td{:style => highlight_new(attrs, :origin)}= form.text_field 'origin', class: 'input-mini' + %td{:style => highlight_new(attrs, :unit)}= form.text_field 'unit', class: 'input-mini' + %td{:style => highlight_new(attrs, :unit_quantity)}= form.text_field 'unit_quantity', class: 'input-mini' + %td{:style => highlight_new(attrs, :price)}= form.text_field 'price', class: 'input-mini' + %td{:style => highlight_new(attrs, :tax), class: 'input-append'} + = form.text_field 'tax', class: 'input-mini' + %span.add-on % + %td{:style => highlight_new(attrs, :deposit)}= form.text_field 'deposit', class: 'input-mini' + %td= form.select :article_category_id, ArticleCategory.all.map {|a| [ a.name, a.id ] }, + {include_blank: true}, class: 'input-small' %hr/ = hidden_field 'supplier', 'id' = submit_tag t('.submit'), class: 'btn btn-primary' diff --git a/app/views/deliveries/_stock_article_form.html.haml b/app/views/deliveries/_stock_article_form.html.haml index 4bfc15e0..b13dd805 100644 --- a/app/views/deliveries/_stock_article_form.html.haml +++ b/app/views/deliveries/_stock_article_form.html.haml @@ -12,7 +12,9 @@ = f.input :note - if stock_article.new_record? = f.input :price - = f.input :tax + = f.input :tax, :wrapper => :append do + = f.input_field :tax + %span.add-on % = f.input :deposit - else = f.input :price, :input_html => {:disabled => 'disabled'}, :hint => t('stockit.form.price_hint') diff --git a/app/views/stock_takings/_stock_article_form.html.haml b/app/views/stock_takings/_stock_article_form.html.haml index 99898b1a..9e7ec14b 100644 --- a/app/views/stock_takings/_stock_article_form.html.haml +++ b/app/views/stock_takings/_stock_article_form.html.haml @@ -4,7 +4,10 @@ = f.input :unit = f.input :note = f.input :price - = f.input :tax + = f.input :tax, :wrapper => :append do + = f.input_field :tax + %span.add-on % + -# untested, because this view is currently not included (?) = f.input :deposit = f.association :article_category - = f.submit \ No newline at end of file + = f.submit diff --git a/app/views/stockit/_form.html.haml b/app/views/stockit/_form.html.haml index 7f489d04..8b96aea8 100644 --- a/app/views/stockit/_form.html.haml +++ b/app/views/stockit/_form.html.haml @@ -6,7 +6,9 @@ - if stock_article.new_record? = f.input :price - = f.input :tax + = f.input :tax, :wrapper => :append do + = f.input_field :tax + %span.add-on % = f.input :deposit - else = f.input :price, :input_html => {:disabled => 'disabled'}, :hint => t('.form.price_hint') diff --git a/config/locales/de.yml b/config/locales/de.yml index 270628c5..d61443ec 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -580,7 +580,7 @@ de: total_fc: Summe (FC-Preis) units: Einheiten index: - title: beendete Bestellungen + title: Beendete Bestellungen invoice: edit: Rechnung bearbeiten invoice_amount: ! 'Rechnungsbetrag:' @@ -785,11 +785,11 @@ de: tolerance: Toleranz total_sum_amount: Gesamtbetrag total_tolerance: Gesamt-Toleranz - total_units: Gesamt-Einheiten unit: Einheit unit_missing: Fehlende Einheiten units: Gebinde units_full: Volle Gebinde + units_total: Gesamt-Einheiten index: closed_orders: more: mehr... @@ -1326,6 +1326,7 @@ de: error_nosel: Es muss mindestens ein Artikel ausgewählt sein error_starts_before_ends: muss nach dem Bestellstart liegen (oder leer bleiben) notice_close: ! 'Bestellung: %{name}, bis %{ends}' + stock: Lager new: title: Neue Bestellung anlegen orders: @@ -1440,16 +1441,16 @@ de: title_version: Version view_current: Aktuelle Version sehen sessions: - logged_in: Logged in! - logged_out: Logged out! - login_invalid: Invalid email or password + logged_in: Angemeldet! + logged_out: Abgemeldet! + login_invalid: new: forgot_password: Passwort vergessen? login: Anmelden nojs: Achtung, Cookies und Javascript müssen aktiviert sein! %{link} bitte abschalten. noscript: NoScript password: Passwort - title: Foodsoft login + title: Foodsoft anmelden user: Benutzerin shared: articles_by_articles: @@ -1477,7 +1478,7 @@ de: description: Beschreibung members: Mitglieder no_weekly_job: kein wöchentlicher Job definiert - weekly_job: wöchentlicher Job + weekly_job: Wöchentlicher Job group_form_fields: search: Suche ... search_user: Nach Nutzerin suchen diff --git a/config/locales/en.yml b/config/locales/en.yml index 0884ab2d..2f9243a2 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -572,8 +572,8 @@ en: article: Article gross: Gross net: Net - number: Number - refund: Refund + number: Nr. + refund: Deposit tax: Tax group_order_articles: add_group: Add group @@ -582,16 +582,16 @@ en: total_fc: Sum (FC-Price) units: Units index: - title: Closed Orders + title: Closed orders invoice: edit: Edit invoice invoice_amount: ! 'Invoice amount:' invoice_date: ! 'Invoice date:' invoice_number: ! 'Invoice number:' - minus_refund_calculated: ! '- refund calculated:' + minus_refund_calculated: ! '- deposit charged:' new: Create new invoice new_body: ! 'Create an invoice for this order:' - plus_refund_credited: ! '+ refund credited:' + plus_refund_credited: ! '+ deposit returned:' refund_adjusted_amount: ! 'amount adjusted for refund:' new: alert: Attention, order was already accounted @@ -636,15 +636,15 @@ en: notice: Invoice was created financial_transactions: create: - notice: The Transaction was saved. + notice: The transaction was saved. create_collection: - alert: ! 'An Error occured: %{error}' - notice: All Transactions were saved. + alert: ! 'An error occured: %{error}' + notice: All transactions were saved. index: balance: ! 'Balance of account: %{balance}' last_updated_at: (last updated %{when} ago) new_transaction: Create new transaction - search_placeholder: Search .. + search_placeholder: Search ... title: Account statement for %{name} new: paragraph: Here you can credit and debit money for the order group %{name}. @@ -676,10 +676,10 @@ en: end: End everything_cleared: Great, everything is accounted... group: Group - last_transactions: Last Transactions + last_transactions: Last transactions note: Note - open_transactions: Open Transactions - show_all: Show all + open_transactions: not yet accounted + show_all: show all supplier: supplier title: Finances unpaid_invoices: Unpaid invoices @@ -712,10 +712,10 @@ en: ordergroups: index: new_transaction: Add new transactions - search_placeholder: Search .. + search_placeholder: Search ... title: Manage accounts ordergroups: - account_balance: Account Balance + account_balance: Account balance account_statement: Account statement name: Name new_transaction: New transaction @@ -787,11 +787,11 @@ en: tolerance: Tolerance total_sum_amount: Total amount total_tolerance: Total tolerance - total_units: Total units unit: Unit unit_missing: Missing units units: Units units_full: Filled units + units_total: Total units index: closed_orders: more: more... @@ -1329,6 +1329,7 @@ en: error_nosel: At least one article must be selected error_starts_before_ends: must be after the start date (or remain empty) notice_close: ! 'Order: %{name}, until %{ends}' + stock: Stock new: title: Create new order orders: @@ -1445,11 +1446,11 @@ en: sessions: logged_in: Logged in! logged_out: Logged out! - login_invalid: Invalid email or password + login_invalid: Invalid username or password new: forgot_password: Forgot password? login: Login - nojs: Attention, Cookies and Javascript have to be activated! Please switch off %{link}. + nojs: Attention, cookies and javascript have to be activated! Please switch off %{link}. noscript: NoScript password: Password title: Foodsoft login @@ -1576,8 +1577,8 @@ en: amount: Amount date: Billing date delivery: Delivery - deposit: Charge deposit - deposit_credit: Credit deposit + deposit: Deposit charged + deposit_credit: Deposit returned note: Note number: Number order: Order diff --git a/config/locales/nl.yml b/config/locales/nl.yml index e65667a1..863744dc 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -527,8 +527,8 @@ nl: title: Order sluiten edit_results_by_articles: add_article: Artikel toevoegen - amount: Hoeveelheid - amount_per_unit: Groothandelsverpakkingsgroote * Hoeveelheid + amount: Aantal + amount_per_unit: Groothandelsverpakkingsgroote * Aantal article: Artikel gross: Bruto net: Netto @@ -544,37 +544,37 @@ nl: index: title: Gesloten orders invoice: - edit: - invoice_amount: - invoice_date: - invoice_number: - minus_refund_calculated: - new: - new_body: - plus_refund_credited: - refund_adjusted_amount: + edit: Factuur bewerken + invoice_amount: ! 'Factuurbedrag:' + invoice_date: ! 'Factuurdatum:' + invoice_number: ! 'Factuurnummer:' + minus_refund_calculated: ! '- statiegeld berekend:' + new: Factuur toevoegen + new_body: ! 'Een factuur aan deze rekening toevoegen:' + plus_refund_credited: ! '+ statiegeld teruggekregen:' + refund_adjusted_amount: ! 'bedrag gecorrigeerd voor statiegeld:' new: - alert: - articles_overview: - comment_on_transaction: - comments: - confirm_order: - create_invoice: - edit_note: - edit_order: - groups_overview: - invoice: - notes_and_journal: - summary: - title: - view_options: + alert: Opgelet, bestelling is al afgerekend + articles_overview: Artikeloverzicht + comment_on_transaction: Hier kun je een notitie aan de afrekening toevoegen. + comments: Notities + confirm_order: Bestelling afsluiten + create_invoice: Rekening toevoegen + edit_note: Notitie bewerken + edit_order: Bestelling bewerken + groups_overview: Overzicht per huishouden + invoice: Factuur + notes_and_journal: Notities/Protocol + summary: Samenvatting + title: ! '%{name} afrekenen' + view_options: Weergaveopties order_article: - confirm: + confirm: Weet je het zeker? orders: clear: afrekenen cleared: afgerekend (%{amount}) close: direct afsluiten - confirm: + confirm: Weet je zeker dat de je bestelling wilt afsluiten? end: Einde ended: beëindigd last_edited_by: Laatst aangepast door @@ -583,104 +583,104 @@ nl: state: Status summary: changed: - duration: - fc_amount: - fc_profit: - gross_amount: - groups_amount: - net_amount: - reload: + duration: Van %{starts} tot %{ends} + fc_amount: ! 'FC-bedrag:' + fc_profit: FC Winst + gross_amount: ! 'Bruto bedrag:' + groups_amount: ! 'Bedrag van huishoudens:' + net_amount: ! 'Netto bedrag:' + reload: Samenvatting verversen with_extra_charge: without_extra_charge: create: - notice: + notice: Rekening is gemaakt financial_transactions: create: - notice: + notice: De transactie is opgeslagen. create_collection: alert: - notice: + notice: Alle transacties zijn opgeslagen. index: - balance: - last_updated_at: - new_transaction: - search_placeholder: - title: + balance: ! 'Tegoed: %{balance}' + last_updated_at: (laatst bijgewerkt %{when} geleden) + new_transaction: Nieuwe transactie toevoegen + search_placeholder: Zoeken ... + title: Rekeningoverzicht voor %{name} new: paragraph: - title: + title: Nieuwe transactie new_collection: - amount: - new_ordergroup: - note: - ordergroup: - save: + amount: Bedrag + new_ordergroup: Nog een huishouden toevoegen + note: Notitie + ordergroup: Huishouden + save: Transactie opslaan sidebar: title: ordergroup: remove: remove_group: transactions: - amount: - date: - note: - who: + amount: Bedrag + date: Datum + note: Notitie + who: Wie group_order_articles: form: amount_change_for: index: - amount: - amount_fc: - clear: - date: - end: - everything_cleared: - group: - last_transactions: - note: - open_transactions: - show_all: - supplier: - title: - unpaid_invoices: + amount: Bedrag + amount_fc: Bedrag(FC) + clear: Afrekenen + date: Datum + end: Einde + everything_cleared: Mooi zo, alles is verrekend... + group: Groep + last_transactions: Laatste transacties + note: Notitie + open_transactions: nog niet afgerekend + show_all: alle tonen + supplier: leverancier + title: Financiën + unpaid_invoices: Onbetaalde facturen invoices: edit: - title: + title: Factuur bewerken form: - delivery: - linked: - order: + delivery: levering + linked: Deze factuur is met aan %{what_link} gekoppeld. + order: bestelling index: - action_new: - title: + action_new: Nieuwe factuur toevoegen + title: Facturen invoices: - confirm_delete: - delivery: + confirm_delete: Weet je het zeker? + delivery: Levering new: - back: - title: + back: Terug + title: Nieuwe factuur toevoegen show: - back: - delivery: - linked: - title: + back: Terug + delivery: levering + linked: Deze factuur is aan een %{what_link} gekoppeld. + title: Factuur %{number} order_articles: edit: - title: + title: Artikel bijwerken new: - title: + title: Geleverd artikel aan bestelling toevoegen ordergroups: index: - new_transaction: - search_placeholder: - title: + new_transaction: Nieuwe transacties toevoegen + search_placeholder: Zoeken ... + title: Tegoeden beheren ordergroups: - account_balance: + account_balance: Tegoed account_statement: - name: - new_transaction: + name: Naam + new_transaction: Nieuwe transactie update: - notice: + notice: Factuur is bijgewerkt foodcoop: ordergroups: index: @@ -747,11 +747,11 @@ nl: tolerance: Tolerantie total_sum_amount: Totalbedrag total_tolerance: Totale tolerantie - total_units: Totale eenheden unit: Eenheid unit_missing: Missende eenheden units: Eenheden units_full: Volle eenheden + units_total: Totaal aantal index: closed_orders: more: meer... @@ -949,26 +949,26 @@ nl: login: accept_invitation: body: - submit: - title: + submit: Foodsoft account aanmaken + title: Uitnodiging voor %{name} controller: accept_invitation: - notice: - error_group_invalid: - error_invite_invalid: - error_token_invalid: + notice: Gefeliciteerd, je account is aangemaakt. Nu kun je inloggen. + error_group_invalid: De groep waarin je bent uitgenodigd bestaat niet meer. + error_invite_invalid: Deze uitnodiging is niet (meer) geldig. + error_token_invalid: Onjuist of verlopen token. Probeer het opnieuw. reset_password: - notice: + notice: Als je e-mailadres hier is geregistreerd, krijg je een bericht met een link om je wachtwoord opnieuw in te stellen. update_password: - notice: + notice: Je wachtwoord is veranderd. Nu kun je weer inloggen. forgot_password: - body: - submit: - title: + body:

Geen probleem, je kunt hier een nieuw wachtwoord instellen.

Vul het emailadres in waarmee je je hebt geregistreerd, dan krijg je een email met verdere instructies.

+ submit: Nieuw wachtwoord aanvragen + title: Wachtwoord vergeten? new_password: - body: - submit: - title: + body:

Geef nieuw wachtwoord voor %{user}

+ submit: Nieuw wachtwoord opslaan + title: Nieuw wachtwoord mailer: dateformat: feedback: @@ -1188,6 +1188,7 @@ nl: error_nosel: error_starts_before_ends: notice_close: + stock: Voorraad new: title: orders: @@ -1300,17 +1301,17 @@ nl: title_version: view_current: sessions: - logged_in: - logged_out: - login_invalid: + logged_in: Ingelogd! + logged_out: Uitgelogd! + login_invalid: Onjuiste gebruikersnaam of wachtwoord new: - forgot_password: - login: - nojs: - noscript: - password: - title: - user: + forgot_password: Wachtwoord vergeten? + login: Aanmelden + nojs: Opgelet, cookies en javascript moeten toegelaten worden! %{link} uitzetten, alsjeblieft. + noscript: NoScript + password: Wachtwoord + title: Foodsoft aanmelden + user: Gebruiker shared: articles_by_articles: ordered: Besteld (Hoeveelheid + Tolerantie) @@ -1323,9 +1324,9 @@ nl: name: Naam price: Totaalprijs unit: Eenheid - unit_quantity: Groothandelseenheid + unit_quantity: Gr.Eenh. unit_quantity_desc: Hoeveel eenheden per groothandelsverpakking - units: Eenheden + units: Aantal units_desc: Toegewezen eenheden group: access: Toegang tot @@ -1430,16 +1431,16 @@ nl: ordergroup_id: result: invoice: - amount: - date: - delivery: - deposit: - deposit_credit: - note: - number: - order: - paid_on: - supplier: + amount: Bedrag + date: Factuurdatum + delivery: Levering + deposit: Statiegeld in rekening gebracht + deposit_credit: Statiegeld teruggekregen + note: Notitie + number: Nummer + order: Bestelling + paid_on: Betaalt op + supplier: Leverancier message: body: group_id: