Forráskód Böngészése

Merge branch 'master' into chemi_branch

jose miguel 7 éve
szülő
commit
723993bc47

+ 2 - 1
app/controllers/available_products_controller.rb

@@ -6,7 +6,7 @@ class AvailableProductsController < ApplicationController
     @showcolumns = "minMax"
     # se utiliza para mandarle al datatable el numero de columnas y en que orden se deben de acomodar
     @column_definition = [{ "data": "0" }, { "data": "1" }, { "data": "2" }, { "data": "3" }, { "data": "4" }, { "data": "5" }, { "data": "6" }, { "data": "7" }].to_json
-
+    @location_id = current_user.pointsale_id.present? ? current_user.pointsale_id : current_user.warehouse_id
     respond_to do |format|
       format.html
       format.json { render json: StocksDatatable.new(view_context, current_user, @showcolumns) }
@@ -15,6 +15,7 @@ class AvailableProductsController < ApplicationController
 
   def initial_stock
     @showcolumns = "initial"
+    @location_id = current_user.pointsale_id.present? ? current_user.pointsale_id : current_user.warehouse_id
     # se utiliza para mandarle al datatable el numero de columnas y en que orden se deben de acomodar
     @column_definition = [{ "data": "0" }, { "data": "1" }, { "data": "2" }, { "data": "3" }, { "data": "4" }, { "data": "5" }, { "data": "6" }].to_json
 

+ 5 - 6
app/controllers/suppliers_controller.rb

@@ -19,8 +19,7 @@ class SuppliersController < ApplicationController
 
   # GET /suppliers/1
   # GET /suppliers/1.json
-  def show
-  end
+  def show; end
 
   # GET /suppliers/new
   def new
@@ -28,8 +27,7 @@ class SuppliersController < ApplicationController
   end
 
   # GET /suppliers/1/edit
-  def edit
-  end
+  def edit; end
 
   # POST /suppliers
   # POST /suppliers.json
@@ -84,8 +82,9 @@ class SuppliersController < ApplicationController
   # DELETE /suppliers/1.json
   def destroy
     respond_to do |format|
-      if @supplier.update_attributes(:status => 'erased')
-        @supplier.contact.update_attributes(:status => 'erased')
+      if @supplier.update_attributes(status: 'erased')
+        @supplier.contact.update_attributes(status: 'erased') if @supplier.contact.present?
+        @supplier.billing_information.update_attributes(status: 'erased') if @supplier.billing_information.present?
         @supplier.audit_comment = "El proveedor " + @supplier.nick_name + " fue dado de baja."
         format.html { redirect_to suppliers_url, warning: "El proveedor " + @supplier.nick_name + " fue dado de baja." }
         format.json { head :no_content }

+ 12 - 11
app/controllers/users_controller.rb

@@ -36,11 +36,12 @@ class UsersController < ApplicationController
   def create
     @user = User.new(user_params)
     respond_to do |format|
-      message = if @user.usertype == 'A'
-                  "usuario #{@user.userid} con perfil ADMINISTRADOR creado."
-                else
-                  "Usuario #{@user.userid} creado y asignado al " + (@user.pointsale.present? ? "punto de venta #{@user.pointsale.name}" : "almacén #{@user.warehouse.name}")
-                end
+      message =
+        if @user.usertype == 'A'
+          "usuario #{@user.userid} con perfil ADMINISTRADOR creado."
+        else
+          "Usuario #{@user.userid} creado y asignado al " + (@user.pointsale.present? ? "punto de venta #{@user.pointsale.name}" : "almacén #{@user.warehouse.name}")
+        end
       @user.audit_comment = message
       if @user.save
         format.html { redirect_to users_path, success: message }
@@ -75,11 +76,12 @@ class UsersController < ApplicationController
 
   def update_status
     user = User.find(params[:user_id])
-    if user.active?
-      user.status = "inactive"
-    elsif user.inactive?
-      user.status = "active"
-    end
+    user.status =
+      if user.active?
+        "inactive"
+      elsif user.inactive?
+        "active"
+      end
     respond_to do |format|
       message = "El usuario " + user.userid + " fue " + (user.active? ? "activado" : "desactivado") + "."
       user.audit_comment = message
@@ -106,7 +108,6 @@ class UsersController < ApplicationController
   end
 
   def user_params
-    # NOTE: Using `strong_parameters` gem
     params.require(:user).permit(:current_password, :password, :password_confirmation, :pointsale_id, :warehouse_id, :usertype, :userid, :first_name, :last_name, :email)
   end
 end

+ 8 - 15
app/datatables/stock_by_pointsale_datatable.rb

@@ -34,39 +34,32 @@ class StockByPointsaleDatatable
           "<h3> $#{get_price_sale(available.product)} </h3>"
         ].compact
       else
-        [
+        arr = [
           (image_tag img),
           get_display_name(available.product),
           (category.parent_id.zero? ? category.category : category.parent.category),
           (category.parent_id != 0 ? category.category : ' '),
           available.stock_min.round,
           available.stock_max.round,
-          available.stock.round,
-          "<h3> $#{get_price_sale(available.product)} </h3>"
-        ].compact
+          available.stock.round
+        ]
+        arr += get_price_sale(available.product) unless @current_user.usertype == "S"
+        arr.compact
       end
     end
   end
 
   def get_display_name(product)
     name = "<label style='margin-bottom:0px'><strong>#{product.name}</strong></label> <br>"
-
-    if product.display_attributes.present?
-      name += "#{product.display_attributes} <br>"
-    end
-
+    name += "#{product.display_attributes} <br>" if product.display_attributes.present?
     name += "SKU: #{product.sku}"
-
-    if product.barcode.present?
-      name += "<br> <i class='fa fa-barcode'></i>: #{product.barcode}"
-    end
-
+    name += "<br> <i class='fa fa-barcode'></i>: #{product.barcode}" if product.barcode.present?
     name
   end
 
   def get_price_sale(product)
     location_id = params[:location][2, params[:location].length] unless params[:location].blank?
-    @current_user.usertype == 'S' ? '' : product.get_price_sale(location_id)
+    "<h3> $#{product.get_price_sale(location_id)} </h3>"
   end
 
   def stock

+ 24 - 22
app/models/billing_information.rb

@@ -1,27 +1,29 @@
 class BillingInformation < ActiveRecord::Base
-	##--- Associaciones
-	belongs_to :customer
-	belongs_to :supplier
-	belongs_to :spmx_county, :foreign_key => "county_id"
-	belongs_to :spmx_state, :foreign_key => "state_id"
+  ##--- Associaciones
+  belongs_to :customer
+  belongs_to :supplier
+  belongs_to :spmx_county, :foreign_key => "county_id"
+  belongs_to :spmx_state, :foreign_key => "state_id"
 
-	##--- Llevar registro de Actividad del usuario
-	# audited 
+  ##--- Llevar registro de Actividad del usuario
+  # audited
 
-	##--- Validaciones previas de guardar
-	validates_presence_of :name, message: "Debe capturar el nombre de la razón social."
-	validates :rfc, :presence => {message: "Debe capturar el RFC del cliente."}, length:{ maximum: 13, too_long: "El RFC no debe ser mayor a %{count} caracteres." }
-	validates_presence_of :state_id, message: "Debe especificar el estado."
-	validates_presence_of :county_id, message: "Debe especificar el municipio."
-	# validates_presence_of :city, message: "Debe especificar la ciudad o localidad."
-	# validates_presence_of :suburb, message: "Debe especificar la colonia."
-	# validates_presence_of :address, message: "Debe capturar la dirección de la Empresa."
-	validates :zipcode, :presence => { :message => "Debe especificar el código postal"},  :numericality => { :only_integer => true, :message => "El código postal debe ser numérico.", allow_nil: true }
-	validates :num_ext,  length: { maximum: 10, too_long: "El no. ext no debe ser mayor a %{count} caracteres." }, :unless => Proc.new {|c| c.num_ext.blank?}
-	validates :num_int, length: { maximum: 10, too_long: "El no. int no debe ser mayor a %{count} caracteres." }, :unless => Proc.new {|c| c.num_int.blank?}
+  enum status: [:erased, :active, :inactive]
 
-	##--- Funciones personalizadas
-	def address_complete
-		"#{self.address} No. #{num_ext}" + (self.num_int != '' ? "Int. #{num_int}," : ",") +" C.P. #{zipcode} \n #{suburb}, #{city}, #{spmx_county.name}, #{spmx_state.name} " 
-	end
+  ##--- Validaciones previas de guardar
+  validates_presence_of :name, message: "Debe capturar el nombre de la razón social."
+  validates :rfc, :presence => {message: "Debe capturar el RFC del cliente."}, length:{ maximum: 13, too_long: "El RFC no debe ser mayor a %{count} caracteres." }
+  validates_presence_of :state_id, message: "Debe especificar el estado."
+  validates_presence_of :county_id, message: "Debe especificar el municipio."
+  # validates_presence_of :city, message: "Debe especificar la ciudad o localidad."
+  # validates_presence_of :suburb, message: "Debe especificar la colonia."
+  # validates_presence_of :address, message: "Debe capturar la dirección de la Empresa."
+  validates :zipcode, :presence => { :message => "Debe especificar el código postal"},  :numericality => { :only_integer => true, :message => "El código postal debe ser numérico.", allow_nil: true }
+  validates :num_ext,  length: { maximum: 10, too_long: "El no. ext no debe ser mayor a %{count} caracteres." }, :unless => Proc.new {|c| c.num_ext.blank?}
+  validates :num_int, length: { maximum: 10, too_long: "El no. int no debe ser mayor a %{count} caracteres." }, :unless => Proc.new {|c| c.num_int.blank?}
+
+  ##--- Funciones personalizadas
+  def address_complete
+    "#{self.address} No. #{num_ext}" + (self.num_int != '' ? "Int. #{num_int}," : ",") +" C.P. #{zipcode} \n #{suburb}, #{city}, #{spmx_county.name}, #{spmx_state.name} "
+  end
 end

+ 1 - 1
app/views/available_products/_form.html.erb

@@ -2,7 +2,7 @@
   <div class="portlet-body form">
     <div id="error_explanation"></div>
 
-      <table class="table table-striped table-bordered table-hover stock-table" id="pointsale_stock" data-source="<%= @showcolumns == 'initial' ?  products_initial_stock_path(current_user.pointsale_id, :format => 'json') : products_stock_path(current_user.pointsale_id, :format => 'json') %>">
+      <table class="table table-striped table-bordered table-hover stock-table" id="pointsale_stock" data-source="<%= @showcolumns == 'initial' ?  products_initial_stock_path(@location_id, :format => 'json') : products_stock_path(@location_id, :format => 'json') %>">
         <thead>
           <tr>
             <th class="text-center"><input name="select_all" value="1" id="select-all" type="checkbox" /></th>

+ 26 - 28
app/views/available_products/_form_stock_printable.html.erb

@@ -13,7 +13,9 @@
               <th>Stock máximo</th>
             <% end %>
             <th>Existencia</th>
-            <th>Precio</th>
+            <% if current_user.usertype != "S" %>
+              <th>Precio</th>
+            <% end %>
           </tr>
         </thead>
         <tbody>
@@ -33,9 +35,9 @@
   });
 
   $('body').barcodeListener().on('barcode.valid', function(e, code) {
-      $('input[type=search]').val(code);
-      $('#pointsale_stock input').unbind();
-      $('#pointsale_stock').dataTable().fnFilter(code);
+    $('input[type=search]').val(code);
+    $('#pointsale_stock input').unbind();
+    $('#pointsale_stock').dataTable().fnFilter(code);
   });
 
   $('#category, #sub_category, #pointsale').on('change', function(e) {
@@ -45,26 +47,25 @@
   });
 
   function getSub_categories() {
-      $('#sub_category').attr('disabled', true);
-      category =  $('#category').val() ? $('#category').val() : 0;
-      $.ajax({
-        type: "get",
-        url:  '/getcategories/' + category,
-        dataType: 'json',
-        success: function(data) {
-          $('#sub_category').html('');
-          for (var i = 0; i < data.length; i++) {
-            $('#sub_category').append($('<option>', {
-                value: data[i].id,
-                text : data[i].category
-            }));
-
-          }
-          $('#sub_category').select2({ allowClear: true, placeholder: 'Todas'});
-          $('#sub_category').attr('disabled', false);
-          $('#sub_category').select2('val', null);
+    $('#sub_category').attr('disabled', true);
+    category =  $('#category').val() ? $('#category').val() : 0;
+    $.ajax({
+      type: "get",
+      url:  '/getcategories/' + category,
+      dataType: 'json',
+      success: function(data) {
+        $('#sub_category').html('');
+        for (var i = 0; i < data.length; i++) {
+          $('#sub_category').append($('<option>', {
+            value: data[i].id,
+            text : data[i].category
+          }));
         }
-      });
+        $('#sub_category').select2({ allowClear: true, placeholder: 'Todas'});
+        $('#sub_category').attr('disabled', false);
+        $('#sub_category').select2('val', null);
+      }
+    });
   }
 
   function getTotalProducts() {
@@ -76,8 +77,8 @@
     if (sub_category) { uri += '&sub_category=' + sub_category; }
 
     App.blockUI({
-         target: $("#container_total_prods"),
-         animate: true
+      target: $("#container_total_prods"),
+      animate: true
     });
 
     $.ajax({
@@ -123,6 +124,3 @@
     });
   }
 </script>
-
-
-

+ 9 - 9
app/views/available_products/stock.html.erb

@@ -21,27 +21,27 @@
         <% end %>
         <!-- BEGIN PAGE BREADCRUMBS -->
         <ul class="page-breadcrumb breadcrumb">
-          <%= render_breadcrumbs :tag => :li, :separator => ' <i class="fa fa-circle"></i> ' %> 
-      </ul> 
+          <%= render_breadcrumbs :tag => :li, :separator => ' <i class="fa fa-circle"></i> ' %>
+      </ul>
         <!-- END PAGE BREADCRUMBS -->
         <!-- BEGIN PAGE CONTENT INNER -->
         <div class="page-content-inner">
           <div id="notice"><%= notice %></div>
           <div class="row">
             <div class="col-md-12">
-              <div class="portlet light">  
+              <div class="portlet light">
                 <div class="portlet-body form">
-                    <div id="error_explanation"></div> 
+                    <div id="error_explanation"></div>
 
                     <!-- lista de productos -->
                     <h4 class="form-section"> Lista de productos</h4>
                     <div class="portlet-body">
 
-                      <div class="row"> 
+                      <div class="row">
                         <!-- stock minimo para los seleccionados -->
                           <div class="col-md-offset-1 col-md-8">
                             <div class="form-group">
-                              <label class="col-md-1"> Stock Mínimo </label>          
+                              <label class="col-md-1"> Stock Mínimo </label>
                               <div class="col-md-2">
                                 <input class="form-control" type="number" min="0" id="min_stock_general">
                               </div>
@@ -50,12 +50,12 @@
                                 <input class="form-control" type="number" min="0" id="max_stock_general">
                               </div>
                               <div class="col-md-2">
-                                <button type="button" class="btn btn-success" onclick="updateStock()"><i class="fa fa-save"></i>&nbsp&nbspGuardar cambios</button>                 
+                                <button type="button" class="btn btn-success" onclick="updateStock()"><i class="fa fa-save"></i>&nbsp&nbspGuardar cambios</button>
                               </div>
-                            </div> 
+                            </div>
                           </div>
                       </div>
-                      <h4 class="form-section" style="margin-top: 5px; margin-bottom: 20px"></h4>   
+                      <h4 class="form-section" style="margin-top: 5px; margin-bottom: 20px"></h4>
                     </div>
                 </div>
                 <%= render 'form' %>

+ 32 - 41
app/views/customers/_form.html.erb

@@ -1,4 +1,4 @@
-<%= form_for( setup_customer(@customer), :html => {:class=>"form-horizontal"}) do |f| %>
+<%= form_for( setup_customer(@customer), html: { class: "form-horizontal" }) do |f| %>
 	<div class="portlet-body form">
 		<% if @customer.errors.any? %>
 			<div class="alert alert-danger">
@@ -9,110 +9,102 @@
 			<h4 class="form-section">Información general</h4>
 			<div class="row">
 				<div class="form-group ">
-					<%= f.label :nick_name,  {:class=>"col-md-3 control-label"} do %>Cliente <span class="required">*</span>
-					<% end %> 
+					<%= f.label :nick_name, { class: "col-md-3 control-label" } do %>Cliente <span class="required">*</span>
+					<% end %>
 					<div class="col-md-9">
-						<%= f.text_field :nick_name, {:class=>"form-control input-xlarge" }  %>
+						<%= f.text_field :nick_name, { class: "form-control input-xlarge" } %>
 					</div>
 				</div>
 				<div class="form-group">
-					<%= f.label :phone, "Teléfono", {:class=>"col-md-3 control-label"} do %> Teléfono <span class="required">*</span>
-					<% end %> 
+					<%= f.label :phone, "Teléfono", { class: "col-md-3 control-label" } do %> Teléfono
+					<% end %>
 					<div class="col-md-9">
 						<div class="input-icon">
 							<i class="fa fa-phone"></i>
-							<%= f.text_field :phone, {:class=>"form-control input-small mask_phone" } %>
+							<%= f.text_field :phone, { class: "form-control input-small mask_phone" } %>
 						</div>
 					</div>
 				</div>
 				<div class="form-group">
-					<%= f.label :email, "Correo", {:class=>"col-md-3 control-label"} do %> Correo electrónico
-					<% end %> 
+					<%= f.label :email, "Correo", { class: "col-md-3 control-label" } do %> Correo electrónico
+					<% end %>
 					<div class="col-md-9">
 						<div class="input-icon">
 							<i class="fa fa-envelope"></i>
-							<%= f.text_field :email, {:class=>"form-control input-xlarge", :placeholder=>"ejemplo@correo.com" } %>
+							<%= f.text_field :email, { class: "form-control input-xlarge", placeholder: "ejemplo@correo.com" } %>
 						</div>
 					</div>
 				</div>
 				<div class="form-group">
-					<%= f.label :notes, "Observaciones", {:class=>"col-md-3 control-label"} %>
+					<%= f.label :notes, "Observaciones", { class: "col-md-3 control-label" } %>
 					<div class="col-md-9">
-						<%= f.text_area :notes, {:class=>"form-control", :rows=>5 } %>
+						<%= f.text_area :notes, { class: "form-control", rows: 5 } %>
 					</div>
 				</div>
 				<div class="form-group ">
-					<%= f.label :credit, "¿Se le otorgó crédito?", {:class=>"col-md-3 control-label"} %>
+					<%= f.label :credit, "¿Se le otorgó crédito?", { class: "col-md-3 control-label" } %>
 					<div class="col-md-9">
-						<%= f.check_box(:credit, 
-							{ 
+						<%= f.check_box(:credit,
+							{
 								class: "make-switch",
 								data: {
 									on_color: "success",
 									off_color: "danger",
-									on_text: "Si", 
+									on_text: "Si",
 									off_text: "No"
 								}
 							}, "true","false"
 						) %>
 					</div>
 				</div>
-				<div class="form-group credit_limits" <% if !@customer.credit? %> style="display:none;"  <% end %>  >
-					<%= f.label :credit_limit, {:class=>"col-md-3 control-label"} do %> Limite de crédito <span class="required">*</span> <% end %>
+				<div class="form-group credit_limits" <% if !@customer.credit? %> style="display:none;" <% end %>  >
+					<%= f.label :credit_limit, { class: "col-md-3 control-label" } do %> Limite de crédito <span class="required">*</span> <% end %>
 					<div class="col-md-9">
 						<div class="input-group">
 							<span class="input-group-addon"> $ </span>
-							<%= f.text_field :credit_limit, {:class=>"form-control input-small mask_decimal"} %>
+							<%= f.text_field :credit_limit, { class: "form-control input-small mask_decimal" } %>
 						</div>
 					</div>
 				</div>
-				<div class="form-group credit_limits" <% if !@customer.credit? %> style="display:none;"  <% end %> >
-					<%= f.label :time_limit, {:class=>"col-md-3 control-label"} do %> Días límite de crédito <span class="required">*</span>
-					<% end %> 
+				<div class="form-group credit_limits" <% if !@customer.credit? %> style="display:none;" <% end %> >
+					<%= f.label :time_limit, { class: "col-md-3 control-label" } do %> Días límite de crédito <span class="required">*</span>
+					<% end %>
 					<div class="col-md-9">
-						<%= f.text_field :time_limit, {:class=>"form-control input-small mask_number"} %>
+						<%= f.text_field :time_limit, { class: "form-control input-small mask_number" } %>
 					</div>
 				</div>
 
-				<% if @customer.persisted? %>
+				<!-- < % if @customer.persisted? %> -->
 				<!-- <div class="form-group last">
-					<%= f.label :status, "Status", {:class=>"col-md-3 control-label"} %>
+					< %= f.label :status, "Status", { class: "col-md-3 control-label" } %>
 					<div class="col-md-9">
-						<%= f.check_box(:status,  
+						< %= f.check_box(:status,
 							{
 								class: "make-switch",
 								data: {
 									on_color: "success",
 									off_color: "danger",
-									on_text: "Activo", 
+									on_text: "Activo",
 									off_text: "Inactivo"
 								}
 							},"active", "inactive"
 						) %>
 					</div>
 				</div> -->
-				<% end %>
+				<!-- < % end %> -->
 			</div>
-			
-
 			<%= f.fields_for :billing_information, @customer.billing_information do |b| %>
-				<%= render partial: "billing_information/form", locals: { info: @customer, b: b } %>	
-			
+				<%= render partial: "billing_information/form", locals: { info: @customer, b: b } %>
 			<% end %>
-			
-			
-
 			<%= f.fields_for :contact, @customer.contact do |b| %>
-				<%= render partial: "contacts/form", locals: { info: @customer, c: b } %>	
-			
+				<%= render partial: "contacts/form", locals: { info: @customer, c: b } %>
 			<% end %>
-			
 		</div>
 		<div class="form-actions">
 			<div class="row">
 				<div class="col-md-offset-3 col-md-9">
-					<%= f.submit 'Guardar', {:class=>"btn green"} %> 
-					<%= link_to 'Cancelar', customers_path(:filter => @filter, :current_page => @current_page), {:class=>"btn default"} %>
+					<%= f.submit 'Guardar', { class: "btn green" } %>
+					<%= link_to 'Cancelar', customers_path(filter: @filter, current_page: @current_page), { class: "btn default" } %>
 				</div>
 			</div>
 		</div>
@@ -129,6 +121,5 @@
 				$(".credit_limits").hide();
 			}
 		});
-
 	});
 </script>

+ 3 - 2
config/application.rb

@@ -26,12 +26,13 @@ module Pos
     config.active_record.raise_in_transactional_callbacks = true
     config.usertypes_for_admin = {
       "Administrador" => "A",
-      "Gerente" => "G",
+      "Almacenista" => "S",
       "Caja" => "C",
-      "Almacenista" => "S"
+      "Gerente" => "G"
     }
 
     config.usertypes_for_manager = {
+      "Almacenista" => "S",
       "Caja" => "C"
     }
   end

+ 2 - 4
config/navigation.rb

@@ -116,7 +116,7 @@ SimpleNavigation::Configuration.run do |navigation|
       # configuracion
       primary.item :config, { icon: "fa fa-fw fa-cog", text: "Configuración" }, '#', class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
         sub_nav.dom_attributes = { class: 'dropdown-menu pull-left' }
-        sub_nav.item :pos_configs, 'Configurar parametros generales', pos_configs_path
+        sub_nav.item :pos_configs, 'Configurar parámetros generales', pos_configs_path
         sub_nav.item :divider_after_list_transfers, '#', divider: true
         sub_nav.item :list_users, 'Usuarios del sistema', users_path
       end
@@ -182,8 +182,6 @@ SimpleNavigation::Configuration.run do |navigation|
         sub_nav.item :new_transfer, 'Nuevo traspaso', new_transfer_path
         sub_nav.item :list_transfers, 'Lista de traspasos', transfers_path
         sub_nav.item :divider_after_list_transfers, '#', divider: true
-        sub_nav.item :list_users, 'Usuarios del sistema', users_path
-        sub_nav.item :divider_after_list_users, '#', divider: true
         sub_nav.item :list_warehouse, 'Almacenes', warehouses_path
       end
       # coneptos de egresos
@@ -198,7 +196,7 @@ SimpleNavigation::Configuration.run do |navigation|
       primary.item :config, { icon: "fa fa-fw fa-cog", text: "Configuración" }, '#', class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
         sub_nav.dom_attributes = { class: 'dropdown-menu pull-left' }
         sub_nav.item :list_products_initial_stock, 'Stock inicial de productos', products_initial_stock_path(current_user.pointsale_id)
-        sub_nav.item :list_products_stock, 'Stock minimo y maximo de productos', products_stock_path(current_user.pointsale_id)
+        sub_nav.item :list_products_stock, 'Stock mínimo y máximo de productos', products_stock_path(current_user.pointsale_id)
         sub_nav.item :divider_after_list_transfers, '#', divider: true
         sub_nav.item :list_users, 'Usuarios del sistema', users_path
       end