update article category implemented

This commit is contained in:
viehlieb 2023-02-20 19:56:45 +01:00
parent 78da4feafe
commit 12adfe4289
5 changed files with 31 additions and 17 deletions

View file

@ -151,6 +151,7 @@ class ArticlesController < ApplicationController
options = { filename: uploaded_file.original_filename }
options[:outlist_absent] = (params[:articles]['outlist_absent'] == '1')
options[:convert_units] = (params[:articles]['convert_units'] == '1')
options[:update_category] = (params[:articles]['update_category'] == '1')
@updated_article_pairs, @outlisted_articles, @new_articles = @supplier.sync_from_file uploaded_file.tempfile, options
if @updated_article_pairs.empty? && @outlisted_articles.empty? && @new_articles.empty?
redirect_to supplier_articles_path(@supplier), :notice => I18n.t('articles.controller.parse_upload.notice')