initial show ok
This commit is contained in:
parent
e2e6ff305b
commit
028c860da9
@ -19,16 +19,42 @@
|
||||
%tr
|
||||
%td Produit
|
||||
%td=@p_product_ref.p_product.name #link_to @p_product_ref.p_product.name, [:admin, @p_product_ref.p_product]
|
||||
-if false
|
||||
%tr
|
||||
%td Actif ?
|
||||
%td=@p_product_ref.enabled ? "Oui" : "Non"
|
||||
|
||||
|
||||
%tr
|
||||
%td Référence assemblée ?
|
||||
%td=@p_product_ref.assembled ? "Oui" : "Non"
|
||||
|
||||
%tr
|
||||
%td Actif ?
|
||||
%td=@p_product_ref.enabled ? "Oui" : "Non"
|
||||
|
||||
|
||||
%tr
|
||||
%td Référence assemblée ?
|
||||
%td=@p_product_ref.assembled ? "Oui" : "Non"
|
||||
|
||||
%tr
|
||||
%td Conditionnement de référence :
|
||||
%td
|
||||
-if @p_product_ref.p_product and @p_product_ref.p_product.p_product_conditioning
|
||||
= @p_product_ref.p_product.p_product_conditioning.name
|
||||
%tr
|
||||
%td Unité de vente (archive) :
|
||||
%td= @p_product_ref.uv
|
||||
|
||||
%tr
|
||||
%td Conditionnement :
|
||||
%td
|
||||
-if @p_product_ref.p_product_conditioning
|
||||
= @p_product_ref.p_product_conditioning.name
|
||||
|
||||
%tr
|
||||
%td Prix de vente à l'unité de référence
|
||||
%td
|
||||
=number_to_currency( @p_product_ref.ct_price_ht / @p_product_ref.conditioning_ref_qte, :precision => 3) if @p_product_ref.ct_price_ht? and @p_product_ref.conditioning_ref_qte?
|
||||
="/"
|
||||
= @p_product_ref.p_product.p_product_conditioning.name if @p_product_ref.p_product.p_product_conditioning
|
||||
%tr
|
||||
%td Quantité par rapport au conditionnement de référence :
|
||||
%td
|
||||
= @p_product_ref.conditioning_ref_qte
|
||||
|
||||
%tr
|
||||
%td Référence interne :
|
||||
%td=@p_product_ref.ref
|
||||
@ -38,40 +64,16 @@
|
||||
%td=@p_product_ref.ct_sub_name
|
||||
|
||||
%tr
|
||||
%td Prix de vente :
|
||||
%td Dernier prix d'achat :
|
||||
%td=number_to_currency @p_product_ref.ct_price_ht
|
||||
|
||||
%tr
|
||||
%td Unité de vente (archive) :
|
||||
%td= @p_product_ref.uv
|
||||
|
||||
%tr
|
||||
%td Conditionnement de référence :
|
||||
%td
|
||||
-if @p_product_ref.p_product and @p_product_ref.p_product.p_product_conditioning
|
||||
= @p_product_ref.p_product.p_product_conditioning.name
|
||||
|
||||
|
||||
|
||||
%tr
|
||||
%td Conditionnement :
|
||||
%td
|
||||
-if @p_product_ref.p_product_conditioning
|
||||
= @p_product_ref.p_product_conditioning.name
|
||||
|
||||
%tr
|
||||
%td Quantité par rapport au conditionnement de référence :
|
||||
%td
|
||||
= @p_product_ref.conditioning_ref_qte
|
||||
|
||||
%tr
|
||||
%td Prix de vente à l'unité de référence
|
||||
%td
|
||||
=number_to_currency( @p_product_ref.ct_price_ht / @p_product_ref.conditioning_ref_qte, :precision => 3) if @p_product_ref.ct_price_ht? and @p_product_ref.conditioning_ref_qte?
|
||||
="/"
|
||||
= @p_product_ref.p_product.p_product_conditioning.name if @p_product_ref.p_product.p_product_conditioning
|
||||
|
||||
|
||||
|
||||
|
||||
-if @p_product_ref
|
||||
-if false
|
||||
|
||||
-@line_stocks = @p_product_ref.line_stocks
|
||||
.qi_kpi
|
||||
@ -133,40 +135,40 @@
|
||||
|
||||
.clear
|
||||
|
||||
.qi_row
|
||||
.qi_pannel
|
||||
%h3 Historique des prix d'achat
|
||||
|
||||
%table.table.table-striped.table-hover.table-bordered
|
||||
%tr
|
||||
%th
|
||||
Date
|
||||
%th Fournisseur
|
||||
%th Document
|
||||
%th Total
|
||||
%th Qté
|
||||
%th P.U.
|
||||
|
||||
-price_line_achats = PriceLine.joins(:price_lineable).joins(:price_line_block).where(:cc_block_type => "Facture achat").where(:p_product_ref_id => @p_product_ref.id).order("price_documents.date DESC").each do |price_line|
|
||||
|
||||
-if false
|
||||
.qi_row
|
||||
.qi_pannel
|
||||
%h3 Historique des prix d'achat
|
||||
|
||||
%table.table.table-striped.table-hover.table-bordered
|
||||
%tr
|
||||
%td
|
||||
=l price_line.price_line_block.price_lineable.date, :format => :date
|
||||
|
||||
%td
|
||||
=link_to price_line.price_lineable.p_fournisseur.show_name, [:admin, price_line.price_lineable.p_fournisseur] if price_line.price_lineable.p_fournisseur
|
||||
|
||||
%td
|
||||
=link_to price_line.price_lineable.d_number, [:admin, price_line.price_lineable]
|
||||
|
||||
%td
|
||||
=number_to_currency price_line.tot_amount_ht
|
||||
|
||||
|
||||
%td
|
||||
=price_line.qte
|
||||
|
||||
%td
|
||||
=number_to_currency price_line.price_u_ht
|
||||
|
||||
|
||||
%th
|
||||
Date
|
||||
%th Fournisseur
|
||||
%th Document
|
||||
%th Total
|
||||
%th Qté
|
||||
%th P.U.
|
||||
|
||||
-price_line_achats = PriceLine.joins(:price_lineable).joins(:price_line_block).where(:cc_block_type => "Facture achat").where(:p_product_ref_id => @p_product_ref.id).order("price_documents.date DESC").each do |price_line|
|
||||
|
||||
%tr
|
||||
%td
|
||||
=l price_line.price_line_block.price_lineable.date, :format => :date
|
||||
|
||||
%td
|
||||
=link_to price_line.price_lineable.p_fournisseur.show_name, [:admin, price_line.price_lineable.p_fournisseur] if price_line.price_lineable.p_fournisseur
|
||||
|
||||
%td
|
||||
=link_to price_line.price_lineable.d_number, [:admin, price_line.price_lineable]
|
||||
|
||||
%td
|
||||
=number_to_currency price_line.tot_amount_ht
|
||||
|
||||
|
||||
%td
|
||||
=price_line.qte
|
||||
|
||||
%td
|
||||
=number_to_currency price_line.price_u_ht
|
||||
|
||||
|
Reference in New Issue
Block a user