small improvement for ref match form
This commit is contained in:
parent
58b262a14f
commit
60dadd0cb9
@ -97,7 +97,7 @@ class Admin::ImportCsvsController < ApplicationController
|
|||||||
if params[:price_line_id]
|
if params[:price_line_id]
|
||||||
@price_line = PriceLine.find(params[:price_line_id])
|
@price_line = PriceLine.find(params[:price_line_id])
|
||||||
p_product = PProduct.find_or_create_by(name: "--> Selectioner un produit <--", code: "--> Indiquer un code produit <--")
|
p_product = PProduct.find_or_create_by(name: "--> Selectioner un produit <--", code: "--> Indiquer un code produit <--")
|
||||||
@p_product_ref = PProductRef.find_or_create_by(p_product: p_product, ct_sub_name: @price_line.title, ct_price_ht: @price_line.ct_u_price_ht)
|
@p_product_ref = PProductRef.find_or_create_by(p_product: p_product, description: @price_line.title, ct_price_ht: @price_line.ct_u_price_ht)
|
||||||
@p_product_ref.p_product_ref_specs.build
|
@p_product_ref.p_product_ref_specs.build
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -7,10 +7,24 @@
|
|||||||
%h1 Ajouter une référence
|
%h1 Ajouter une référence
|
||||||
.card.border.border-primary.mb-3
|
.card.border.border-primary.mb-3
|
||||||
%h5.card-header.border-bottom Rappel des infos fournisseurs
|
%h5.card-header.border-bottom Rappel des infos fournisseurs
|
||||||
.card-body
|
%ul.list-group.list-group-flush
|
||||||
%h5.card-title libellé :
|
%li.list-group-item
|
||||||
|
.d-inline-flex
|
||||||
|
%h5.card-title{style: "min-width: 80px;"} libellé :
|
||||||
|
%p.card-text=@p_product_ref.description
|
||||||
|
%li.list-group-item
|
||||||
|
.d-inline-flex
|
||||||
|
%h5.card-title{style: "min-width: 80px;"} Qté :
|
||||||
%p.card-text
|
%p.card-text
|
||||||
=@p_product_ref.ct_sub_name
|
=@price_line.qte
|
||||||
|
%li.list-group-item
|
||||||
|
.d-inline-flex
|
||||||
|
%h5.card-title{style: "min-width: 80px;"} Prix :
|
||||||
|
%p.card-text
|
||||||
|
=number_to_currency @p_product_ref.ct_price_ht
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%table.form-table
|
%table.form-table
|
||||||
@ -21,11 +35,11 @@
|
|||||||
%input.p_product_autocomplete_input.form-control{:type => "text", :style => "", tabindex: 1, autofocus: true, :class => "p_product_name"}
|
%input.p_product_autocomplete_input.form-control{:type => "text", :style => "", tabindex: 1, autofocus: true, :class => "p_product_name"}
|
||||||
=form.hidden_field :p_product_id, :class => "p_product_id"
|
=form.hidden_field :p_product_id, :class => "p_product_id"
|
||||||
|
|
||||||
=link_to ic(:plus)+ " Ajouter produit", new_admin_p_product_path(fournisseur_label: @p_product_ref.ct_sub_name, price_line_id: @price_line.id)
|
=link_to ic(:plus)+ " Ajouter produit", new_admin_p_product_path(fournisseur_label: @p_product_ref.description, price_line_id: @price_line.id)
|
||||||
%br
|
%br
|
||||||
|
|
||||||
%tr{height: "20px"}
|
%tr{height: "20px"}
|
||||||
|
-if false
|
||||||
%tr
|
%tr
|
||||||
%td{:colspan => 3}
|
%td{:colspan => 3}
|
||||||
= form.input :ct_sub_name, :label => "Désignation ARCOM :"
|
= form.input :ct_sub_name, :label => "Désignation ARCOM :"
|
||||||
@ -34,7 +48,7 @@
|
|||||||
= form.input :ref, :label => "Réf int. :"
|
= form.input :ref, :label => "Réf int. :"
|
||||||
|
|
||||||
%td
|
%td
|
||||||
= form.input :ct_price_ht, :label => "Prix vente HT :"
|
= form.input :ct_price_ht, :label => "Prix vente € HT:"
|
||||||
|
|
||||||
%td
|
%td
|
||||||
=form.input :p_product_color_id, :label => "Couleur :", :collection => PProductColor.all, :as => :select, :include_blank => true, input_html: {class: "custom-select"}
|
=form.input :p_product_color_id, :label => "Couleur :", :collection => PProductColor.all, :as => :select, :include_blank => true, input_html: {class: "custom-select"}
|
||||||
@ -44,7 +58,7 @@
|
|||||||
%td
|
%td
|
||||||
=form.input :sorecop_comment, :label => "Commentaire Sorecop :"
|
=form.input :sorecop_comment, :label => "Commentaire Sorecop :"
|
||||||
%td
|
%td
|
||||||
=form.input :ct_deee, :label => "DEEE personalisée :"
|
=form.input :ct_deee, :label => "DEEE personalisée (€):"
|
||||||
%tr
|
%tr
|
||||||
%td
|
%td
|
||||||
=form.input :ean
|
=form.input :ean
|
||||||
|
Reference in New Issue
Block a user