initial show ok
This commit is contained in:
parent
e2e6ff305b
commit
028c860da9
@ -19,16 +19,42 @@
|
|||||||
%tr
|
%tr
|
||||||
%td Produit
|
%td Produit
|
||||||
%td=@p_product_ref.p_product.name #link_to @p_product_ref.p_product.name, [:admin, @p_product_ref.p_product]
|
%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
|
%tr
|
||||||
%td Actif ?
|
%td Conditionnement de référence :
|
||||||
%td=@p_product_ref.enabled ? "Oui" : "Non"
|
%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
|
%tr
|
||||||
%td Référence assemblée ?
|
%td Unité de vente (archive) :
|
||||||
%td=@p_product_ref.assembled ? "Oui" : "Non"
|
%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
|
%tr
|
||||||
%td Référence interne :
|
%td Référence interne :
|
||||||
%td=@p_product_ref.ref
|
%td=@p_product_ref.ref
|
||||||
@ -38,40 +64,16 @@
|
|||||||
%td=@p_product_ref.ct_sub_name
|
%td=@p_product_ref.ct_sub_name
|
||||||
|
|
||||||
%tr
|
%tr
|
||||||
%td Prix de vente :
|
%td Dernier prix d'achat :
|
||||||
%td=number_to_currency @p_product_ref.ct_price_ht
|
%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
|
-@line_stocks = @p_product_ref.line_stocks
|
||||||
.qi_kpi
|
.qi_kpi
|
||||||
@ -133,40 +135,40 @@
|
|||||||
|
|
||||||
.clear
|
.clear
|
||||||
|
|
||||||
.qi_row
|
-if false
|
||||||
.qi_pannel
|
.qi_row
|
||||||
%h3 Historique des prix d'achat
|
.qi_pannel
|
||||||
|
%h3 Historique des prix d'achat
|
||||||
%table.table.table-striped.table-hover.table-bordered
|
|
||||||
%tr
|
%table.table.table-striped.table-hover.table-bordered
|
||||||
%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
|
%tr
|
||||||
%td
|
%th
|
||||||
=l price_line.price_line_block.price_lineable.date, :format => :date
|
Date
|
||||||
|
%th Fournisseur
|
||||||
%td
|
%th Document
|
||||||
=link_to price_line.price_lineable.p_fournisseur.show_name, [:admin, price_line.price_lineable.p_fournisseur] if price_line.price_lineable.p_fournisseur
|
%th Total
|
||||||
|
%th Qté
|
||||||
%td
|
%th P.U.
|
||||||
=link_to price_line.price_lineable.d_number, [:admin, price_line.price_lineable]
|
|
||||||
|
-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|
|
||||||
%td
|
|
||||||
=number_to_currency price_line.tot_amount_ht
|
%tr
|
||||||
|
%td
|
||||||
|
=l price_line.price_line_block.price_lineable.date, :format => :date
|
||||||
%td
|
|
||||||
=price_line.qte
|
%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
|
|
||||||
=number_to_currency price_line.price_u_ht
|
%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