show message when ignoring articles due to missing order number
This commit is contained in:
parent
49e563af89
commit
d08f120b27
3 changed files with 6 additions and 0 deletions
|
@ -227,6 +227,7 @@ class ArticlesController < ApplicationController
|
|||
if @updated_articles.empty? && @outlisted_articles.empty?
|
||||
redirect_to supplier_articles_path(@supplier), :notice => I18n.t('articles.controller.sync.notice')
|
||||
end
|
||||
@ignored_article_count = @supplier.articles.where(order_number: [nil, '']).count
|
||||
end
|
||||
|
||||
# Updates, deletes articles when sync form is submitted
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
.alert= t '.alert_used', article: article.name
|
||||
- else
|
||||
%i= t '.outlist.body_skip'
|
||||
- if @ignored_article_count > 0
|
||||
%i= t '.outlist.body_ignored', count: @ignored_article_count
|
||||
%hr/
|
||||
%h2= t '.update.title'
|
||||
%p
|
||||
|
|
|
@ -375,6 +375,9 @@ en:
|
|||
outlist:
|
||||
alert_used: Warning, %{article} is used in an open order. Please remove it from the order first.
|
||||
body: ! 'The following articles were removed from the list and will be <b>deleted</b>:'
|
||||
body_ignored:
|
||||
one: One article without order number was skipped.
|
||||
other: ! '%{count} articles without order number were skipped.'
|
||||
body_skip: No articles to delete.
|
||||
title: Remove from list ...
|
||||
price_short: Price
|
||||
|
|
Loading…
Reference in a new issue